*/
#include <FBaseSysLog.h>
+#include <FSecAccessController.h>
#include <FIo_IpcServer.h>
#include <FSec_AccessController.h>
SysTryCatch(NID_APP, __pAppManagerService != null, *pResException = E_SYSTEM, E_SYSTEM, "__pAppManagerService is null!");
SysLog(NID_APP, "app(%ls)", appId.GetPointer());
-/*
+
*pResException = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APPMANAGER_SETTING);
if (IsFailed(*pResException))
{
- SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", __pIpcServer->GetClientApplicationId().GetPointer());
*pResException = E_PRIVILEGE_DENIED;
return true;
}
-*/
+
*pRes = __pAppManagerService->IsUserPreferredAppForAppControlResolution(appId);
CATCH:
{
SysTryCatch(NID_APP, __pAppManagerService != null, *pRes = E_SYSTEM, E_SYSTEM, "__pAppManagerService is null!");
SysLog(NID_APP, "app(%ls)", appId.GetPointer());
-/*
+
*pRes = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APPMANAGER_SETTING);
if (IsFailed(*pRes))
{
- SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", __pIpcServer->GetClientApplicationId().GetPointer());
*pRes = E_PRIVILEGE_DENIED;
return true;
}
-*/
+
*pRes = __pAppManagerService->ClearUserPreferenceForAppControlResolution(appId);
CATCH:
{
SysTryReturn(NID_APP, __pAppManagerService != null, false,*pRes = E_SYSTEM, "__pAppManagerService is null!");
SysLog(NID_APP, "app(%ls)", appId.GetPointer());
-/*
- *pRes = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APP_LIFECYCLE_EVENT);
+
+ *pRes = AccessController::CheckPrivilege(__pIpcServer->GetClientPackageId(), L"http://developer.samsung.com/tizen/privilege/applifecycleevent");
if (IsFailed(*pRes))
{
- SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", __pIpcServer->GetClientApplicationId().GetPointer());
*pRes = E_PRIVILEGE_DENIED;
return true;
}
-*/
+
*pRes = __pAppManagerService->RegisterAppForAppLifecycleEvent(appId, __pIpcServer->GetClientId());
return true;
{
SysTryReturn(NID_APP, __pAppManagerService != null, false,*pRes = E_SYSTEM, "__pAppManagerService is null!");
SysLog(NID_APP, "app(%ls)", appId.GetPointer());
-/*
- *pRes = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APP_LIFECYCLE_EVENT);
+
+ *pRes = AccessController::CheckPrivilege(__pIpcServer->GetClientPackageId(), L"http://developer.samsung.com/tizen/privilege/applifecycleevent");
if (IsFailed(*pRes))
{
- SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", __pIpcServer->GetClientApplicationId().GetPointer());
*pRes = E_PRIVILEGE_DENIED;
return true;
}
-*/
+
*pRes = __pAppManagerService->UnregisterAppForAppLifecycleEvent(appId, __pIpcServer->GetClientId());
return true;