if (prop & _APPCONTROL_PROPERTY_ALIAS)
{
- SysLog(NID_APP, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
const _AppControlRegistry::_AppControlAliasEntry* pEntry = null;
pEntry = _AppControlRegistry::GetInstance()->GetReverseRuntimeAliasEntry(provider, oId);
if (pEntry)
SysLog(NID_APP, "Original AppControl name (%ls, %ls).", provider.GetPointer(), oId.GetPointer());
}
- SysLog(NID_APP, "CCCCCCCCCCCCCCCCCCCCCCCCCCCCC 0x%x", pEntry);
}
if (prop & _APPCONTROL_PROPERTY_APPID_CHANGE)
std::unique_ptr<HashMap> pMap(pResArg->GetArgMapN());
- AppCtrlResult ret = APP_CTRL_RESULT_FAILED;
- // to prevent enum overflow;
- int resCode = res;
- switch(resCode)
- {
- case SERVICE_RESULT_SUCCEEDED:
- ret = APP_CTRL_RESULT_SUCCEEDED;
- break;
- case SERVICE_RESULT_FAILED:
- ret = APP_CTRL_RESULT_CANCELED;
- break;
- case SERVICE_RESULT_CANCELED:
- ret = APP_CTRL_RESULT_ABORTED;
- break;
- case APPSVC_OSP_RES_FAIL:
- ret = APP_CTRL_RESULT_FAILED;
- break;
- case APPSVC_OSP_RES_TERMINATE:
- ret = APP_CTRL_RESULT_TERMINATED;
- break;
- default:
- ret = APP_CTRL_RESULT_FAILED;
- break;
- }
+ AppCtrlResult ret = _AppControlManager::ConvertAppControlResultCode(res);
SysLog(NID_APP, "Result code : 0x%x.", ret);
void
_AppControlManager::OnAppControlEventReceivedN(int reqId, int res, const IMap* pArgs)
{
- SysLog(NID_APP, "Received request Id %d, args 0x%x", reqId, pArgs);
+ SysLog(NID_APP, "Received request Id %d, res %d, args 0x%x", reqId, res, pArgs);
// process proper callback
_InProcessInfo* pInfo = __inAppManager.FindItem(reqId);
}
else
{
- pListener->OnAppControlCompleteResponseReceived(aId, oId, static_cast<AppCtrlResult>(res), pArgs);
+ pListener->OnAppControlCompleteResponseReceived(aId, oId, ConvertAppControlResultCode(res), pArgs);
SysLog(NID_APP, "OnAppControlCompleteResponseReceived called directly");
}
}
void
_AppControlManager::FinishAppControl(int reqId, int res, IMap* pMap)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_APP, "req %d, res %d.", reqId, res);
_NativeAppControlEventArg* pArg = new (std::nothrow) _NativeAppControlEventArg(reqId, res, pMap);
SysTryReturnVoidResult(NID_APP, pArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Return argument allocation failure.");
return false;
}
+
+AppCtrlResult
+_AppControlManager::ConvertAppControlResultCode(int resCode)
+{
+ AppCtrlResult ret = APP_CTRL_RESULT_FAILED;
+
+ switch(resCode)
+ {
+ case SERVICE_RESULT_SUCCEEDED:
+ ret = APP_CTRL_RESULT_SUCCEEDED;
+ break;
+ case SERVICE_RESULT_FAILED:
+ ret = APP_CTRL_RESULT_CANCELED;
+ break;
+ case SERVICE_RESULT_CANCELED:
+ ret = APP_CTRL_RESULT_ABORTED;
+ break;
+ case APPSVC_OSP_RES_FAIL:
+ ret = APP_CTRL_RESULT_FAILED;
+ break;
+ case APPSVC_OSP_RES_TERMINATE:
+ ret = APP_CTRL_RESULT_TERMINATED;
+ break;
+ default:
+ ret = APP_CTRL_RESULT_FAILED;
+ break;
+ }
+
+ return ret;
+}
+
+
void
_AppControlManager::OnAppControlResponseEventReceivedN(const Tizen::Base::Runtime::IEventArg* arg)
{