]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/globals.cpp
Added the eVaf::Common::iProp interface for global properties and variables.
[evaf] / src / libs / Common / globals.cpp
index dfb15953292b404f512688fee30b13b8df6a7635..02aedd84d37a26a93ee8683b85213c1e8da2fe3a 100644 (file)
@@ -18,8 +18,9 @@
  */
 
 #include "globals.h"
-#include "env.h"
 #include "app.h"
+#include "config.h"
+#include "prop.h"
 #include "logger.h"
 #include "version.h"
 #include "ilogger.h"
@@ -36,30 +37,36 @@ bool eVaf::Common::init()
         return false;
     }
 
-    EVAF_INFO("Initializing %s.Globals", VER_MODULE_NAME_STR);
+    EVAF_INFO("Initializing %s-Globals", VER_MODULE_NAME_STR);
 
     // Initialize all the common interface implementations in the proper sequence
 
-    eVaf::Common::Internal::Env * env =
-        qobject_cast<eVaf::Common::Internal::Env *>(eVaf::Common::iEnv::instance());
-    if (env) {
-        if (!env->init())
+    eVaf::Common::Internal::App * app =
+            qobject_cast<eVaf::Common::Internal::App *>(eVaf::Common::iApp::instance());
+    if (app) {
+        if (!app->init())
             return false;
     }
     eVaf::Common::Internal::Logger * logger =
-        qobject_cast<eVaf::Common::Internal::Logger *>(eVaf::Common::iLogger::instance());
+            qobject_cast<eVaf::Common::Internal::Logger *>(eVaf::Common::iLogger::instance());
     if (logger) {
         if (!logger->init())
             return false;
     }
-    eVaf::Common::Internal::App * app =
-        qobject_cast<eVaf::Common::Internal::App *>(eVaf::Common::iApp::instance());
-    if (app) {
-        if (!app->init())
+    eVaf::Common::Internal::Config * config =
+            qobject_cast<eVaf::Common::Internal::Config *>(eVaf::Common::iConfig::instance());
+    if (config) {
+        if (!config->init())
+            return false;
+    }
+    eVaf::Common::Internal::Prop * prop =
+            qobject_cast<eVaf::Common::Internal::Prop *>(eVaf::Common::iProp::instance());
+    if (prop) {
+        if (!prop->init())
             return false;
     }
 
-    EVAF_INFO("%s.Globals initialized", VER_MODULE_NAME_STR);
+    EVAF_INFO("%s-Globals initialized", VER_MODULE_NAME_STR);
 
     return true;
 }