- This API gets specified application process id.
Change-Id: I7b9b40fedbd8cb752225d75ae20801f7cb826105
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
[APP_GET_STATUS] = __dispatch_app_get_status,
[APP_ADD_LOADER] = __dispatch_app_add_loader,
[APP_REMOVE_LOADER] = __dispatch_app_remove_loader,
[APP_GET_STATUS] = __dispatch_app_get_status,
[APP_ADD_LOADER] = __dispatch_app_add_loader,
[APP_REMOVE_LOADER] = __dispatch_app_remove_loader,
+ [APP_GET_PID] = __dispatch_app_is_running,
[AMD_RELOAD_APPINFO] = __dispatch_amd_reload_appinfo,
[AGENT_DEAD_SIGNAL] = __dispatch_agent_dead_signal,
};
[AMD_RELOAD_APPINFO] = __dispatch_amd_reload_appinfo,
[AGENT_DEAD_SIGNAL] = __dispatch_agent_dead_signal,
};
APP_GET_SOCKET_PAIR,
APP_ADD_LOADER,
APP_REMOVE_LOADER,
APP_GET_SOCKET_PAIR,
APP_ADD_LOADER,
APP_REMOVE_LOADER,
/* for special purpose */
AMD_RELOAD_APPINFO,
/* for special purpose */
AMD_RELOAD_APPINFO,
*/
int aul_remove_loader(int loader_id);
*/
int aul_remove_loader(int loader_id);
+/**
+ * @par Description
+ * This API gets specified application process id.
+ * @par Purpose:
+ * The purpose of this API is to get the pid of specified application.
+ *
+ * @param[in] appid application name
+ * @return callee's pid if success, negative value(<0) if fail
+ *
+ * @remark
+ * This API is only available in User Session.
+ */
+int aul_app_get_pid(const char *appid);
static const char *__appid = NULL;
static const char *__pkgid = NULL;
static const char *__appid = NULL;
static const char *__pkgid = NULL;
+SLPAPI int aul_app_get_pid(const char *appid)
+{
+ int ret = 0;
+
+ if (appid == NULL)
+ return -1;
+
+ ret = __app_send_raw(AUL_UTIL_PID, APP_GET_PID, (unsigned char *)appid,
+ strlen(appid));
+
+ return ret;
+}
+
SLPAPI int aul_app_is_running(const char *appid)
{
int ret = 0;
SLPAPI int aul_app_is_running(const char *appid)
{
int ret = 0;
+static int get_pid()
+{
+ static int num = 0;
+
+ printf("[aul_app_get_pid %d test] %s \n", num++, gargv[2]);
+ return aul_app_get_pid(gargv[2]);;
+}
+
static int update_running_list()
{
aul_running_list_update(gargv[2], gargv[3], gargv[4]);
static int update_running_list()
{
aul_running_list_update(gargv[2], gargv[3], gargv[4]);
"[usage] reload"},
{"get_status_pid", get_status_pid, "aul_app_get_status_bypid test",
"[usage] get_status_pid <pid>"},
"[usage] reload"},
{"get_status_pid", get_status_pid, "aul_app_get_status_bypid test",
"[usage] get_status_pid <pid>"},
+ {"get_pid", get_pid, "aul_app_get_pid test",
+ "[usage] get_pid <appid>"},
};
int callfunc(char *testname)
};
int callfunc(char *testname)