Move function definition to aul header 92/293792/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Jun 2023 06:16:16 +0000 (06:16 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Jun 2023 06:16:16 +0000 (06:16 +0000)
To export the function, the aul_send_launch_request_for_uid() function
is moved to the aul.h file.

Change-Id: I2808d3f3b445cac770a1aec040b0a9c324a2c96c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/aul.h
src/launch.h
src/launch_with_result.cc

index d4e0ce8..9366e13 100644 (file)
@@ -3232,6 +3232,42 @@ int aul_terminate_app_async(const char *appid, aul_result_cb callback, void *use
  */
 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
index 6bd31cd..50919ae 100644 (file)
@@ -49,9 +49,6 @@ int aul_launch_app_with_result_async_for_uid(const char *appid, bundle *b,
                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);
index 7cec306..1bbca55 100644 (file)
@@ -765,10 +765,10 @@ extern "C" API int aul_launch_app_with_result_async_for_uid(const char* appid,
 }
 
 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,