*/
int aul_kill_pid_async(pid_t pid, aul_result_cb callback, void *user_data);
+/**
+ * @Brief Called when the reply is delivered from the callee application.
+ * @since_tizen 8.0
+ * @param[in] b The bundle object
+ * @param[in] is_cancel If true, the request was cancelled
+ * @param[in] user_data The user data passed from the registration function
+ * @remarks This function is only for App Framework internally.
+ * @see aul_send_launch_request_for_uid()
+ */
+typedef void (*aul_reply_cb)(bundle *b, int is_cancel, void *user_data);
+
+/**
+ * @brief Sends the launch request asynchronously.
+ * @since_tizen 8.0
+ * @privilege %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @param[in] appid The application ID
+ * @param[in] b The bundle object
+ * @param[in] uid The target user ID
+ * @param[in] reply_cb The reply callback function
+ * @param[in] result_cb The result callback function
+ * @param[in] user_data The user data to be passed to the callback function
+ * @retrun @c 0 on success,
+ * otherwise a negative error value
+ * @retval #AUL_R_OK Successful
+ * @retval #AUL_R_EINVAL Invalid parameter
+ * @retval #AUL_R_ENOMEM Out of memory
+ * @retval #AUL_R_ERROR Internal I/O error
+ * @retval #AUL_R_ECOMM Communication error on send
+ * @retval #AUL_R_EILLACC Permission denied
+ * @remarks This function is only for App Framework internally.
+ * @see aul_reply_cb()
+ */
+int aul_send_launch_request_for_uid(const char *appid, bundle *b, uid_t uid,
+ aul_reply_cb reply_cb, aul_result_cb result_cb, void *user_data);
+
#ifdef __cplusplus
}
#endif
void (*callback)(bundle *, int, void *), void *data, uid_t uid);
int aul_resume_local(void);
int aul_launch_fini(void);
-int aul_send_launch_request_for_uid(const char *appid, bundle *b, uid_t uid,
- void (*reply_cb)(bundle *b, int, void *),
- void (*error_cb)(int, void *), void *user_data);
int aul_send_launch_request_sync_for_uid(const char *appid, bundle *b,
uid_t uid, bundle **res_b);
int app_request_local(int cmd, bundle *kb);
}
extern "C" API int aul_send_launch_request_for_uid(const char* appid,
- bundle* b, uid_t uid, void (*reply_cb)(bundle*, int, void*),
- void (*error_cb)(int, void*), void* user_data) {
+ bundle* b, uid_t uid, aul_reply_cb reply_cb,
+ aul_result_cb result_cb, void* user_data) {
return __send_request_with_callback(APP_SEND_LAUNCH_REQUEST, appid, b,
- uid, reply_cb, error_cb, user_data);
+ uid, reply_cb, result_cb, user_data);
}
extern "C" API int aul_send_launch_request_sync_for_uid(const char* appid,