[3.0] Move ELDbus init & shutdown to Tizen Framework 73/103673/5
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 9 Dec 2016 05:50:26 +0000 (14:50 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 13 Dec 2016 00:49:08 +0000 (09:49 +0900)
- "eldbus_init()" and "eldbus_shutdown()" is specific to Tizen Platform

Change-Id: I203016d8d670fdbcf2ac853962bd82cad6fc008b
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
adaptors/common/application-impl.cpp
adaptors/tizen/framework-tizen.cpp

index dece482..3042c62 100644 (file)
 #include <singleton-service-impl.h>
 #include <lifecycle-controller-impl.h>
 
-// CONDITIONAL INCLUDES
-#ifdef DALI_ELDBUS_AVAILABLE
-#include <Eldbus.h>
-#endif // DALI_ELDBUS_AVAILABLE
-
 namespace Dali
 {
 
@@ -52,13 +47,6 @@ namespace Internal
 namespace Adaptor
 {
 
-#if defined(DEBUG_ENABLED)
-namespace
-{
-Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New( Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DBUS" );
-} // anonymous namespace
-#endif
-
 ApplicationPtr Application::New(
   int* argc,
   char **argv[],
@@ -117,12 +105,6 @@ Application::~Application()
   delete mCommandLineOptions;
   delete mAdaptor;
 
-#ifdef DALI_ELDBUS_AVAILABLE
-  // Shutdown ELDBus.
-  DALI_LOG_INFO( gDBusLogging, Debug::General, "Shutting down DBus\n" );
-  eldbus_shutdown();
-#endif
-
   mWindow.Reset();
 }
 
@@ -193,12 +175,6 @@ void Application::OnInit()
 
   CreateWindow();
 
-#ifdef DALI_ELDBUS_AVAILABLE
-  // Initialize ElDBus.
-  DALI_LOG_INFO( gDBusLogging, Debug::General, "Starting DBus Initialization\n" );
-  eldbus_init();
-#endif
-
   // Start the adaptor
   CreateAdaptor();
   mAdaptor->Start();
index 47ef3c4..7f425ed 100644 (file)
 #include <system_info.h>
 #include <app_control_internal.h>
 #include <bundle_internal.h>
+
+// CONDITIONAL INCLUDES
 #ifdef APPCORE_WATCH_AVAILABLE
 #include <appcore-watch/watch_app.h>
 #endif
+#ifdef DALI_ELDBUS_AVAILABLE
+#include <Eldbus.h>
+#endif // DALI_ELDBUS_AVAILABLE
 
 #include <dali/integration-api/debug.h>
 
@@ -44,6 +49,13 @@ namespace Internal
 namespace Adaptor
 {
 
+#if defined(DEBUG_ENABLED)
+namespace
+{
+Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New( Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DBUS" );
+} // anonymous namespace
+#endif
+
 /**
  * Impl to hide EFL data members
  */
@@ -326,6 +338,11 @@ Framework::Framework( Framework::Observer& observer, int *argc, char ***argv, Ty
   {
     set_last_result( TIZEN_ERROR_NOT_SUPPORTED );
   }
+#ifdef DALI_ELDBUS_AVAILABLE
+  // Initialize ElDBus.
+  DALI_LOG_INFO( gDBusLogging, Debug::General, "Starting DBus Initialization\n" );
+  eldbus_init();
+#endif
   InitThreads();
 
   mImpl = new Impl(this, type);
@@ -338,6 +355,12 @@ Framework::~Framework()
     Quit();
   }
 
+#ifdef DALI_ELDBUS_AVAILABLE
+  // Shutdown ELDBus.
+  DALI_LOG_INFO( gDBusLogging, Debug::General, "Shutting down DBus\n" );
+  eldbus_shutdown();
+#endif
+
   delete mImpl;
 }