Fix the description for aul_listen_app_status_signal 75/185575/1
authorJunghoon Park <jh9216.park@samsung.com>
Wed, 1 Aug 2018 01:01:32 +0000 (10:01 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 1 Aug 2018 01:01:32 +0000 (10:01 +0900)
Change-Id: Idc2906094f21e42918ef8355c14f5b0334139aa5
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
include/aul.h

index f9f9296..3864465 100644 (file)
@@ -96,6 +96,14 @@ typedef enum aul_widget_instance_event {
        AUL_WIDGET_INSTANCE_EVENT_CREATE_ABORTED = 11
 } aul_widget_instance_event_e;
 
+typedef enum _aul_process_status {
+       AUL_PROC_STATUS_LAUNCH = 0,
+       AUL_PROC_STATUS_FG = 3,
+       AUL_PROC_STATUS_BG = 4,
+       AUL_PROC_STATUS_FOCUS = 5,
+       AUL_PROC_STATUS_HIDE = 7
+} aul_process_status_e;
+
 /** AUL public key - To check caller's secuirty */
 #define AUL_K_CALLER_PID       "__AUL_CALLER_PID__"
 /** AUL public key - To check callee's secuirty */
@@ -2461,11 +2469,14 @@ int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
  * @par Purpose:
  *     This API is for monitoring the status of all applications.
  *
- * @param[in]  func            callback function
+ * @param[in]  func            callback function. Please refer to 'app_status_handler' below.
  * @param[in]  data            user data
  * @return     0 if success, negative value if fail
  * @retval     AUL_R_OK        - success
  * @retval     AUL_R_ERROR     - general error
+ * @remark
+ *     The callback will be invoked asynchronously.
+ *     It can't guarantee that the real status would not be changed during the callback is called.
  *
  * @code
  * #include <aul.h>
@@ -2475,20 +2486,23 @@ int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
  *     const char *app_status;
  *
  *     switch (status) {
- *     case 0:
- *             app_status = "STATUS_LAUNCHING";
+ *     case AUL_PROC_STATUS_LAUNCH:
+ *             app_status = "LAUNCHING";
+ *             break;
+ *     case AUL_PROC_STATUS_FG:
+ *             app_status = "VISIBLE";
  *             break;
- *     case 3:
- *             app_status = "STATUS_VISIBLE";
+ *     case AUL_PROC_STATUS_BG:
+ *             app_status = "BACKGROUND";
  *             break;
- *     case 4:
- *             app_status = "STATUS_BACKGROUND";
+ *     case AUL_PROC_STATUS_FOCUS:
+ *             app_status = "FOCUS";
  *             break;
- *     case 5:
- *             app_status = "STATUS_FOCUS";
+ *     case AUL_PROC_STATUS_HIDE:
+ *             app_status = "HIDE";
  *             break;
  *     default:
- *             app_status = "STATUS_UNKNOWN";
+ *             app_status = "UNKNOWN";
  *     }
  *
  *     printf("pid: %d, status: %s", pid, status);