int ITc_app_manager_request_terminate_bg_app_p(void)
{
START_TEST;
-
+
int nRet = APP_MANAGER_ERROR_NONE;
app_context_h pAppContext;
app_control_h hAppControl = NULL;
nRet = app_control_send_launch_request(hAppControl , NULL , NULL);
sleep(1);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_control_send_launch_request", AppManagerGetError(nRet), app_control_destroy(hAppControl));
-
+
nRet = app_manager_get_app_context((const char *)TEST_APPMANAGERTESTFILE_APPID , &pAppContext);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_app_context", AppManagerGetError(nRet), app_control_send_terminate_request(hAppControl);app_control_destroy(hAppControl));
if(NULL == pAppContext)
app_control_destroy(hAppControl);
return 1;
}
-
+
nRet = app_control_send_terminate_request(hAppControl);
sleep(1);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_control_send_terminate_request", AppManagerGetError(nRet), app_control_destroy(hAppControl));
-
+
nRet = app_manager_request_terminate_bg_app(pAppContext);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_request_terminate_bg_app", AppManagerGetError(nRet), app_control_destroy(hAppControl));
nRet = app_control_destroy(hAppControl);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_control_destroy", AppManagerGetError(nRet));
-
+
return 0;
}
return 1;
}
- FREE_MEMORY(pszAppID);
+ FREE_MEMORY(pszAppID);
nRet = app_context_destroy(pstAppContext);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_context_destroy", AppManagerGetError(nRet));
return 0;
return 1;
}
- nRet = app_manager_resume_app(pstOpenAppContext);
+ nRet = app_manager_resume_app(pstOpenAppContext);
if ( nRet != APP_MANAGER_ERROR_NONE )
{
FPRINTF("[Line : %d][%s] app_manager_resume_app error returned = %s\\n", __LINE__, API_NAMESPACE, AppManagerGetError(nRet));
int nRet = app_manager_get_shared_resource_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_resource_path", AppManagerGetError(nRet));
- CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_resource_path");
- FREE_MEMORY(pszSharePath);
+ CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_resource_path");
+ FREE_MEMORY(pszSharePath);
return 0;
}
// Target API
int nRet = app_manager_get_shared_trusted_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_trusted_path", AppManagerGetError(nRet));
- CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_trusted_path");
- FREE_MEMORY(pszSharePath);
+ CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_trusted_path");
+ FREE_MEMORY(pszSharePath);
return 0;
}
// Target API
int nRet = app_manager_get_shared_data_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_data_path", AppManagerGetError(nRet));
- CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_data_path");
- FREE_MEMORY(pszSharePath);
+ CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_data_path");
+ FREE_MEMORY(pszSharePath);
return 0;
}
char *pszSharePath = NULL;
int nRet = app_manager_get_external_shared_data_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath);
- PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_external_shared_data_path", AppManagerGetError(nRet));
- CHECK_VALUE_STRING(pszSharePath, "app_manager_get_external_shared_data_path");
- FREE_MEMORY(pszSharePath);
+ PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_external_shared_data_path", AppManagerGetError(nRet));
+ CHECK_VALUE_STRING(pszSharePath, "app_manager_get_external_shared_data_path");
+ FREE_MEMORY(pszSharePath);
return 0;
}
app_manager_event_h hEventHandle = NULL;
- int nRet = app_manager_event_create(&hEventHandle);
- PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
+ int nRet = app_manager_event_create(&hEventHandle);
+ PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
CHECK_HANDLE(hEventHandle, "app_manager_event_create");
-
+
nRet = app_manager_event_destroy(hEventHandle);
PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet));
-
+
return 0;
}
//& type: auto
{
START_TEST;
- app_manager_event_h hEventHandle = NULL;
+ app_manager_event_h hEventHandle = NULL;
int nEnumStartCount;
-
+
int nStatusOption[] = {
APP_MANAGER_EVENT_STATUS_TYPE_ALL ,
APP_MANAGER_EVENT_STATUS_TYPE_ENABLE,
};
int nStatusOptionCount = sizeof(nStatusOption) / sizeof(nStatusOption[0]);
- int nRet = app_manager_event_create(&hEventHandle);
- PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
+ int nRet = app_manager_event_create(&hEventHandle);
+ PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
CHECK_HANDLE(hEventHandle, "app_manager_event_create");
-
+
for(nEnumStartCount = 0 ; nEnumStartCount < nStatusOptionCount ; nEnumStartCount++ )
- {
+ {
FPRINTF("Status = [%s] \\n" ,AppManagerGetStaus(nStatusOption[nEnumStartCount]));
//Target API
- nRet = app_manager_event_set_status(hEventHandle,nStatusOption[nEnumStartCount]);
+ nRet = app_manager_event_set_status(hEventHandle,nStatusOption[nEnumStartCount]);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_set_status", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle));
}
-
+
nRet = app_manager_event_destroy(hEventHandle);
- PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet));
-
+ PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet));
+
return 0;
}
int ITc_app_manager_set_unset_event_cb_p(void)
{
START_TEST;
- int nTimeoutId = 0;
app_manager_event_h hEventHandle = NULL;
g_bAppManagerCallback = false;
- int nRet = app_manager_event_create(&hEventHandle);
- PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
+ int nRet = app_manager_event_create(&hEventHandle);
+ PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet));
CHECK_HANDLE(hEventHandle, "app_manager_event_create");
//Target API
nRet = app_manager_set_event_cb(hEventHandle,AppManagerEventCallback,NULL);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_set_event_cb", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle));
-
+
//Callback hit is not checked as there is no way or such APIs to check invocation of callback registered - discussed with developer
-
+
/*RUN_POLLING_LOOP;
if ( g_bAppManagerCallback == false )
{
//Target API
nRet = app_manager_unset_event_cb(hEventHandle);
PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_unset_event_cb", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle));
-
+
nRet = app_manager_event_destroy(hEventHandle);
- PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet));
-
+ PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet));
+
return 0;
}