* @brief This is the implementation file for _CommunicationDispatcherClient class.
*/
+#include <FApp_AppInfo.h>
#include <FBaseSysLog.h>
#include <unistd.h>
#include <sys/types.h>
#include "FSys_CommunicationDispatcherClient.h"
+using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Io;
namespace Tizen { namespace System
{
-
+static const wchar_t* _APPLICATION_ID_APP_SERVICE = L"aospd000043.osp-app-service";
bool ipcReady = false;
static const wchar_t* _COMMUNICATION_DISPATCHER_IPC_ID = L"osp.app.ipcserver.communicationdispatcher";
result r = E_SUCCESS;
- if(getuid() != 0)
+ if(_AppInfo::GetAppInfo()->GetApplicationId() != _APPLICATION_ID_APP_SERVICE)
{
__pIpcClient = new (std::nothrow) _IpcClient();
SysTryCatch(NID_SYS, __pIpcClient != null, , r, "It is failed to create IPC client");
ipcReady = false;
else
ipcReady = true;
- SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r));
+ SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is required by osp-app-service.");
}
CATCH: