From: Seoyeon Kim Date: Tue, 13 Dec 2016 01:27:30 +0000 (-0800) Subject: Merge "[3.0] Move ELDbus init & shutdown to Tizen Framework" into tizen_3.0 X-Git-Tag: accepted/tizen/3.0/common/20161216.124145~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f99a48ab0bfb8a45cd7376c7e9f5b7c8ba1f2ec4;hp=600ba58364dfdd21c1c283cd0fa6b515e59bf015;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Merge "[3.0] Move ELDbus init & shutdown to Tizen Framework" into tizen_3.0 --- diff --git a/adaptors/common/application-impl.cpp b/adaptors/common/application-impl.cpp index db48c41..bdc6268 100644 --- a/adaptors/common/application-impl.cpp +++ b/adaptors/common/application-impl.cpp @@ -28,11 +28,6 @@ #include #include -// CONDITIONAL INCLUDES -#ifdef DALI_ELDBUS_AVAILABLE -#include -#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(); diff --git a/adaptors/tizen/framework-tizen.cpp b/adaptors/tizen/framework-tizen.cpp index 47ef3c4..7f425ed 100644 --- a/adaptors/tizen/framework-tizen.cpp +++ b/adaptors/tizen/framework-tizen.cpp @@ -26,9 +26,14 @@ #include #include #include + +// CONDITIONAL INCLUDES #ifdef APPCORE_WATCH_AVAILABLE #include #endif +#ifdef DALI_ELDBUS_AVAILABLE +#include +#endif // DALI_ELDBUS_AVAILABLE #include @@ -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; }