From: jungmin76.park Date: Wed, 23 Oct 2013 00:09:41 +0000 (+0900) Subject: move _IIpcServerEventListener impl from Service to Stub [N_SE-55603] X-Git-Tag: accepted/tizen/20131031.112415~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6077d15a3ef832493d2f973953422782a4509a18;p=platform%2Fframework%2Fnative%2Fappwidget-service.git move _IIpcServerEventListener impl from Service to Stub [N_SE-55603] Change-Id: I0c3d16528d1269a628d0e57dd56b1081be36c4ae --- diff --git a/inc/FShell_AppWidgetManagerService.h b/inc/FShell_AppWidgetManagerService.h index 988e569..418ac9d 100644 --- a/inc/FShell_AppWidgetManagerService.h +++ b/inc/FShell_AppWidgetManagerService.h @@ -98,9 +98,9 @@ private: virtual result RequestProviderCount(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int& providerCount); virtual result SendResult(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, bool isSucceeded); - // _IIpcServerEventListener - virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId); - virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId); + // stub implementations(ipc connection) + virtual void OnIpcClientConnected(const Tizen::App::AppId& appId, int clientId); + virtual void OnIpcClientDisconnected(const Tizen::App::AppId& appId, int clientId); // ISettingEventListener virtual void OnSettingChanged(Tizen::Base::String & key); @@ -116,6 +116,7 @@ private: static void DestroySingleton(void); static bool SetSettingEventListener(Tizen::System::ISettingEventListener& listener); + private: static AppWidgetManagerService* __pTheInstance; Tizen::Base::Collection::HashMapT __appContextList; diff --git a/inc/FShell_AppWidgetManagerStub.h b/inc/FShell_AppWidgetManagerStub.h index fcd4000..8ce1148 100644 --- a/inc/FShell_AppWidgetManagerStub.h +++ b/inc/FShell_AppWidgetManagerStub.h @@ -80,10 +80,16 @@ protected: virtual result RequestProviderCount(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int& pProviderCount) = 0; virtual result SendResult(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, bool isSucceeded) = 0; + virtual void OnIpcClientConnected(const Tizen::App::AppId& appId, int clientId) = 0; + virtual void OnIpcClientDisconnected(const Tizen::App::AppId& appId, int clientId) = 0; + // _IIpcServerEventListener virtual void OnIpcServerStarted(const Tizen::Io::_IpcServer& server); virtual void OnIpcServerStopped(const Tizen::Io::_IpcServer& server); virtual void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message); + virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId); + virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId); + result StartIpcServer(void); diff --git a/src/FShell_AppWidgetManagerService.cpp b/src/FShell_AppWidgetManagerService.cpp index fb3b8a2..f892ab5 100644 --- a/src/FShell_AppWidgetManagerService.cpp +++ b/src/FShell_AppWidgetManagerService.cpp @@ -250,9 +250,8 @@ AppWidgetManagerService::FindAppWidget(const AppId& appId, const String& instanc } void -AppWidgetManagerService::OnIpcClientConnected(const _IpcServer& server, int clientId) +AppWidgetManagerService::OnIpcClientConnected(const AppId& appId, int clientId) { - String appId = server.GetClientApplicationId(); SysLog(NID_SHELL, "appId(%ls)", appId.GetPointer()); _AppContext* pAppContext = null; @@ -264,9 +263,8 @@ AppWidgetManagerService::OnIpcClientConnected(const _IpcServer& server, int clie } void -AppWidgetManagerService::OnIpcClientDisconnected(const _IpcServer& server, int clientId) +AppWidgetManagerService::OnIpcClientDisconnected(const AppId& appId, int clientId) { - String appId = server.GetClientApplicationId(); SysLog(NID_SHELL, "appId(%ls)", appId.GetPointer()); _AppContext* pAppContext = null; diff --git a/src/FShell_AppWidgetManagerStub.cpp b/src/FShell_AppWidgetManagerStub.cpp index 28e7d02..99ef7e8 100644 --- a/src/FShell_AppWidgetManagerStub.cpp +++ b/src/FShell_AppWidgetManagerStub.cpp @@ -216,6 +216,20 @@ _AppWidgetManagerStub::OnIpcServerStopped(const _IpcServer& server) SysLog(NID_SHELL, "\n"); } +void +_AppWidgetManagerStub::OnIpcClientConnected(const _IpcServer& server, int clientId) +{ + String appId = server.GetClientApplicationId(); + OnIpcClientConnected(appId, clientId); +} + +void +_AppWidgetManagerStub::OnIpcClientDisconnected(const _IpcServer& server, int clientId) +{ + String appId = server.GetClientApplicationId(); + OnIpcClientDisconnected(appId, clientId); +} + bool _AppWidgetManagerStub::SendAppWidgetEvent(const int clientId, const String& instanceId, const String& operationId, HashMap* pArgs) {