From 695e4e401a800c0cb21653384ec7b97f873c9ce8 Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Wed, 17 Jul 2013 15:53:55 +0900 Subject: [PATCH] runtime moves to common-serivce. Change-Id: I84dad17009a245a046b3d535db80659a81b8720c Signed-off-by: Hokwon Song --- src/system-server/CMakeLists.txt | 1 + src/system-server/inc/FSys_RuntimeInfo.h | 46 ++++++ src/system-server/runtime/FSys_RuntimeInfo.cpp | 94 +++++++++++ src/system/CMakeLists.txt | 2 + src/system/FSys_RuntimeClientEx.cpp | 207 +++++++++++++++++++++++++ src/system/FSys_RuntimeClientEx.h | 64 ++++++++ src/system/FSys_RuntimeInfoImpl.cpp | 16 +- src/system/FSys_SystemServiceMessageClient.cpp | 121 +++++++++++++++ src/system/FSys_SystemServiceMessageClient.h | 61 ++++++++ 9 files changed, 610 insertions(+), 2 deletions(-) create mode 100644 src/system-server/inc/FSys_RuntimeInfo.h create mode 100644 src/system-server/runtime/FSys_RuntimeInfo.cpp mode change 100755 => 100644 src/system/CMakeLists.txt create mode 100644 src/system/FSys_RuntimeClientEx.cpp create mode 100644 src/system/FSys_RuntimeClientEx.h create mode 100644 src/system/FSys_SystemServiceMessageClient.cpp create mode 100644 src/system/FSys_SystemServiceMessageClient.h diff --git a/src/system-server/CMakeLists.txt b/src/system-server/CMakeLists.txt index 391d1e8..e3ef90c 100644 --- a/src/system-server/CMakeLists.txt +++ b/src/system-server/CMakeLists.txt @@ -27,6 +27,7 @@ SET (${this_target}_SOURCE_FILES setting/providers/FSys_SettingSpeechProvider.cpp setting/providers/FSys_SettingStorageProvider.cpp setting/providers/FSys_SettingVibrationProvider.cpp + runtime/FSys_RuntimeInfo.cpp ) INCLUDE(FindPkgConfig) diff --git a/src/system-server/inc/FSys_RuntimeInfo.h b/src/system-server/inc/FSys_RuntimeInfo.h new file mode 100644 index 0000000..b653559 --- /dev/null +++ b/src/system-server/inc/FSys_RuntimeInfo.h @@ -0,0 +1,46 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_RuntimeInfo.h + * @brief This is the header file for the _RuntimeInfo class. + */ + +#ifndef _FSYS_SERVICE_SYS_RUNTIME_INFO__H_ +#define _FSYS_SERVICE_SYS_RUNTIME_INFO__H_ + +#include +#include + +namespace Tizen { namespace System +{ +class _OSP_EXPORT_ _RuntimeInfo +{ +public: + static _RuntimeInfo* GetInstance(void); + static long long GetDirectorySize(const char* path); + +private: + _RuntimeInfo(); + virtual ~_RuntimeInfo(); + +private: + static _RuntimeInfo* __pRuntimeInfo; +}; + +} } // Tizen::System + +#endif // _FSYS_SERVICE_SYS_RUNTIME_INFO__H_ diff --git a/src/system-server/runtime/FSys_RuntimeInfo.cpp b/src/system-server/runtime/FSys_RuntimeInfo.cpp new file mode 100644 index 0000000..80b6bc9 --- /dev/null +++ b/src/system-server/runtime/FSys_RuntimeInfo.cpp @@ -0,0 +1,94 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_RuntimeInfo.cpp + * @brief This is the implementation file for _RuntimeInfo class. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include "FSys_RuntimeInfo.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace System +{ + +_RuntimeInfo::_RuntimeInfo() +{ +} + +_RuntimeInfo::~_RuntimeInfo() +{ +} + +long long +_RuntimeInfo::GetDirectorySize(const char* path) +{ + struct dirent *de; + struct stat buf; + DIR* d = opendir(path); + long long total_size = 0; + if(d == null) + { + return 0; + } + + for (de = readdir(d); de != null; de = readdir(d)) + { + char filePath[1024] = {0,}; + sprintf(filePath, "%s%s", path, de->d_name); + + if (lstat(filePath, &buf) == 0) + { + if (S_ISLNK(buf.st_mode) == true) + { + total_size += buf.st_size; + } + else // reg file + { + if(stat(filePath, &buf) == 0) + { + if(S_ISDIR(buf.st_mode) == true) + { + char directoryName[1024] = {0,}; + sprintf(directoryName, "%s%s/", path, de->d_name); + if(strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0) + { + total_size += GetDirectorySize(directoryName); + } + total_size += buf.st_size; + + } + else + { + total_size += buf.st_size; + } + } + } + } + } + closedir(d); + return total_size; +} +} } // Tizen::System diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt old mode 100755 new mode 100644 index c88c434..1c04976 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -26,6 +26,7 @@ SET (${this_target}_SOURCE_FILES FSys_PowerManagerImpl.cpp FSysRuntimeInfo.cpp FSys_RuntimeClient.cpp + FSys_RuntimeClientEx.cpp FSys_RuntimeInfoImpl.cpp FSysSettingInfo.cpp FSys_SettingInfoImpl.cpp @@ -43,6 +44,7 @@ SET (${this_target}_SOURCE_FILES FSys_SettingClient.cpp FSys_SettingClientEx.cpp FSys_SystemClient.cpp + FSys_SystemServiceMessageClient.cpp ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") diff --git a/src/system/FSys_RuntimeClientEx.cpp b/src/system/FSys_RuntimeClientEx.cpp new file mode 100644 index 0000000..9733ef1 --- /dev/null +++ b/src/system/FSys_RuntimeClientEx.cpp @@ -0,0 +1,207 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_RuntimeClientEx.cpp + * @brief This is the implementation file for _RuntimeClientEx class. + */ + +#include + +#include +#include +#include + +#include + +#include +#include "FSys_SystemServiceMessageClient.h" +#include "FSys_RuntimeClientEx.h" + +using namespace std; + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Io; + +namespace Tizen { namespace System +{ + +static const int _RUNTIME_GET_PARAM_TYPE = 1; +static const wchar_t* _RUNTIME_SERVICE_ID = L"osp.sys.ipcserver.runtimeinfo"; +static const wchar_t* _RUNTIME_GET_SIZE = L"osp.system.command.runtime.get.size"; +static const wchar_t* _RUNTIME_RESULT_SUCCESS = L"osp.system.result.success"; +static const wchar_t* _RUNTIME_RESULT_SYSTEM = L"osp.system.result.system"; + +_RuntimeClientEx* _RuntimeClientEx::__pRuntimeClientEx= null; + +class _RuntimeAsyncEventArg : public IEventArg +{ +public: + long long value; + result rCode; +}; + +class _RuntimeAsyncEvent : public Event +{ +protected: + virtual void FireImpl(IEventListener& listener, const IEventArg& arg) + { + IRuntimeInfoGetLonglongAsyncResultListener* pListener = dynamic_cast (&listener); + const _RuntimeAsyncEventArg* pArg = dynamic_cast(&arg); + + if(pListener == null || pArg == null) + { + SysLogException(NID_SYS, E_SYSTEM, "It is failed to get listener or arguemnt"); + return; + } + pListener->OnResultReceivedForGetValueAsync(pArg->value, pArg->rCode); + RemoveListener(listener); + } +}; + +_RuntimeClientEx* +_RuntimeClientEx::GetInstance(void) +{ + if(__pRuntimeClientEx == null) + { + __pRuntimeClientEx = new (std::nothrow) _RuntimeClientEx(); + } + return __pRuntimeClientEx; +} + +_RuntimeClientEx::_RuntimeClientEx() + : __msgCount(0) + , __pIpcClient(null) + , __pMessageClient(null) +{ + result r = E_SUCCESS; + static String RUNTIME_SERVICE_ID(_RUNTIME_SERVICE_ID); + + __pMessageClient = _SystemServiceMessageClient::CreateInstance(RUNTIME_SERVICE_ID); + SysTryCatch(NID_SYS, __pMessageClient != null, r = E_SYSTEM, r, "It is failed to create SystemServiceMessageClient."); + + r = __pMessageClient->RegisterListener(RUNTIME_SERVICE_ID, *this); + SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on MessageClient."); + + __pIpcClient = __pMessageClient->GetIpcClient(); + + __asyncEventList.Construct(); +CATCH: + SetLastResult(r); +} + +_RuntimeClientEx::~_RuntimeClientEx() +{ + result r = E_SUCCESS; + String key(_RUNTIME_SERVICE_ID); + r = __pMessageClient->UnregisterListener(key); + SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on MessageClient."); + + __asyncEventList.RemoveAll(true); + __pIpcClient = null; + delete __pMessageClient; +CATCH: + SetLastResult(r); +} + +result +_RuntimeClientEx::GetDirectorySizeValueAsync(const String& path, IRuntimeInfoGetLonglongAsyncResultListener* listener) +{ + result r = E_SUCCESS; + + ArrayList requestMessages; + ArrayList responseMessages; + + requestMessages.Construct(); + responseMessages.Construct(); + + String serviceId(_RUNTIME_SERVICE_ID); + String commandId(_RUNTIME_GET_SIZE); + String messageId; + messageId.Append(__msgCount); + + requestMessages.Add(serviceId); + requestMessages.Add(commandId); + requestMessages.Add(path); + requestMessages.Add(messageId); + + unique_ptr pMsg(new (std::nothrow) IoService_Request(requestMessages, &responseMessages)); + r = __pIpcClient->SendRequest(*pMsg); + SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, "It is failed to send request by IPC [%s]", GetErrorMessage(r)); + + String* pResult = (String*)responseMessages.GetAt(2); + SysTryReturnResult(NID_SYS, pResult != null, E_SYSTEM, "There is no result code."); + + if(*pResult == _RUNTIME_RESULT_SUCCESS) + r = E_SUCCESS; + else + r = E_SYSTEM; + + SysLog(NID_SYS, "r is %s.", GetErrorMessage(r)); + + if(r == E_SUCCESS) + { + _RuntimeAsyncEvent* pEvent = new (std::nothrow) _RuntimeAsyncEvent(); + pEvent->AddListener(*listener); + + __asyncEventList.Add(new Integer(__msgCount), pEvent); + + __msgCount++; + } + return r; +} + +void +_RuntimeClientEx::OnDataReceived(const Tizen::Base::Collection::ArrayList& data) +{ + SysLog(NID_SYS, "Receive result"); + String* pServiceId = (String*)(data.GetAt(0)); + String* pResponseId = (String*)(data.GetAt(1)); + String* pMessageId = (String*)(data.GetAt(2)); + String* pValue = (String*)(data.GetAt(3)); + String* pResultCode = (String*)(data.GetAt(4)); + + SysTryReturnVoidResult(NID_SYS, pServiceId != null && pResponseId != null && pMessageId != null && pValue != null && pResultCode != null, E_SYSTEM, "There is no result data."); + + int msg_id = 0; + Integer::Parse(*pMessageId, msg_id); + + Integer msgKey(msg_id); + + _RuntimeAsyncEvent* pEvent = dynamic_cast <_RuntimeAsyncEvent*> (__asyncEventList.GetValue(msgKey)); + SysTryReturnVoidResult(NID_SYS, pEvent != null, E_SYSTEM, "There is no registered event."); + + _RuntimeAsyncEventArg* pEventArg = new (std::nothrow) _RuntimeAsyncEventArg(); + + LongLong::Parse(*pValue, pEventArg->value); + + if(*pResultCode == _RUNTIME_RESULT_SUCCESS) + { + pEventArg->rCode = E_SUCCESS; + } + else + { + pEventArg->rCode = E_SYSTEM; + } + + pEvent->Fire(*pEventArg); +} + +} } // Tizen::System + diff --git a/src/system/FSys_RuntimeClientEx.h b/src/system/FSys_RuntimeClientEx.h new file mode 100644 index 0000000..969d524 --- /dev/null +++ b/src/system/FSys_RuntimeClientEx.h @@ -0,0 +1,64 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_RuntimeClientEx.h + * @brief This is the header file for _RuntimeClientEx class. + */ + +#ifndef _FSYSTEM_INTERNAL_RUNTIME_CLIENT_EX_H_ +#define _FSYSTEM_INTERNAL_RUNTIME_CLIENT_EX_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "FSys_SystemServiceMessageClient.h" + +namespace Tizen { namespace System +{ + +class _RuntimeClientEx + : public Tizen::Base::Object + , public Tizen::System::_ICommunicationDispatcherListener +{ +private: + _RuntimeClientEx(void); + virtual ~_RuntimeClientEx(void); + +public: + result GetDirectorySizeValueAsync(const Tizen::Base::String& path, IRuntimeInfoGetLonglongAsyncResultListener* listener); + static _RuntimeClientEx* GetInstance(); + +private: + void OnDataReceived(const Tizen::Base::Collection::ArrayList& data); + +private: + Tizen::Base::Collection::HashMap __asyncEventList; + int __msgCount; + Tizen::Io::_IpcClient* __pIpcClient; + _SystemServiceMessageClient* __pMessageClient; + static _RuntimeClientEx* __pRuntimeClientEx; + }; + +} } // Tizen::System + +#endif //_FSYSTEM_INTERNAL_RUNTIME_CLIENT_EX_H_ diff --git a/src/system/FSys_RuntimeInfoImpl.cpp b/src/system/FSys_RuntimeInfoImpl.cpp index ada4a83..3dd5a30 100644 --- a/src/system/FSys_RuntimeInfoImpl.cpp +++ b/src/system/FSys_RuntimeInfoImpl.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include "FSys_EnvironmentImpl.h" #include "FSys_RuntimeInfoImpl.h" #include "FSys_RuntimeClient.h" +#include "FSys_RuntimeClientEx.h" using namespace Tizen::App; using namespace Tizen::Base; @@ -791,8 +793,18 @@ _RuntimeInfoImpl::GetValueAsync(const String& key, IRuntimeInfoGetLonglongAsyncR SysLog(NID_SYS, "%ls", directoryPath.GetPointer()); if(r == E_SUCCESS) { - _RuntimeClient* pRuntimeClient = _RuntimeClient::GetInstance(); - pRuntimeClient->GetDirectorySizeValueAsync(directoryPath, listener); + if(Tizen::Io::File::IsFileExist(L"/opt/usr/etc/common_service_for_runtime") == true) + { + SysLog(NID_SYS, "Runtime is serviced by common-service."); + _RuntimeClientEx* pRuntimeClientEx = _RuntimeClientEx::GetInstance(); + pRuntimeClientEx->GetDirectorySizeValueAsync(directoryPath, listener); + } + else + { + SysLog(NID_SYS, "Runtime is serviced by app-service."); + _RuntimeClient* pRuntimeClient = _RuntimeClient::GetInstance(); + pRuntimeClient->GetDirectorySizeValueAsync(directoryPath, listener); + } } return r; diff --git a/src/system/FSys_SystemServiceMessageClient.cpp b/src/system/FSys_SystemServiceMessageClient.cpp new file mode 100644 index 0000000..524f8ad --- /dev/null +++ b/src/system/FSys_SystemServiceMessageClient.cpp @@ -0,0 +1,121 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_SystemServiceMessageClient.cpp + * @brief This is the implementation file for _SystemServiceMessageClient class. + */ + +#include +#include +#include +#include +#include +#include "FSys_SystemServiceMessageClient.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Io; + +namespace Tizen { namespace System +{ +_SystemServiceMessageClient::_SystemServiceMessageClient() + : __pIpcClient(null) + , __pSystemServiceMessageListener(null) +{ +} + +_SystemServiceMessageClient::_SystemServiceMessageClient(const String id) + : __pIpcClient(null) + , __pSystemServiceMessageListener(null) +{ + result r = E_SUCCESS; + std::unique_ptr< _IpcClient > pIpcClient(new (std::nothrow) _IpcClient()); + SysTryReturn(NID_SYS, pIpcClient != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] It is failed to create IPC client"); + + r = pIpcClient->Construct(id, this); + SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r)); + + __pIpcClient = std::move(pIpcClient); + SetLastResult(r); +} +_SystemServiceMessageClient::~_SystemServiceMessageClient() +{ +} + +_SystemServiceMessageClient* +_SystemServiceMessageClient::CreateInstance(const Tizen::Base::String id) +{ + _SystemServiceMessageClient* pSystemServiceMessageClient = new (std::nothrow) _SystemServiceMessageClient(id); + SysTryReturn(NID_SYS, pSystemServiceMessageClient, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] It is not enough memory."); + return pSystemServiceMessageClient; +} + +_IpcClient* +_SystemServiceMessageClient::GetIpcClient() +{ + return __pIpcClient.get(); +} + +result +_SystemServiceMessageClient::RegisterListener(const String key, _ICommunicationDispatcherListener& listener) +{ + SysTryReturnResult(NID_SYS, !__pSystemServiceMessageListener, E_OBJ_ALREADY_EXIST, + "SystemService listener was set already.[%ls]", key.GetPointer()); + __pSystemServiceMessageListener = &listener; + return E_SUCCESS; +} + +result +_SystemServiceMessageClient::UnregisterListener(const String key) +{ + SysTryReturnResult(NID_SYS, __pSystemServiceMessageListener, E_OBJ_NOT_FOUND, + "SystemService listener is not set.[%ls]",key.GetPointer()); + __pSystemServiceMessageListener = null; + return E_SUCCESS; +} + +void +_SystemServiceMessageClient::OnIpcResponseReceived(_IpcClient& client, const IPC::Message& message) +{ + SysLog(NID_SYS, "Enter."); + IPC_BEGIN_MESSAGE_MAP(_SystemServiceMessageClient, message) + IPC_MESSAGE_HANDLER_EX(IoService_Data, &client, OnDataReceived) + IPC_END_MESSAGE_MAP_EX() + SysLog(NID_SYS, "Exit."); +} + +void +_SystemServiceMessageClient::OnDataReceived(const ArrayList& data) +{ + result r = E_SUCCESS; + String* pServiceId = (String*) data.GetAt(0); + + SysTryReturnVoidResult(NID_SYS, pServiceId != null, E_SYSTEM, "There is no service id."); + SysLog(NID_SYS, "Service id = %ls", pServiceId->GetPointer()); + + SysTryReturnVoidResult(NID_SYS, __pSystemServiceMessageListener, E_SYSTEM, + "Service[%ls] is available, but listener does not exist. [%s]", pServiceId->GetPointer(), GetErrorMessage(r)); + + __pSystemServiceMessageListener->OnDataReceived(data); + + SysLog(NID_SYS, "Message is delivered to \"%ls\"[%x]", pServiceId->GetPointer(), __pSystemServiceMessageListener); + ArrayList* temp = const_cast< ArrayList *> (&data); + temp->RemoveAll(true); +} + +}} diff --git a/src/system/FSys_SystemServiceMessageClient.h b/src/system/FSys_SystemServiceMessageClient.h new file mode 100644 index 0000000..f80a9c1 --- /dev/null +++ b/src/system/FSys_SystemServiceMessageClient.h @@ -0,0 +1,61 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FSys_SystemServiceMessageClient.h + * @brief This is the header file for the _SystemServiceMessageClient class. + */ + +#ifndef _FSYS_INTERNAL_SYSTEM_SERVICE_MESSAGE_CLIENT_IMPL_H_ +#define _FSYS_INTERNAL_SYSTEM_SERVICE_MESSAGE_CLIENT_IMPL_H_ + +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace Tizen { namespace System +{ + +class _SystemServiceMessageClient + : public Tizen::Io::_IIpcClientEventListener +{ +private: + _SystemServiceMessageClient(); +public: + _SystemServiceMessageClient(const Tizen::Base::String id); + ~_SystemServiceMessageClient(); + result RegisterListener(const Tizen::Base::String key, _ICommunicationDispatcherListener& listener); + result UnregisterListener(const Tizen::Base::String key); + void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message); + void OnDataReceived(const Tizen::Base::Collection::ArrayList& data); + + Tizen::Io::_IpcClient* GetIpcClient(void); + static _SystemServiceMessageClient* CreateInstance(const Tizen::Base::String id); + +private: + std::unique_ptr< Tizen::Io::_IpcClient > __pIpcClient; + _ICommunicationDispatcherListener* __pSystemServiceMessageListener; +}; + +}} // Tizen::System + +#endif //_FSYS_INTERNAL_SYSTEM_SERVICE_MESSAGE_CLIENT_IMPL_H_ -- 2.7.4