if ((ret = __app_send_raw(pid, APP_TERM_REQ_BY_PID, (unsigned char *)&dummy, sizeof(int))) < 0) {
_D("terminate req packet send error");
}
+ break;
+ case APP_TERM_BY_PID_ASYNC:
+ if ((ret = __app_send_raw_with_noreply(pid, cmd, (unsigned char *)&dummy, sizeof(int))) < 0) {
+ _D("terminate req packet send error");
+ }
+ __real_send(clifd, ret);
+ break;
}
return ret;
case APP_RESUME_BY_PID:
case APP_KILL_BY_PID:
case APP_TERM_REQ_BY_PID:
+ case APP_TERM_BY_PID_ASYNC:
kb = bundle_decode(pkt->data, pkt->len);
appid = (char *)bundle_get_val(kb, AUL_K_APPID);
ret = __app_process_by_pid(pkt->cmd, appid, &cr, clifd);
APP_RELEASED,
APP_RUNNING_LIST_UPDATE,
APP_TERM_REQ_BY_PID,
+ APP_TERM_BY_PID_ASYNC,
/* reserved for AMD Agent */
APP_DEAD_SIGNAL,
#define EILLEGALACCESS 127
#define ETERMINATING 126
#define ENOLAUNCHPAD 125
+#define EREJECTED 123
typedef struct _app_pkt_t {
int cmd;
* @brief Return values in AUL.
*/
typedef enum _aul_return_val {
- AUL_R_ENOAPP = -11, /**< Failed to find app ID or pkg ID */
+ AUL_R_EREJECTED = -14, /**< App disable for mode */
+ AUL_R_ENOAPP = -13, /**< Failed to find app ID or pkg ID */
+ AUL_R_EHIDDENFORGUEST = -11, /**< App hidden for guest mode */
AUL_R_ENOLAUNCHPAD = -10, /**< no launchpad */
AUL_R_ETERMINATING = -9, /**< application terminating */
AUL_R_EILLACC = -8, /**< Illegal Access */
* If you have not the permission, this API return AUL_R_ERROR. \n
*/
int aul_terminate_pid(int pid);
+int aul_terminate_pid_async(int pid);
/** @} */
case -ENOLAUNCHPAD:
res = AUL_R_ENOLAUNCHPAD;
break;
+ case -EREJECTED:
+ res = AUL_R_EREJECTED;
+ break;
default:
res = AUL_R_ERROR;
}
return -1;
}
- if (pkt->cmd != APP_RESULT && pkt->cmd != APP_CANCEL) {
+ if (pkt->cmd != APP_RESULT && pkt->cmd != APP_CANCEL && pkt->cmd != APP_TERM_BY_PID_ASYNC) {
ret = __send_result_to_launchpad(clifd, 0);
if (ret < 0) {
free(pkt);
break;
case APP_TERM_BY_PID: /* run in callee */
+ case APP_TERM_BY_PID_ASYNC:
app_terminate();
break;
return ret;
}
+SLPAPI int aul_terminate_pid_async(int pid)
+{
+ char pkgname[MAX_PID_STR_BUFSZ];
+ int ret;
+
+ if (pid <= 0)
+ return AUL_R_EINVAL;
+
+ snprintf(pkgname, MAX_PID_STR_BUFSZ, "%d", pid);
+ ret = app_request_to_launchpad(APP_TERM_BY_PID_ASYNC, pkgname, NULL);
+ return ret;
+}
+
SLPAPI int aul_kill_pid(int pid)
{
char pkgname[MAX_PID_STR_BUFSZ];