#include "FSys_Types.h"
#include "FSys_SystemClient.h"
+#include "FSys_CommunicationDispatcherClient.h"
using namespace std;
namespace Tizen { namespace System
{
-static const wchar_t* _REGISTRY_PATH = L"/tmp/osp/system_info_cache.ini";
+static const wchar_t* _REGISTRY_PATH = L"/opt/usr/etc/system_info_cache.ini";
static const wchar_t* _SYSTEM_INFO_SESSION = L"SystemInformation";
//Bluetooth
static const wchar_t* _NETWORK_EMERGENCY = L"Emergency";
static const wchar_t* _NETWORK_NO_SERVICE = L"NoService";
-
//WIFI
static const wchar_t* _WIFI = L"http://tizen.org/feature/network.wifi";
static const wchar_t* _WIFI_SUPPORTED = L"WiFiSupported";
else
{
r = GetFromRegistry(tizenKey, value);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
- r = E_SUCCESS;
+ if(r != E_SUCCESS)
+ {
+ _SystemClient* pSystemClient = _SystemClient::GetInstance();
+ r = pSystemClient->GetValue(key, value);
+ }
}
if( r == E_SUCCESS)
{
return r;
}
-
result
_SystemInfoImpl::GetSysInfo(const String& key, int& value)
{
if(pValue != null)
{
value = pValue->value;
+ return E_SUCCESS;
}
if (key == _CAMERA_COUNT)
else
{
r = GetFromRegistry(tizenKey, value);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
+ if(r != E_SUCCESS)
+ {
+ _SystemClient* pSystemClient = _SystemClient::GetInstance();
+ r = pSystemClient->GetValue(key, value);
+ }
}
if(r == E_SUCCESS)
return r;
}
-
result
_SystemInfoImpl::GetSysInfo(const String& key, long long& value)
{
return E_OBJ_NOT_FOUND;
}
-
result
_SystemInfoImpl::GetSysInfo(const String& key, double& value)
{
return E_OBJ_NOT_FOUND;
}
-
result
_SystemInfoImpl::GetSysInfo(const String& key, bool& value)
{
if(pValue != null)
{
value = pValue->value;
+ return E_SUCCESS;
}
-
r = GetFromRegistry(tizenKey, value);
+ if(r != E_SUCCESS)
+ {
+ _SystemClient* pSystemClient = _SystemClient::GetInstance();
+ r = pSystemClient->GetValue(key, value);
+ }
SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
if(r == E_SUCCESS)
return r;
}
-
result
_SystemInfoImpl::GetSysInfo(const String& key, UuId& value)
{
return E_OBJ_NOT_FOUND;
}
-
Collection::IList*
_SystemInfoImpl::GetSysInfoValuesN(const String& key, SystemInfoValueType type)
{
ArrayList requestMessage;
ArrayList responseMessage;
- 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.");
+ _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
- r = pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID);
- SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "It is failed to create IpcClient. [%s]", GetErrorMessage(r));
+ _IpcClient* pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
+ SysTryReturn(NID_SYS, pIpcClient != null, E_OUT_OF_MEMORY, r, "It is failed to create IPC instance.");
requestMessage.Construct();
responseMessage.Construct();
result
_SystemInfoImpl::GetFromRegistry(const String& key, bool& value)
{
-/*
- _SystemClient* pSystemClient = _SystemClient::GetInstance();
- pSystemClient->GetValue(key, value);
-*/
result r = E_SUCCESS;
_RegistryImpl _reg;
String valStr;