From 98c2c65ef78815407a070b0339c36848dd87bb92 Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Wed, 21 Aug 2013 11:34:12 +0900 Subject: [PATCH] Remove dummy code for Device/Power/Runtime. Change-Id: I93408a870634b2dd0497949084f4b9c88ee42554 Signed-off-by: Hokwon Song --- src/system/CMakeLists.txt | 1 - src/system/FSys_DeviceManagerImpl.cpp | 64 ++--------- src/system/FSys_DeviceManagerImpl.h | 1 - src/system/FSys_PowerManagerImpl.cpp | 24 +--- src/system/FSys_RuntimeClient.cpp | 29 ++--- src/system/FSys_RuntimeClient.h | 4 +- src/system/FSys_RuntimeClientEx.cpp | 203 ---------------------------------- src/system/FSys_RuntimeClientEx.h | 63 ----------- src/system/FSys_RuntimeInfoImpl.cpp | 16 +-- 9 files changed, 30 insertions(+), 375 deletions(-) delete mode 100644 src/system/FSys_RuntimeClientEx.cpp delete mode 100644 src/system/FSys_RuntimeClientEx.h diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index ddf29e4..abc003d 100644 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -26,7 +26,6 @@ SET (${this_target}_SOURCE_FILES FSys_PowerManagerImpl.cpp FSysRuntimeInfo.cpp FSys_RuntimeClient.cpp - FSys_RuntimeClientEx.cpp FSys_RuntimeInfoImpl.cpp FSysSettingInfo.cpp FSys_SettingInfoImpl.cpp diff --git a/src/system/FSys_DeviceManagerImpl.cpp b/src/system/FSys_DeviceManagerImpl.cpp index 7a946c6..8c4d13e 100644 --- a/src/system/FSys_DeviceManagerImpl.cpp +++ b/src/system/FSys_DeviceManagerImpl.cpp @@ -57,9 +57,7 @@ using namespace Tizen::Io; namespace Tizen { namespace System { - -static const wchar_t* _DEVICE_MANAGER_SERVICE_ID = L"osp.devicemanager.service"; -static const wchar_t* _DEVICE_MANAGER_SERVICE_ID_EX = L"osp.sys.ipcserver.devicemanager"; +static const wchar_t* _DEVICE_MANAGER_SERVICE_ID = L"osp.sys.ipcserver.devicemanager"; static const wchar_t* _DEVICE_MANAGER_COMMAND_OPEN = L"osp.devicemanager.command.open"; static const wchar_t* _DEVICE_MANAGER_COMMAND_CLOSE = L"osp.devicemanager.command.close"; static const wchar_t* _DEVICE_MANAGER_COMMAND_STATUS = L"osp.devicemanager.command.status"; @@ -150,40 +148,19 @@ _DeviceManagerImpl::_DeviceManagerImpl() , __headSetType(DEVICE_TYPE_WIRED_HEADPHONE) , __bluetoothReferenceCount(0) , __pSystemServiceMessageClient(null) - , __isCommonService(true) { result r = E_SUCCESS; int headsetState = 0; int ret = 0; static String DEVICE_MANAGER_SERVICE_ID(_DEVICE_MANAGER_SERVICE_ID); - if (Tizen::Io::File::IsFileExist(L"/opt/usr/etc/common_service_for_devicemanager") == true) - { - __isCommonService = true; - } + _SystemServiceMessageClient* pSystemServiceMessageClient = _SystemServiceMessageClient::CreateInstance(DEVICE_MANAGER_SERVICE_ID); + SysTryCatch(NID_SYS, pSystemServiceMessageClient, r = E_SYSTEM, r, "It is failed to get system service message client."); + r = pSystemServiceMessageClient->RegisterListener(DEVICE_MANAGER_SERVICE_ID, *this); + SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on Listener."); - if (__isCommonService == true) - { - SysLog(NID_SYS, "Device Manager is serviced by common-service."); - _SystemServiceMessageClient* pSystemServiceMessageClient = _SystemServiceMessageClient::CreateInstance(_DEVICE_MANAGER_SERVICE_ID_EX); - SysTryCatch(NID_SYS, pSystemServiceMessageClient, r = E_SYSTEM, r, "It is failed to get system service message client."); - r = pSystemServiceMessageClient->RegisterListener(_DEVICE_MANAGER_SERVICE_ID_EX, *this); - SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on Listener."); - - __pSystemServiceMessageClient = pSystemServiceMessageClient; - __pIpcClient = __pSystemServiceMessageClient->GetIpcClient(); - } - else - { - SysLog(NID_SYS, "Device Manager is serviced by app-service."); - _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); - SysTryCatch(NID_SYS, pCommunicationDispatcherClient != null, r = E_SYSTEM, r, "It is failed to get CommunicationDispatcherClient."); - - r = pCommunicationDispatcherClient->RegisterCommunicationListener(DEVICE_MANAGER_SERVICE_ID, *this); - SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on CommunicationDispatcherClient."); - - __pIpcClient = pCommunicationDispatcherClient->GetIpcClient(); - } + __pSystemServiceMessageClient = pSystemServiceMessageClient; + __pIpcClient = __pSystemServiceMessageClient->GetIpcClient(); ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED, OnDeviceStateChanged, null); SysTryCatch(NID_SYS, ret == RUNTIME_INFO_ERROR_NONE, r = E_SYSTEM, r, "It is failed to register USB event"); @@ -263,22 +240,10 @@ _DeviceManagerImpl::~_DeviceManagerImpl() ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_HDMI, DeviceEventVConfCallBack); SysTryCatch(NID_SYS, ret == RUNTIME_INFO_ERROR_NONE, r = E_SYSTEM, r, "It is failed to unregister HDMI event"); - if (__isCommonService == true) - { - if (__pSystemServiceMessageClient) - { - delete __pSystemServiceMessageClient; - } - } - else + if (__pSystemServiceMessageClient) { - pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); - SysTryCatch(NID_SYS, pCommunicationDispatcherClient != null, r = E_SYSTEM, r, "It is failed to get CommunicationDispatcherClient."); - - r = pCommunicationDispatcherClient->UnregisterCommunicationListener(key); - SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on CommunicationDispatcherClient."); + delete __pSystemServiceMessageClient; } - __pIpcClient = null; CATCH: SetLastResult(r); @@ -548,11 +513,7 @@ _DeviceManagerImpl::ReleaseBluetoothEvent(void) _IpcClient* _DeviceManagerImpl::GetIpcClient(void) { - if (__isCommonService == true) - { - return __pSystemServiceMessageClient->GetIpcClient(); - } - return __pIpcClient; + return __pSystemServiceMessageClient->GetIpcClient(); } @@ -1484,11 +1445,6 @@ _DeviceManagerImpl::OnDataReceived(const ArrayList& data) SysTryReturnVoidResult(NID_SYS, pServiceId != null && pCommandId != null && pDeviceId != null && pEventId != null, E_SYSTEM, "There is no device data."); - if (__isCommonService == true) - { - serviceId = _DEVICE_MANAGER_SERVICE_ID_EX; - } - stringComparer.Compare(*pServiceId, serviceId, cmp); if (cmp == 0) { diff --git a/src/system/FSys_DeviceManagerImpl.h b/src/system/FSys_DeviceManagerImpl.h index 88be2d0..7b1822c 100644 --- a/src/system/FSys_DeviceManagerImpl.h +++ b/src/system/FSys_DeviceManagerImpl.h @@ -106,7 +106,6 @@ private: Tizen::Base::Collection::ArrayListT<_DeviceEventListenerContainer*> __deviceEventList; static _DeviceManagerImpl* __pDeviceManagerImpl; _SystemServiceMessageClient* __pSystemServiceMessageClient; - bool __isCommonService; }; }} // Tizen::System diff --git a/src/system/FSys_PowerManagerImpl.cpp b/src/system/FSys_PowerManagerImpl.cpp index 220e82f..7066202 100644 --- a/src/system/FSys_PowerManagerImpl.cpp +++ b/src/system/FSys_PowerManagerImpl.cpp @@ -477,16 +477,8 @@ _PowerManagerImpl::RestoreScreenBrightness(void) unique_ptr<_IpcClient> pIpcClient (new (std::nothrow) _IpcClient()); SysTryReturn(NID_SYS, pIpcClient != null, E_OUT_OF_MEMORY, r, "It is failed to create IPC instance."); -// if(Tizen::Io::File::IsFileExist(L"/opt/usr/etc/common_service_for_powermanager") == true) - { - SysLog(NID_SYS, "PowerManager is serviced by common-service"); - r = pIpcClient->Construct(POWER_MANAGER_SERVICE_ID); - } -/* else - { - r = pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID); - } -*/ + SysLog(NID_SYS, "PowerManager is serviced by common-service"); + r = pIpcClient->Construct(POWER_MANAGER_SERVICE_ID); SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "[%s] It failed to create IpcClient", GetErrorMessage(r)); requestMessage.Construct(); @@ -537,16 +529,8 @@ _PowerManagerImpl::SetScreenBrightness(int brightness) unique_ptr<_IpcClient> pIpcClient (new (std::nothrow) _IpcClient()); SysTryReturn(NID_SYS, pIpcClient != null, E_OUT_OF_MEMORY, r, "It is failed to create IPC instance."); -// if(Tizen::Io::File::IsFileExist(L"/opt/usr/etc/common_service_for_powermanager") == true) - { - SysLog(NID_SYS, "PowerManager is serviced by common-service"); - r = pIpcClient->Construct(POWER_MANAGER_SERVICE_ID); - } -/* else - { - r = pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID); - } -*/ + SysLog(NID_SYS, "PowerManager is serviced by common-service"); + r = pIpcClient->Construct(POWER_MANAGER_SERVICE_ID); SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "[%s] It failed to create IpcClient", GetErrorMessage(r)); requestMessage.Construct(); diff --git a/src/system/FSys_RuntimeClient.cpp b/src/system/FSys_RuntimeClient.cpp index 536d173..8f75f34 100644 --- a/src/system/FSys_RuntimeClient.cpp +++ b/src/system/FSys_RuntimeClient.cpp @@ -28,7 +28,7 @@ #include #include -#include "FSys_CommunicationDispatcherClient.h" +#include "FSys_SystemServiceMessageClient.h" #include "FSys_RuntimeClient.h" using namespace std; @@ -43,7 +43,7 @@ namespace Tizen { namespace System { static const int _RUNTIME_GET_PARAM_TYPE = 1; -static const wchar_t* _RUNTIME_SERVICE_ID = L"osp.system.service"; +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"; @@ -87,18 +87,16 @@ _RuntimeClient::GetInstance(void) _RuntimeClient::_RuntimeClient() : __msgCount(0) - , __pIpcClient(null) + , __pMessageClient(null) { result r = E_SUCCESS; static String RUNTIME_SERVICE_ID(_RUNTIME_SERVICE_ID); - _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); - SysTryCatch(NID_SYS, pCommunicationDispatcherClient != null, r = E_SYSTEM, r, "It is failed to get CommunicationDispatcherClient."); + __pMessageClient = _SystemServiceMessageClient::CreateInstance(RUNTIME_SERVICE_ID); + SysTryCatch(NID_SYS, __pMessageClient != null, r = E_SYSTEM, r, "It is failed to create SystemServiceMessageClient."); - r = pCommunicationDispatcherClient->RegisterCommunicationListener(RUNTIME_SERVICE_ID, *this); - SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on CommunicationDispatcherClient."); - - __pIpcClient = pCommunicationDispatcherClient->GetIpcClient(); + r = __pMessageClient->RegisterListener(RUNTIME_SERVICE_ID, *this); + SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on MessageClient."); __asyncEventList.Construct(); CATCH: @@ -109,14 +107,11 @@ _RuntimeClient::~_RuntimeClient() { result r = E_SUCCESS; String key(_RUNTIME_SERVICE_ID); - _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance(); - SysTryCatch(NID_SYS, pCommunicationDispatcherClient != null, r = E_SYSTEM, r, "It is failed to get CommunicationDispatcherClient."); - - r = pCommunicationDispatcherClient->UnregisterCommunicationListener(key); - SysTryCatch(NID_SYS, r == E_SUCCESS, r = E_SYSTEM, r, "It is failed to register on CommunicationDispatcherClient."); + 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); } @@ -143,12 +138,11 @@ _RuntimeClient::GetDirectorySizeValueAsync(const String& path, IRuntimeInfoGetLo requestMessages.Add(messageId); unique_ptr pMsg(new (std::nothrow) IoService_Request(requestMessages, &responseMessages)); - r = __pIpcClient->SendRequest(*pMsg); + r = __pMessageClient->GetIpcClient()->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."); - SysLog(NID_SYS, "Result is %ls.", pResult->GetPointer()); if(*pResult == _RUNTIME_RESULT_SUCCESS) r = E_SUCCESS; @@ -163,6 +157,7 @@ _RuntimeClient::GetDirectorySizeValueAsync(const String& path, IRuntimeInfoGetLo pEvent->AddListener(*listener); __asyncEventList.Add(new Integer(__msgCount), pEvent); + __msgCount++; } return r; diff --git a/src/system/FSys_RuntimeClient.h b/src/system/FSys_RuntimeClient.h index 82cd414..b865bfc 100644 --- a/src/system/FSys_RuntimeClient.h +++ b/src/system/FSys_RuntimeClient.h @@ -31,6 +31,7 @@ #include #include #include +#include "FSys_SystemServiceMessageClient.h" namespace Tizen { namespace System { @@ -53,8 +54,7 @@ private: private: Tizen::Base::Collection::HashMap __asyncEventList; int __msgCount; - Tizen::Io::_IpcClient* __pIpcClient; - + _SystemServiceMessageClient* __pMessageClient; static _RuntimeClient* __pRuntimeClient; }; diff --git a/src/system/FSys_RuntimeClientEx.cpp b/src/system/FSys_RuntimeClientEx.cpp deleted file mode 100644 index a50bb52..0000000 --- a/src/system/FSys_RuntimeClientEx.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// -// 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) - , __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."); - - __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); - 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 = __pMessageClient->GetIpcClient()->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 deleted file mode 100644 index a142856..0000000 --- a/src/system/FSys_RuntimeClientEx.h +++ /dev/null @@ -1,63 +0,0 @@ -// -// 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; - _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 a1e4d88..f750706 100644 --- a/src/system/FSys_RuntimeInfoImpl.cpp +++ b/src/system/FSys_RuntimeInfoImpl.cpp @@ -47,7 +47,6 @@ #include "FSys_EnvironmentImpl.h" #include "FSys_RuntimeInfoImpl.h" #include "FSys_RuntimeClient.h" -#include "FSys_RuntimeClientEx.h" using namespace Tizen::App; using namespace Tizen::Base; @@ -793,19 +792,8 @@ _RuntimeInfoImpl::GetValueAsync(const String& key, IRuntimeInfoGetLonglongAsyncR SysLog(NID_SYS, "%ls", directoryPath.GetPointer()); if(r == E_SUCCESS) { -// 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); - } -*/ + _RuntimeClient* pRuntimeClient = _RuntimeClient::GetInstance(); + pRuntimeClient->GetDirectorySizeValueAsync(directoryPath, listener); } return r; -- 2.7.4