Handle widget abnormal exit
[platform/core/appfw/aul-1.git] / include / aul.h
index c1ea180..b0041b4 100644 (file)
@@ -17,8 +17,7 @@
  *
  */
 
-#ifndef __AUL_H__
-#define __AUL_H__
+#pragma once
 
 #include <errno.h>
 #include <bundle.h>
@@ -32,6 +31,7 @@ extern "C" {
  * @brief Return values in AUL.
  */
 typedef enum _aul_return_val {
+       AUL_R_ENOENT = -15,             /**< App directory entry error */
        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 */
@@ -46,7 +46,7 @@ typedef enum _aul_return_val {
        AUL_R_ENOINIT = -2,             /**< AUL handler NOT initialized */
        AUL_R_ERROR = -1,               /**< General error */
        AUL_R_OK = 0                    /**< General success */
-}aul_return_val;
+} aul_return_val;
 
 enum app_status {
        STATUS_LAUNCHING,
@@ -57,16 +57,44 @@ enum app_status {
        STATUS_DYING,
        STATUS_HOME,
        STATUS_NORESTART,
-       STATUS_SERVICE
+       STATUS_SERVICE,
+       STATUS_TERMINATE,
 };
 
-typedef enum _aul_type{
+typedef enum _aul_type {
        AUL_START,
        AUL_RESUME,
        AUL_TERMINATE,
        AUL_TERMINATE_BGAPP,
        AUL_PAUSE,
-}aul_type;
+       AUL_WAKE,
+       AUL_SUSPEND,
+       AUL_WIDGET_CONTENT,
+       AUL_UPDATE_REQUESTED,
+} aul_type;
+
+typedef enum aul_widget_lifecycle_event {
+       AUL_WIDGET_LIFE_CYCLE_EVENT_APP_DEAD = 0,
+       AUL_WIDGET_LIFE_CYCLE_EVENT_CREATE  = 1,    /**< The widget is created */
+       AUL_WIDGET_LIFE_CYCLE_EVENT_DESTROY = 2,    /**< The widget is destroyed */
+       AUL_WIDGET_LIFE_CYCLE_EVENT_PAUSE   = 3,    /**< The widget is paused */
+       AUL_WIDGET_LIFE_CYCLE_EVENT_RESUME  = 4    /**< The widget is resumed */
+} aul_widget_lifecycle_event_e;
+
+typedef enum aul_widget_instance_event {
+       AUL_WIDGET_INSTANCE_EVENT_CREATE = 0,
+       AUL_WIDGET_INSTANCE_EVENT_DESTROY = 1,
+       AUL_WIDGET_INSTANCE_EVENT_TERMINATE = 2,
+       AUL_WIDGET_INSTANCE_EVENT_PAUSE = 3,
+       AUL_WIDGET_INSTANCE_EVENT_RESUME = 4,
+       AUL_WIDGET_INSTANCE_EVENT_UPDATE = 5,
+       AUL_WIDGET_INSTANCE_EVENT_PERIOD_CHANGED = 6,
+       AUL_WIDGET_INSTANCE_EVENT_SIZE_CHANGED = 7,
+       AUL_WIDGET_INSTANCE_EVENT_EXTRA_UPDATED = 8,
+       AUL_WIDGET_INSTANCE_EVENT_FAULT = 9,
+       AUL_WIDGET_INSTANCE_EVENT_APP_RESTART_REQUEST = 10,
+       AUL_WIDGET_INSTANCE_EVENT_CREATE_ABORTED = 11
+} aul_widget_instance_event_e;
 
 /** AUL public key - To check caller's secuirty */
 #define AUL_K_CALLER_PID       "__AUL_CALLER_PID__"
@@ -113,7 +141,22 @@ typedef enum _aul_type{
 /** AUL public key - To support rua stat */
 #define AUL_SVC_K_RUA_STAT_CALLER "__K_RUA_STAT_CALLER__"
 #define AUL_SVC_K_RUA_STAT_TAG    "__K_RUA_STAT_TAG__"
-
+/** AUL public key - To support rua delete */
+#define AUL_K_RUA_PKGNAME "__K_RUA_PKGNAME"
+/** AUL public key - To support rua delete */
+#define AUL_K_RUA_APPPATH "__K_RUA_APPPATH"
+/** AUL public key - To support rua add */
+#define AUL_K_RUA_ARG "__K_RUA_ARG"
+/** AUL public key - To support rua add */
+#define AUL_K_RUA_TIME "__K_RUA_TIME"
+/** AUL public bundle value */
+#define AUL_K_RUA_INSTANCE_ID "__K_RUA_INSTANCE_ID"
+/** AUL public bundle value */
+#define AUL_K_RUA_INSTANCE_NAME "__K_RUA_INSTANCE_NAME"
+/** AUL public bundle value */
+#define AUL_K_RUA_ICON "__K_RUA_ICON"
+/** AUL public bundle value */
+#define AUL_K_RUA_URI "__K_RUA_URI"
 
 /** AUL internal private key */
 #define AUL_K_PKG_NAME         "__AUL_PKG_NAME__"
@@ -161,6 +204,77 @@ typedef enum _aul_type{
 #define AUL_K_LOADER_ID                "__AUL_LOADER_ID__"
 /** AUL internal private key */
 #define AUL_K_LOADER_PATH      "__AUL_LOADER_PATH__"
+/** AUL internal private key */
+#define AUL_K_LOADER_EXTRA     "__AUL_LOADER_EXTRA__"
+/** AUL internal private key */
+#define AUL_K_LOADER_NAME      "__AUL_LOADER_NAME__"
+/** AUL internal private key */
+#define AUL_K_WAYLAND_DISPLAY  "__AUL_WAYLAND_DISPLAY__"
+/** AUL internal private key */
+#define AUL_K_WAYLAND_WORKING_DIR "__AUL_WAYLAND_WORKING_DIR__"
+/** AUL internal private key */
+#define AUL_K_COM_SENDER_PID   "__AUL_COM_SENDER_PID__"
+/** AUL internal private key */
+#define AUL_K_COM_ENDPOINT     "__AUL_COM_ENDPOINT__"
+/** AUL internal private key */
+#define AUL_K_COM_PRIVILEGE    "__AUL_COM_PRIVILEGE__"
+/** AUL internal private key */
+#define AUL_K_COM_PROPAGATE    "__AUL_COM_PROPAGATE__"
+/** AUL internal private key */
+#define AUL_K_COM_FILTER       "__AUL_COM_FILTER__"
+/** AUL internal private key */
+#define AUL_K_COM_RESULT       "__AUL_COM_RESULT__"
+/** AUL internal private key */
+#define AUL_K_ROOT_PATH                "__AUL_ROOT_PATH__"
+/** AUL internal private key */
+#define AUL_K_SEQ_NUM          "__AUL_SEQ_NUM__"
+/** AUL internal private key */
+#define AUL_K_API_VERSION      "__AUL_API_VERSION__"
+/** AUL internal private key */
+#define AUL_K_ALLOWED_BG       "__AUL_ALLOWED_BG__"
+/** AUL internal private key */
+#define AUL_K_OWNER_PID                "__AUL_OWNER_PID__"
+/** AUL internal private key */
+#define AUL_K_CHILD_PID                "__AUL_CHILD_PID__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_VIEWER    "__AUL_WIDGET_VIEWER__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_ID                "__AUL_WIDGET_ID__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_INSTANCE_ID       "__AUL_WIDGET_INSTANCE_ID__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_STATUS            "__AUL_WIDGET_STATUS__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_CONTENT_INFO      "__AUL_WIDGET_CONTENT_INFO__"
+/** AUL internal private key */
+#define AUL_K_TARGET_PID       "__AUL_TARGET_PID__"
+/** AUL internal private key */
+#define AUL_K_ALIAS_APPID      "__AUL_ALIAS_APPID__"
+/** AUL internal private key */
+#define AUL_K_ORG_APPID                "__AUL_ORG_APPID__"
+/** AUL internal private key */
+#define AUL_K_STATUS           "__AUL_STATUS__"
+/** AUL internal private key */
+#define AUL_K_IS_SUBAPP                "__AUL_IS_SUBAPP__"
+/** AUL internal private key */
+#define AUL_K_INSTANCE_ID      "__AUL_INSTANCE_ID__"
+/** AUL internal private key */
+#define AUL_K_ORG_CALLER_UID   "__AUL_ORG_CALLER_UID__"
+/** AUL internal private key */
+#define AUL_K_CHECKSUM         "__AUL_CHECKSUM__"
+/** AUL internal private key */
+#define AUL_K_PRIVATE          "__AUL_PRIVATE__"
+/** AUL internal private key */
+#define AUL_K_SCREEN_TYPE      "__AUL_SCREEN_TYPE__"
+/** AUL internal private key */
+#define AUL_K_VIEWER_REF       "__AUL_VIEWER_REF__"
+/** AUL internal private key */
+#define AUL_K_PARENT_APPID     "__AUL_PARENT_APPID__"
+/** AUL internal private key */
+#define AUL_K_CHILD_APPID      "__AUL_CHILD_APPID__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_FAULT     "__AUL_WIDGET_FAULT__"
+
 
 /**
  * @brief      This is callback function for aul_launch_init
@@ -168,7 +282,7 @@ typedef enum _aul_type{
  * @param[in]  b       In case of RESET events, bundle which is received from peer
  * @param[in]  data    user-supplied data
  */
-typedef int (*aul_handler_fn) (aul_type type, bundle * b, void *data);
+typedef int (*aul_handler_fn)(aul_type type, bundle *b, void *data);
 
 /**
  * @par Description:
@@ -443,6 +557,36 @@ int aul_open_app(const char *appid);
 
 /**
  * @par Description:
+ *  This API launches application, as menu screen launches the app.
+ *  Thus, if the applocation is running, this API sends a RESUME event to the app.
+ *  If the application is not running, this API launches the app.
+ *  While the application is running, if the application cannot receive the RESUME event,
+ *  AUL tries to raise the application's default window.
+ *
+ * @par Purpose:
+ *      This API is for caller.
+ *      This API's purpose is to resume/launch application
+ * @par Typical use case:
+ *     If you only want to show application with previous state or default state, Use this API.
+ *
+ * @param[in]  pkgname         package name to be resume as callee
+ * @param[in]  uid             User ID
+ * @return     callee's pid if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild package name
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ *
+ * @remark
+ *     If you don't want to launch the app,
+ *     you should check app's running state with aul_app_is_running.
+ *     This API will launch the application if the application is not running.
+ *     This API is only available to System user.
+ */
+int aul_open_app_for_uid(const char *appid, uid_t uid);
+
+/**
+ * @par Description:
  *     This API trigger to resume application
  *     If the application is running, this API send a resume event to the App.
  *     If the application is not running, this API returns fail.
@@ -489,6 +633,37 @@ int aul_resume_app(const char *appid);
 /**
  * @par Description:
  *     This API trigger to resume application
+ *     If the application is running, this API send a resume event to the App.
+ *     If the application is not running, this API returns fail.
+ *     Although the application is running, if the application cannot receive resume event,
+ *     AUL try to raise the application's default windows.
+ * @par Purpose:
+ *      This API is for caller.
+ *      This API's purpose is to send resume event.
+ * @par Typical use case:
+ *     If you only want to show application with previous state or default state, Use this API.
+ *
+ * @param[in]  pkgname         package name to be resume as callee
+ * @param[in]  uid             User ID
+ * @return     callee's pid if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild package name
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ *
+ * @remark
+ *     If you don't want to launch the app,
+ *     you should check app's running state with aul_app_is_running.
+ *     This API will launch the application if the application is not running.
+ *     If you want to only resume without launching in multiple instance application model,
+ *     you should use aul_resume_pid.
+ *     This API is only available to System user.
+ */
+int aul_resume_app_for_uid(const char *appid, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API trigger to resume application
  *     If the application is running, this API send a resume event to the App.
  *     If the application is not running, this API return AUL_R_ERROR.
  *     Although the application is running, if the application cannot receive resume event,
@@ -532,6 +707,33 @@ int aul_resume_pid(int pid);
 
 /**
  * @par Description:
+ *     This API trigger to resume application
+ *     If the application is running, this API send a resume event to the App.
+ *     If the application is not running, this API return AUL_R_ERROR.
+ *     Although the application is running, if the application cannot receive resume event,
+ *     AUL try to raise the application's default windows.
+ * @par Purpose:
+ *      This API is for caller.
+ *      This API's purpose is to send resume event.
+ * @par Typical use case:
+ *     In multiple application model, If you want to only resume specific application, Use this API
+ *
+ * @param[in]  pid     application's pid to be resumed
+ * @param[in]  uid     User ID
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild pid
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error (include application is not running)
+ * @warning    This API need to require root or inhouse permisssion \n
+ *             If you have not the permission, this API return AUL_R_ERROR. \n
+ * @remark
+ *     This API is only available to System user.
+*/
+int aul_resume_pid_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
  *     This API trigger to terminate application
  *
  *     If the application is running, this API send a terminate event to the App. \n
@@ -575,6 +777,34 @@ int aul_terminate_pid(int pid);
 
 /**
  * @par Description:
+ *     This API trigger to terminate application
+ *
+ *     If the application is running, this API send a terminate event to the App. \n
+ *     If the app cannot receive the event, AUL kill forcely the application.\n
+ * @par Purpose:
+ *      This API's purpose is to kill application
+ * @par Typical use case:
+ *     In general, Application like Task Manager use this API.
+ *
+ *             This API need to require root or inhouse permisssion. \n
+ *
+ * @param[in]  pid     application's pid to be terminated
+ * @param[in]  uid     User ID
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild pid
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ * @warning    This API need to require root or inhouse permisssion. \n
+ *
+ * @remark
+ *     If you have not the permission, this API return AUL_R_ERROR. \n
+ *     This API is only available to System user.
+ */
+int aul_terminate_pid_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
  *     This API trigger to terminate application asynchronously
  *
  *     If the application is running, this API send a terminate event to the App. \n
@@ -600,13 +830,99 @@ int aul_terminate_pid(int pid);
 int aul_terminate_pid_async(int pid);
 
 /**
+ * @par Description:
+ *     This API trigger to terminate application asynchronously
+ *
+ *     If the application is running, this API send a terminate event to the App. \n
+ *     If the app cannot receive the event, AUL kill forcely the application.\n
+ * @par Purpose:
+ *      This API's purpose is to kill application
+ * @par Typical use case:
+ *     In general, Application like Task Manager use this API.
+ *
+ *             This API need to require root or inhouse permisssion. \n
+ *
+ * @param[in]  pid     application's pid to be terminated
+ * @param[in]  uid     User ID
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild pid
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ * @warning    This API need to require root or inhouse permisssion. \n
+ * @remark
+ *     If you have not the permission, this API return AUL_R_ERROR. \n
+ *     This API is only available to System user.
+ */
+int aul_terminate_pid_async_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API trigger to terminate application synchronously
+ *
+ *     If the application is running, this API sends a terminate event to the application. \n
+ *     And then, this API waits until the application is terminated successfully. \n
+ *     If the app cannot receive the event, AUL kill forcely the application. \n
+ * @par Purpose:
+ *      This API's purpose is to kill application
+ * @par Typical use case:
+ *     In general, Application like Task Manager use this API.
+ *
+ *             This API need to require root or platform level permisssion. \n
+ *
+ * @param[in]  pid     application's pid to be terminated
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild pid
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ * @warning    This API need to require root or platform level permisssion. \n
+ * @remark
+ *     If you have not the permission, this API return AUL_R_ERROR. \n
+ *     This API is only available in User Session.
+*/
+int aul_terminate_pid_sync(int pid);
+
+/**
+ * @par Description:
+ *     This API trigger to terminate application synchronously
+ *
+ *     If the application is running, this API send a terminate event to the application. \n
+ *     And then, this API waits until the application is terminated successfully. \n
+ *     If the app cannot receive the event, AUL kill forcely the application. \n
+ * @par Purpose:
+ *      This API's purpose is to kill application
+ * @par Typical use case:
+ *     In general, Application like Task Manager use this API.
+ *
+ *             This API need to require root or platform level permisssion. \n
+ *
+ * @param[in]  pid     application's pid to be terminated
+ * @param[in]  uid     User ID
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_EINVAL    - invaild pid
+ * @retval     AUL_R_ECOM      - internal AUL IPC error
+ * @retval     AUL_R_ERROR     - general error
+ * @warning    This API need to require root or platform level permisssion. \n
+ * @remark
+ *     If you have not the permission, this API return AUL_R_ERROR. \n
+ *     This API is only available to System user.
+ */
+int aul_terminate_pid_sync_for_uid(int pid, uid_t uid);
+
+/**
  *@brief Running application's information structure retrieved by AUL
  */
 typedef struct _aul_app_info {
        int pid;                /**< app's pid if running*/
-       char* pkg_name;         /**< application id */
-       char* app_path;         /**< application excutable path */
-       char* appid;
+       char *pkg_name;         /**< application id */
+       char *app_path;         /**< application excutable path */
+       char *appid;
+       char *pkgid;            /**< package id */
+       int status;             /**< app's status */
+       int is_sub_app;         /**< state whether sub app of app group */
+       char *instance_id;
 } aul_app_info;
 
 /**
@@ -641,22 +957,42 @@ typedef int (*aul_app_info_iter_fn)(const aul_app_info *ainfo, void *data);
  * @endcode
  * @remark
  *     This API is only available in User Session.
-*
-*/
+ *
+ */
 int aul_app_is_running(const char *appid);
 
 /**
  * @par Description:
+ *     This API ask a application is running by application package name.
+ * @par Purpose:
+ *     To know whether some application is running or not, use this API
+ * @par Typical use case:
+ *     For example, If you want to know browser application running,
+ *     you can check it by using this API.
+ *
+ * @param[in]  pkgname application package name
+ * @param[in]  uid     User ID
+ * @return     true / false
+ * @retval     1       app_name is running now.
+ * @retval     0       app_name is NOT running now.
+ *
+ * @endcode
+ * @remark
+ *     This API is only available to System User.
+ */
+int aul_app_is_running_for_uid(const char *appid, uid_t uid);
+
+/**
+ * @par Description:
  *     This API use to get running application list.
  *     This API call iter_fn with each aul_app_info of running apps when running application is found.
  * @par Purpose:
  *     If you want to get running application list, use this API
- *     This API give you running applications which has SLP desktop file.
  * @par Typical use case:
  *     In general, this API is used by task manager appllication. (running application list viewer)
  *
  * @param[in]  iter_fn         iterator function
- * @param[in]  data            user-supplied data for iter_fn
+ * @param[in]  user_data       user-supplied data for iter_fn
  * @return     0 if success, negative value(<0) if fail
  * @retval     AUL_R_OK        - success
  * @retval     AUL_R_ERROR     - internal error
@@ -686,34 +1022,127 @@ int aul_app_is_running(const char *appid);
  *     Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
  *     This API is only available in User Session.
  */
-int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *data);
+int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *user_data);
 
 /**
  * @par Description:
- *     This API get application package name by pid
+ *     This API use to get running application list.
+ *     This API call iter_fn with each aul_app_info of running apps when running application is found.
  * @par Purpose:
- *     If you want to get package name of running application, use this API
+ *     If you want to get running application list, use this API
  * @par Typical use case:
- *     In general, You can use this API when you want to know caller's information.
+ *     In general, this API is used by task manager appllication. (running application list viewer)
  *
- * @param[in]  pid             given pid
- * @param[out] pkgname         pkgname to be get
- * @param[in]  len             length of pkgname
+ * @param[in]  iter_fn         iterator function
+ * @param[in]  user_data       user-supplied data for iter_fn
+ * @param[in]  uid             User ID
  * @return     0 if success, negative value(<0) if fail
  * @retval     AUL_R_OK        - success
- * @retval     AUL_R_ERROR     - no such a package name
- * @code
- * #include <aul.h>
- * #include <bundle.h>
- *
- * static int app_reset(bundle *b, void *data)
- * {
- *     int pid;
- *     char appname[255];
+ * @retval     AUL_R_ERROR     - internal error
  *
- *     pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
- *     aul_app_get_pkgname_bypid(pid, appname, sizeof(appname));
- * }
+ * @remark
+ *     This API should use if you want to know running application which has desktop files.
+ *     If you want to get all process list, you must iterate process information by using proc filesystem
+ *     Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
+ *     This API is only available to System user.
+ */
+int aul_app_get_running_app_info_for_uid(aul_app_info_iter_fn iter_fn, void *user_data, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API use to get all running application list, including sub app.
+ *     This API call iter_fn with each aul_app_info of running apps when running application is found.
+ * @par Purpose:
+ *     If you want to get all running application list, use this API
+ * @par Typical use case:
+ *     In general, this API is used by task manager application. (running application list viewer)
+ *
+ * @param[in]  iter_fn         iterator function
+ * @param[in]  user_data       user-supplied data for iter_fn
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - internal error
+ *
+ * @code
+ * #include <aul.h>
+ *
+ * int iterfunc_status(const aul_app_info *info, void *data)
+ * {
+ *     printf("\t==========================\n");
+ *     printf("\t pid: %d\n", info->pid);
+ *     printf("\t appid: %s\n", info->appid);
+ *     printf("\t app_path: %s\n", info->app_path);
+ *     printf("\t pkgid: %s\n", info->pkgid);
+ *     printf("\t status: %d\n", info->status);
+ *     printf("\t is_sub_app : %d\n", info->is_sub_app);
+ *     printf("\t==========================\n");
+ *     return 0;
+ * }
+ *
+ * int iterate_running_apps()
+ * {
+ *      return aul_app_get_all_running_app_info(iterfunc_status,NULL);
+ * }
+ *
+ * @endcode
+ * @remark
+ *     This API should use if you want to know running application which has desktop files.
+ *     If you want to get all process list, you must iterate process information by using proc filesystem
+ *     Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
+ *     This API is only available in User Session.
+ */
+int aul_app_get_all_running_app_info(aul_app_info_iter_fn iter_fn, void *user_data);
+
+/**
+ * @par Description:
+ *     This API use to get all running application list, including sub app.
+ *     This API call iter_fn with each aul_app_info of running apps when running application is found.
+ * @par Purpose:
+ *     If you want to get all running application list, use this API
+ * @par Typical use case:
+ *     In general, this API is used by task manager application. (running application list viewer)
+ *
+ * @param[in]  iter_fn         iterator function
+ * @param[in]  user_data       user-supplied data for iter_fn
+ * @param[in]  uid             User ID
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - internal error
+ *
+ * @remark
+ *     This API should use if you want to know running application which has desktop files.
+ *     If you want to get all process list, you must iterate process information by using proc filesystem
+ *     Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
+ *     This API is only available to System user.
+ */
+int aul_app_get_all_running_app_info_for_uid(aul_app_info_iter_fn iter_fn, void *user_data, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API get application package name by pid
+ * @par Purpose:
+ *     If you want to get package name of running application, use this API
+ * @par Typical use case:
+ *     In general, You can use this API when you want to know caller's information.
+ *
+ * @param[in]  pid             given pid
+ * @param[out] pkgname         pkgname to be get
+ * @param[in]  len             length of pkgname
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - no such a package name
+ * @code
+ * #include <aul.h>
+ * #include <bundle.h>
+ *
+ * static int app_reset(bundle *b, void *data)
+ * {
+ *     int pid;
+ *     char appname[255];
+ *
+ *     pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
+ *     aul_app_get_pkgname_bypid(pid, appname, sizeof(appname));
+ * }
  *
  * @endcode
  * @remark
@@ -772,7 +1201,7 @@ int aul_app_get_pkgid_bypid(int pid, char *pkgid, int len);
  * @retval     AUL_R_ERROR     - no such a appid
  *
  * @remark
- *     This API is also available in System Session.
+ *     This API is also available to System user.
 */
 int aul_app_get_pkgid_bypid_for_uid(int pid, char *pkgid, int len, uid_t uid);
 
@@ -825,7 +1254,7 @@ int aul_app_get_appid_bypid(int pid, char *appid, int len);
  * @retval     AUL_R_OK        - success
  * @retval     AUL_R_ERROR     - no such a appid
  * @remark
- *     This API is also available in System Session.
+ *     This API is also available to System user.
 */
 int aul_app_get_appid_bypid_for_uid(int pid, char *appid, int len, uid_t uid);
 
@@ -1363,6 +1792,42 @@ int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
 
 /**
  * @par Description:
+ *     This API sets callback fuction that will be called when applications are launched.
+ * @par Purpose:
+ *     This API's purpose is to listen the application launching event.
+ *     In general, task manager Application need this API.
+ *
+ * @param[in]  func            callback function
+ * @param[in]  data            user data
+ * @return     0 if success, negative value if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - general error
+ *
+ * @see
+ *     aul_listen_app_dead_signal
+ * @code
+ * #include <aul.h>
+ *
+ * int app_launch_handler(int pid, const char *app_id, void *data)
+ * {
+ *     printf("===> %s : %d, %s\n", __FUNCTION__, pid, app_id);
+ *     return 0;
+ * }
+ *
+ * void dead_listen()
+ * {
+ *     aul_listen_app_launch_signal(app_launch_handler, NULL);
+ * }
+ *
+ * @endcode
+ * @remark
+ *     This API is only available in User Session.
+ *
+ */
+int aul_listen_app_launch_signal_v2(int (*func) (int, const char *, void *), void *data);
+
+/**
+ * @par Description:
  *     This API gets status of specified application process id.
  * @par Purpose:
  *     This API's purpose is to get the application's status.
@@ -1370,12 +1835,9 @@ int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
  * @param[in]  pid     pid of application
  * @return     0 or greater if success, nagative value if fail
  * @retval     STATUS_LAUNCHING
- * @retval     STATUS_CREATED
- * @retval     STATUS_FOCUS
  * @retval     STATUS_VISIBLE
  * @retval     STATUS_BG
  * @retval     STATUS_DYING
- * @retval     STATUS_HOME
  * @retval     STATUS_NORESTART
  * @see
  *     aul_status_update
@@ -1386,7 +1848,7 @@ int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
  * {
  *     int status;
  *     status = aul_app_get_status_bypid(info->pid);
- *     if (status == STATUS_FOCUS) {
+ *     if (status == STATUS_VISIBLE) {
  *             printf("%s has focus", info->app_id);
  *             (int *)data = info->pid;
  *             return -1;
@@ -1407,6 +1869,83 @@ int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
 int aul_app_get_status_bypid(int pid);
 
 /**
+ * @par Description:
+ *     This API gets status of specified application process id.
+ * @par Purpose:
+ *     This API's purpose is to get the application's status.
+ *
+ * @param[in]  pid     pid of application
+ * @param[in]  uid     User ID
+ * @return     0 or greater if success, nagative value if fail
+ * @retval     STATUS_LAUNCHING
+ * @retval     STATUS_VISIBLE
+ * @retval     STATUS_BG
+ * @retval     STATUS_DYING
+ * @retval     STATUS_NORESTART
+ *
+ * @remark
+ *     This API is only available to System user.
+ */
+int aul_app_get_status_bypid_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API gets the status of specified application id.
+ * @par Purpose:
+ *     This API's purpose is to get the status of the application.
+ *
+ * @param[in]  appid   application ID
+ * @return     0 or greater if success, nagative value if fail
+ * @retval     STATUS_LAUNCHING
+ * @retval     STATUS_FOCUS
+ * @retval     STATUS_VISIBLE
+ * @retval     STATUS_BG
+ * @retval     STATUS_DYING
+ * @retval     STATUS_NORESTART
+ * @see
+ *     aul_status_update
+ * @code
+ * #include <aul.h>
+ *
+ * int func(void)
+ * {
+ *     int status;
+ *
+ *     status = aul_app_get_status("org.tizen.helloworld");
+ *     if (status == STATUS_FOCUS)
+ *             printf("org.tizen.helloworld has focus");
+ *
+ *     return 0;
+ * }
+ *
+ * @endcode
+ * @remark
+ *     This API is only available in User Session.
+ */
+int aul_app_get_status(const char *appid);
+
+/**
+ * @par Description:
+ *     This API gets the status of specified application id.
+ * @par Purpose:
+ *     This API's purpose is to get the status of the application
+ *
+ * @param[in]  appid   application ID
+ * @param[in]  uid     User ID
+ * @return     0 or greater if success, nagative value if fail
+ * @retval     STATUS_LAUNCHING
+ * @retval     STATUS_FOCUS
+ * @retval     STATUS_VISIBLE
+ * @retval     STATUS_BG
+ * @retval     STATUS_DYING
+ * @retval     STATUS_NORESTART
+ *
+ * @remark
+ *     This API is only available to System user.
+ */
+int aul_app_get_status_for_uid(const char *appid, uid_t uid);
+
+/**
  * @par Description
  *     This API sets callback function that on application status changed.
  * @par Purpose:
@@ -1426,13 +1965,10 @@ int aul_app_get_status_bypid(int pid);
  *
  * int status_changed(int status, void *data)
  * {
- *     if (status == STATUS_FOCUS)
- *             printf("%d has focus\n", getpid());
- *
  *     if (status == STATUS_VISIBLE)
  *             printf("%d resume\n", getpid());
  *
- *     if (status == STATUS_BG0
+ *     if (status == STATUS_BG)
  *             printf("%d pause\n", getpid());
  * }
  *
@@ -1467,13 +2003,10 @@ int aul_add_status_local_cb(int (*func) (int, void *), void *data);
  *
  * int status_changed(int status, void *data)
  * {
- *     if (status == STATUS_FOCUS)
- *             printf("%d has focus\n", getpid());
- *
  *     if (status == STATUS_VISIBLE)
  *             printf("%d resume\n", getpid());
  *
- *     if (status == STATUS_BG0
+ *     if (status == STATUS_BG)
  *             printf("%d pause\n", getpid());
  * }
  *
@@ -1495,6 +2028,11 @@ int aul_add_status_local_cb(int (*func) (int, void *), void *data);
 int aul_remove_status_local_cb(int (*func) (int, void *), void *data);
 
 /*
+ * This API is only for appfw internally.
+ */
+int aul_set_process_group(int parent_pid, int child_pid);
+
+/*
  * This API is only for Appfw internally.
  */
 int aul_terminate_bgapp_pid(int pid);
@@ -1507,6 +2045,16 @@ int aul_terminate_pid_without_restart(int pid);
 /*
  * This API is only for Appfw internally.
  */
+int aul_terminate_pid_sync_without_restart(int pid);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_terminate_pid_sync_without_restart_for_uid(int pid, uid_t uid);
+
+/*
+ * This API is only for Appfw internally.
+ */
 const char *aul_get_app_external_root_path(void);
 
 /*
@@ -1537,7 +2085,7 @@ const char *aul_get_app_tep_resource_path(void);
 /*
  * This API is only for Appfw internally.
  */
-const char *aul_get_app_shared_data_path(void);
+int aul_get_app_shared_data_path(char **path);
 
 /*
  * This API is only for Appfw internally.
@@ -1572,11 +2120,6 @@ const char *aul_get_app_specific_path(void);
 /*
  * This API is only for Appfw internally.
  */
-const char *aul_get_app_external_specific_path(void);
-
-/*
- * This API is only for Appfw internally.
- */
 int aul_get_app_shared_data_path_by_appid(const char *app_id, char **path);
 
 /*
@@ -1647,12 +2190,12 @@ int aul_add_caller_cb(int pid,  void (*caller_cb) (int, void *), void *data);
 /*
  * This API is only for Appfw internally.
  */
-int aul_remove_caller_cb(int pid);
+int aul_remove_caller_cb(int pid, void *data);
 
 /*
  * This API is only for Appfw internally.
  */
-int aul_invoke_caller_cb(int pid);
+int aul_invoke_caller_cb(void *data);
 
 /*
  * This API is only for Appfw internally.
@@ -1697,6 +2240,16 @@ void aul_set_preinit_pkgid(const char *pkgid);
 /*
  * This API is only for Appfw internally.
  */
+void aul_set_preinit_root_path(const char *root_path);
+
+/*
+ * This API is only for Appfw internally.
+ */
+const char *aul_get_preinit_root_path(void);
+
+/*
+ * This API is only for Appfw internally.
+ */
 int aul_update_freezer_status(int pid, const char* type);
 
 /*
@@ -1757,47 +2310,32 @@ int aul_pause_app(const char *appid);
 /*
  * This API is only for Appfw internally.
  */
-int aul_pause_pid(int pid);
-
-/*
- * This API is only for Appfw internally.
- */
-int aul_reload_appinfo(void);
-
-/*
- * This API is only for Appfw internally.
- */
-int aul_status_update(int status);
-
-/*
- * This API is only for Appfw internally.
- */
-int aul_running_list_update(char *appid, char *app_path, char *pid);
+int aul_pause_app_for_uid(const char *appid, uid_t uid);
 
 /*
  * This API is only for Appfw internally.
  */
-void aul_app_group_add(int leader_pid, int pid, int wid);
+int aul_pause_pid(int pid);
 
 /*
  * This API is only for Appfw internally.
  */
-void aul_app_group_remove(int pid);
+int aul_pause_pid_for_uid(int pid, uid_t uid);
 
 /*
  * This API is only for Appfw internally.
  */
-void aul_app_group_attach_window(int parent_wid, int child_wid);
+int aul_reload_appinfo(void);
 
 /*
  * This API is only for Appfw internally.
  */
-void aul_app_group_detach_window(int child_wid);
+int aul_status_update(int status);
 
 /*
  * This API is only for Appfw internally.
  */
-int aul_app_group_get_window(int pid);
+int aul_running_list_update(char *appid, char *app_path, char *pid);
 
 /*
  * This API is only for Appfw internally.
@@ -1849,29 +2387,116 @@ void aul_app_group_lower(int *exit);
  */
 void aul_app_group_get_idle_pids(int *cnt, int **pids);
 
+/**
+ * @par Description:
+ *     This API puts some app below the caller app
+ * @par Purpose:
+ *      This API's purpose is to reorder window stack limitedly.
+ *
+ * @param[in]  below_appid     The appid to be reordered below the caller app
+ * @return     0 success, negative value(<0) if fail
+ *
+ * @remark
+ *     below_appid should be main app which have been launched before.
+ *     This API is only available in User Session.
+*/
+int aul_app_group_activate_below(const char *below_appid);
+
+/**
+ * @par Description:
+ *     This API puts some app above the caller app
+ * @par Purpose:
+ *      This API's purpose is to reorder window stack limitedly.
+ *
+ * @param[in]  above_appid     The appid to be reordered above the caller app
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     above_appid should be main app which have been launched before.
+ *     This API is only available in User Session.
+*/
+int aul_app_group_activate_above(const char *above_appid);
+
 /*
  * This API is only for Appfw internally.
  */
 int aul_request_data_control_socket_pair(bundle *b, int *fd);
-
 /*
  * This API is only for Appfw internally.
  */
-int aul_listen_booting_done_signal(int (*func) (int, void *), void *data);
-
+int aul_request_message_port_socket_pair(int *fd);
 /*
  * This API is only for Appfw internally.
  */
-int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
+int aul_listen_booting_done_signal(int (*func) (int, void *), void *data);
 
 /*
  * This API is only for Appfw internally.
  */
-int aul_listen_app_status_signal(int (*func) (int, int, void *), void *data);
+int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
 
-/*
- * This API is only for Appfw internally.
- */
+/**
+ * @par Description:
+ *     This API registers a callback function that will be called when the
+ *     status of the application is changed.
+ * @par Purpose:
+ *     This API is for monitoring the status of all applications.
+ *
+ * @param[in]  func            callback function
+ * @param[in]  data            user data
+ * @return     0 if success, negative value if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - general error
+ *
+ * @code
+ * #include <aul.h>
+ *
+ * int app_status_handler(int pid, int status, void *data)
+ * {
+ *     const char *app_status;
+ *
+ *     switch (status) {
+ *     case 0:
+ *             app_status = "STATUS_LAUNCHING";
+ *             break;
+ *     case 3:
+ *             app_status = "STATUS_VISIBLE";
+ *             break;
+ *     case 4:
+ *             app_status = "STATUS_BACKGROUND";
+ *             break;
+ *     case 5:
+ *             app_status = "STATUS_FOCUS";
+ *             break;
+ *     default:
+ *             app_status = "STATUS_UNKNOWN";
+ *     }
+ *
+ *     printf("pid: %d, status: %s", pid, status);
+ *     return 0;
+ * }
+ *
+ * int main(int argc, char **argv)
+ * {
+ *     int ret;
+ *
+ *     ret = aul_listen_app_status_signal(app_status_handler, NULL);
+ *     if (ret != AUL_R_OK) {
+ *             printf("Failed to add status handler");
+ *             return -1;
+ *     }
+ *
+ *     ...
+ *
+ *     return 0;
+ * }
+ * @endcode
+ */
+int aul_listen_app_status_signal(int (*func)(int, int, void *), void *data);
+
+/*
+ * This API is only for Appfw internally.
+ */
 int aul_check_tep_mount(const char *tep_path);
 
 /*
@@ -1892,13 +2517,33 @@ int aul_forward_app(const char *appid, bundle *kb);
  *      Once it is made, added loader will make a candidate process to use.
  *
  * @param[in]  loader_path     The file name of the custom loader binary including full path
+ * @param[in]  extra           A bundle to be passed to the custom loader
  * @return     Loader ID if success, negative value(<0) if fail
  *
  * @remark
  *     This API is only for Appfw internally.
  *     This API is only available in User Session.
 */
-int aul_add_loader(const char *loader_path);
+int aul_add_loader(const char *loader_path, bundle *extra);
+
+/**
+ * @par Description:
+ *     This API create custom launchpad-loader
+ * @par Purpose:
+ *      This API's purpose is to make a slot for custom loader.
+ *      Once it is made, added loader will make a candidate process to use.
+ *
+ * @param[in]  loader_path     The file name of the custom loader binary including full path
+ * @param[in]  extra           A bundle to be passed to the custom loader
+ * @param[in]  uid             User ID
+ * @return     Loader ID if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only for Appfw internally.
+ *     This API is only available to System user.
+*/
+int aul_add_loader_for_uid(const char *loader_path, bundle *extra, uid_t uid);
+
 
 /**
  * @par Description:
@@ -1917,6 +2562,23 @@ int aul_add_loader(const char *loader_path);
 int aul_remove_loader(int loader_id);
 
 /**
+ * @par Description:
+ *     This API destroy custom launchpad-loader
+ * @par Purpose:
+ *      This API's purpose is to remove a slot for custom loader.
+ *      Once it is removed, the prepared process will be removed as well.
+ *
+ * @param[in]  loader_id       Loader ID
+ * @param[in]  uid             User ID
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only for Appfw internally.
+ *     This API is only available to System user.
+*/
+int aul_remove_loader_for_uid(int loader_id, uid_t uid);
+
+/**
  * @par Description
  *     This API gets specified application process id.
  * @par Purpose:
@@ -1930,9 +2592,473 @@ int aul_remove_loader(int loader_id);
  */
 int aul_app_get_pid(const char *appid);
 
+/**
+ * @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
+ * @param[in]  uid     User ID
+ * @return     callee's pid if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available to System user.
+ */
+int aul_app_get_pid_for_uid(const char *appid, uid_t uid);
+
+/**
+ * @par Description:
+ * This function update rua stat.
+ *
+ * @param[in] b Bundle object contains caller and tag information.
+ * @param[in] uid Target uid
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see None
+ * @remarks This API is only for Appfw internally.
+ *
+ * @par Sample code:
+ * @code
+#include <aul.h>
+
+...
+{
+    int r;
+    bundle *b = bundle_create();
+    bundle_add_str(b, AUL_SVC_K_RUA_STAT_CALLER, caller);
+    bundle_add_str(b, AUL_SVC_K_RUA_STAT_TAG, tag);
+
+    r = aul_update_rua_stat_for_uid(b);
+}
+
+ * @endcode
+ **/
+int aul_update_rua_stat_for_uid(bundle *b, uid_t uid);
+
+/**
+ * @par Description:
+ * This function add rua history.
+ *
+ * @param[in] b Bundle object Target Package name or app path.
+ * @param[in] uid Target uid
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see None
+ * @remarks This API is only for Appfw internally.
+ *
+ * @par Sample code:
+ * @code
+#include <aul.h>
+
+...
+{
+    int r;
+    bundle *b = bundle_create();
+    if (pkg_name)
+       bundle_add_str(b, AUL_K_RUA_PKGNAME, pkg_name);
+    else if (app_path)
+       bundle_add_str(b, AUL_K_RUA_APPPATH, app_path);
+
+    r = aul_add_rua_history_for_uid(b);
+}
+
+ * @endcode
+ **/
+int aul_add_rua_history_for_uid(bundle *b, uid_t uid);
+
+/**
+ * @par Description:
+ * This function delete rua history.
+ *
+ * @param[in] b Bundle object Target Package name. If NULL or has no value, delete all rua history.
+ * @param[in] uid Target uid
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see None
+ * @remarks This API is only for Appfw internally.
+ *
+ * @par Sample code:
+ * @code
+#include <aul.h>
+
+...
+{
+    int r;
+    bundle *b = NULL;
+    if (pkg_name) {
+       b = bundle_create();
+       bundle_add_str(b, AUL_K_RUA_PKGNAME, pkg_name);
+    }
+    r = aul_delete_rua_history_for_uid(b, getuid());
+}
+
+ * @endcode
+ **/
+int aul_delete_rua_history_for_uid(bundle *b, uid_t uid);
+
+
+/**
+ * @par Description:
+ * This function sets the default application(application id) associated with operatioin, uri and mime-type.
+ *
+ * @param[in] b Bundle object Target application id and operation, uri and mime-type.
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see None
+ * @remarks This API is only for Appfw internally.
+ *
+ * @par Sample code:
+ * @code
+#include <aul.h>
+#include <aul_svc.h>
+
+...
+{
+    int r;
+    bundle *b = bundle_create();
+
+    const char *appid = "org.tizen.test";
+    const char *operation = "test_operation";
+    const char *mime_type = "test_mime";
+    const char *uri = "test_uri";
+
+    aul_svc_set_operation(b, operation);
+    aul_svc_set_mime(b, mime_type);
+    aul_svc_set_uri(b, uri);
+
+    aul_svc_set_appid(b, appid)
+
+    r = aul_set_default_app_by_operation(b);
+}
+
+ * @endcode
+ **/
+int aul_set_default_app_by_operation(bundle *b);
+
+/**
+ * @par Description:
+ * This API unset the default application(application id) associated with operation, uri and mime-type.
+ *
+ * @param[in] app_id    The ID of the application
+ *
+ * @return 0 if success, negative value(<0) if fail
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <aul.h>
+
+...
+{
+    aul_unset_default_app_by_operation("org.tizen.test");
+}
+ * @endcode
+ *
+ */
+int aul_unset_default_app_by_operation(const char *app_id);
+
+/**
+ * @par Description:
+ *      Sends the launch request asynchronously.
+ *
+ * @param[in]  appid           The application ID
+ * @param[in]  kb              The Bundle data
+ * @return      a pid of the callee on success,
+ *              otherwise a negative error value
+ * @retval     AUL_R_OK        - Successful
+ * @retval     AUL_R_EINVAL    - Invalid parameter
+ * @retval     AUL_R_ECOM      - Internal AUL IPC error
+ * @retval     AUL_R_ERROR     - General error
+ *
+ * @remark
+ *     This API is only available in User Session.
+ *     This API doesn't check whether the callee application is executed successfully.
+ *     If the caller application is equal to the callee application, this API can return AUL_R_OK.
+ */
+int aul_launch_app_async(const char *appid, bundle *kb);
+
+/**
+ * @par Description:
+ *     Sends the launch request asynchronously.
+ *
+ * @param[in]  appid           The application ID
+ * @param[in]  kb              The Bundle data
+ * @param[in]  uid             User ID
+ * @return      a pid of the callee on success,
+ *              otherwise a negative error value
+ * @retval     AUL_R_OK        - Successful
+ * @retval     AUL_R_EINVAL    - Invalid parameter
+ * @retval     AUL_R_ECOM      - Internal AUL IPC error
+ * @retval     AUL_R_ERROR     - General error
+ *
+ * @remark
+ *     This API is only available to System user.
+ *     This API doesn't check whether the callee application is executed successfully.
+ *     If the caller application is equal to the callee application, this API can return AUL_R_OK.
+ */
+int aul_launch_app_async_for_uid(const char *appid, bundle *kb, uid_t uid);
+
+/**
+ * @par Description:
+ * This API request launchpad to make candidate processes.
+ *
+ * @return 0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available in User Session.
+ */
+int aul_prepare_candidate_process(void);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_add(const char *widget_id, const char *instance_id);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_del(const char *widget_id, const char *instance_id);
+
+/*
+ * This API is only for Appfw internally.
+ */
+typedef void (*aul_widget_instance_foreach_cb)(const char *instance_id, void *data);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_foreach(const char *widget_id, aul_widget_instance_foreach_cb cb, void *data);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_update(const char *widget_id, const char *instance_id, bundle *b);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_count(const char *widget_id);
+
+/**
+ * @par Description:
+ *     This API gets the last caller process id of specified application process id.
+ * @par Purpose:
+ *     This API's purpose is to get the application's last caller process id.
+ *
+ * @param[in]  pid     pid of application
+ * @return     caller pid if success, nagative value if fail
+ *
+ * @remark
+ *     This API is only available in User Session.
+ */
+int aul_app_get_last_caller_pid(int pid);
+
+/**
+ * @par Description:
+ *     This API gets the last caller process id of specified application process id.
+ * @par Purpose:
+ *     This API's purpose is to get the last caller process id of the application.
+ *
+ * @param[in]  pid     pid of application
+ * @param[in]   uid     User ID
+ * @return     caller pid if success, nagative value if fail
+ *
+ * @remark
+ *     This API is only available in System users.
+ */
+int aul_app_get_last_caller_pid_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
+ *      This API trigger to resume application asynchronously.
+ *      If the application is running, this API send a resume event to the App.
+ *      If the application is not running, this API return AUL_R_ERROR.
+ *      Although the application is running, if the application cannot receive resume event,
+ *      AUL try to raise the application's default windows.
+ * @par Purpose:
+ *      This API is for caller.
+ *      This API's purpose is to send resume event.
+ * @par Typical use case:
+ *      In multiple application model, If you want to only resume specific application, Use this API
+ *
+ * @param[in]   pid     application's pid to be resumed
+ * @return      0 if success, negative value(<0) if fail
+ * @retval      AUL_R_OK        - success
+ * @retval      AUL_R_EINVAL    - invaild pid
+ * @retval      AUL_R_ECOM      - internal AUL IPC error
+ * @retval      AUL_R_ERROR     - general error (include application is not running)
+ * @warning     This API need to require root or inhouse permisssion \n
+ *              If you have not the permission, this API return AUL_R_ERROR. \n
+ * @remark
+ *      This API is only available to User Session.
+ */
+int aul_resume_pid_async(int pid);
+
+/**
+ * @par Description:
+ *      This API trigger to resume application asynchronously.
+ *      If the application is running, this API send a resume event to the App.
+ *      If the application is not running, this API return AUL_R_ERROR.
+ *      Although the application is running, if the application cannot receive resume event,
+ *      AUL try to raise the application's default windows.
+ * @par Purpose:
+ *      This API is for caller.
+ *      This API's purpose is to send resume event.
+ * @par Typical use case:
+ *      In multiple application model, If you want to only resume specific application, Use this API
+ *
+ * @param[in]   pid     application's pid to be resumed
+ * @param[in]   uid     User ID
+ * @return      0 if success, negative value(<0) if fail
+ * @retval      AUL_R_OK        - success
+ * @retval      AUL_R_EINVAL    - invaild pid
+ * @retval      AUL_R_ECOM      - internal AUL IPC error
+ * @retval      AUL_R_ERROR     - general error (include application is not running)
+ * @warning     This API need to require root or inhouse permisssion \n
+ *              If you have not the permission, this API return AUL_R_ERROR. \n
+ * @remark
+ *      This API is only available to System user.
+ */
+int aul_resume_pid_async_for_uid(int pid, uid_t uid);
+
+/**
+ * @par Description:
+ *     This API set the alias appid.
+ *     The alias appid is only available for the aul_svc_set_appid() API.
+ *     If the appid is not available, this API returns an error.
+ *
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in]  alias_appid     an alias application ID
+ * @param[in]  appid           an application ID
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available to User Session.
+ */
+int aul_set_alias_appid(const char *alias_appid, const char *appid);
+
+/**
+ * @par Description:
+ *     This API unset the alias appid.
+ *
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in]  alias_appid     an alias application ID
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available to User Session.
+ */
+int aul_unset_alias_appid(const char *alias_appid);
+
+/**
+ * @par Description:
+ *     This API activates the alias information based on the given appid.
+ *
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in]  appid   an application ID
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available to User Session.
+ */
+int aul_enable_alias_info(const char *appid);
+
+/**
+ * @par Description:
+ *     This API deactivates the alias information based on the given appid.
+ *
+ * @privlebel platform
+ * @privilege %http://tizen.org/privilege/systemsettings.admin
+ * @param[in]  appid   an application ID
+ * @return     0 if success, negative value(<0) if fail
+ *
+ * @remark
+ *     This API is only available to User Session.
+ */
+int aul_disable_alias_info(const char *appid);
+
+/**
+ * This API is only for Appfw internally.
+ */
+typedef int (*app_status_cb)(aul_app_info *info, int ctx_status, void *data);
+
+/**
+ * This API is only for Appfw internally.
+ */
+typedef struct status_listen_s *status_listen_h;
+
+/**
+ * @par Description:
+ *      Registers a callback function to be invoked when the application change status.
+ *
+ * @param[in]   appid           The application ID to get status
+ * @param[in]   callback        The callback function to register
+ * @param[in]   data            The user data to be passed to the callback function
+ * @param[out]  handle          The status listen handle
+ * @return      @c 0 on success,
+ *             otherwise a negative error value
+ */
+int aul_listen_app_status(const char *appid, app_status_cb callback,
+               void *data, status_listen_h *handle);
+int aul_listen_app_status_for_uid(const char *appid, app_status_cb callback,
+               void *data, status_listen_h *handle, uid_t uid);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_get_content(const char *widget_id, const char *instance_id, char **content);
+
+/**
+ * @par Description:
+ *      Gets running application instance info
+ *      This API calls the iter_fn with the aul_app_info when running app instance info is found.
+ *
+ * @param[in]   iter_fn         iterative function
+ * @param[in]   user_data       User data
+ * @return      0 if success, negative value(<0) if fail
+ * @retval      AUL_R_OK        Successful
+ * @retval      AUL_R_ERROR     General error
+ * @retval      AUL_R_EINVAL    Invalid parameter
+ */
+int aul_app_get_running_app_instance_info(aul_app_info_iter_fn iter_fn,
+               void *user_data);
+int aul_app_get_running_app_instance_info_for_uid(aul_app_info_iter_fn iter_fn,
+               void *user_data, uid_t uid);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_app_get_instance_id_bypid(int pid, char *instance_id, int len);
+int aul_app_get_instance_id_bypid_for_uid(int pid, char *instance_id,
+               int len, uid_t uid);
+
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_resume_app_by_instance_id(const char *appid, const char *instance_id);
+int aul_resume_app_by_instance_id_for_uid(const char *appid,
+               const char *instance_id, uid_t uid);
+
+/**
+ * This API is only for Appfw internally.
+ */
+int aul_ignore_app_status(status_listen_h handle);
+
+/**
+ * This API is only for Appfw internally.
+ */
+int aul_widget_notify_exit(void);
+
 #ifdef __cplusplus
        }
 #endif
 
-#endif         /* __AUL_H__ */