namespace Tizen { namespace System
{
+bool ipcReady = false;
static const wchar_t* _COMMUNICATION_DISPATCHER_IPC_ID = L"osp.app.ipcserver.communicationdispatcher";
_CommunicationDispatcherClient* _CommunicationDispatcherClient::__pCommunicationDispatcherClient = null;
SysTryCatch(NID_SYS, __pIpcClient != null, , r, "It is failed to create IPC client");
r = __pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID, this);
+ if(r != E_SUCCESS)
+ ipcReady = false;
+ else
+ ipcReady = true;
SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r));
CATCH:
_IpcClient*
_CommunicationDispatcherClient::GetIpcClient()
{
+ if(ipcReady == false)
+ return null;
+
return __pIpcClient;
}
String commandId(_SYSTEM_COMMAND_GET_BOOL);
_CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
+ SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher.");
__pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
+ SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client.");
ArrayList requestMessages;
ArrayList responseMessages;
String commandId(_SYSTEM_COMMAND_GET_INT);
_CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
+ SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher.");
__pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
+ SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client.");
ArrayList requestMessages;
ArrayList responseMessages;
SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, "Result value[%ls] convert is failed.", pValue->GetPointer());
responseMessages.RemoveAll(true);
+
return r;
}
String commandId(_SYSTEM_COMMAND_GET_STRING);
_CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
+ SysTryReturnResult(NID_SYS, pCommunicationDispatcherClient != null, E_SYSTEM, "It is failed to get Communication Dispatcher.");
__pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
+ SysTryReturnResult(NID_SYS, __pIpcClient != null, E_SYSTEM, "It is failed to get IPC client.");
ArrayList requestMessages;
ArrayList responseMessages;
String valStr;
r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " RegistryImpl construct It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " RegistryImpl construct is failed");
r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " Registry GetValue It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " Registry GetValue is failed");
if(valStr == L"true" || valStr == L"false")
{
_RegistryImpl _reg;
String valStr;
r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed");
r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue It is failed");
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed");
r = Integer::Parse(valStr, value);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, " Integer::Parse() It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, " Integer::Parse() is failed");
return E_SUCCESS;
}
_RegistryImpl _reg;
String valStr;
r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed");
r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue It is failed");
- SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue It is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed");
+ SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed");
if(valStr == L"true")
{
value = true;