modify aul_svc_ api
[platform/core/appfw/app-svc.git] / include / appsvc.h
index 8cc03fb..96fdc07 100755 (executable)
@@ -47,6 +47,7 @@
 
 
 #include <bundle.h>
+#include <sys/types.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -54,51 +55,92 @@ extern "C" {
 
 
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_DEFAULT               "http://tizen.org/appsvc/operation/default"
+#define APPSVC_OPERATION_DEFAULT               "http://tizen.org/appcontrol/operation/default"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_EDIT                  "http://tizen.org/appsvc/operation/edit"
+#define APPSVC_OPERATION_EDIT                  "http://tizen.org/appcontrol/operation/edit"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_VIEW                  "http://tizen.org/appsvc/operation/view"
+#define APPSVC_OPERATION_VIEW                  "http://tizen.org/appcontrol/operation/view"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_PICK                  "http://tizen.org/appsvc/operation/pick"
+#define APPSVC_OPERATION_PICK                  "http://tizen.org/appcontrol/operation/pick"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_CREATE_CONTENT                "http://tizen.org/appsvc/operation/create_content"
+#define APPSVC_OPERATION_CREATE_CONTENT                "http://tizen.org/appcontrol/operation/create_content"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_CALL                  "http://tizen.org/appsvc/operation/call"
+#define APPSVC_OPERATION_CALL                  "http://tizen.org/appcontrol/operation/call"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_SEND                  "http://tizen.org/appsvc/operation/send"
+#define APPSVC_OPERATION_SEND                  "http://tizen.org/appcontrol/operation/send"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_SEND_TEXT             "http://tizen.org/appsvc/operation/send_text"
+#define APPSVC_OPERATION_SEND_TEXT             "http://tizen.org/appcontrol/operation/send_text"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_DIAL                  "http://tizen.org/appsvc/operation/dial"
+#define APPSVC_OPERATION_DIAL                  "http://tizen.org/appcontrol/operation/dial"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_SEARCH                        "http://tizen.org/appsvc/operation/search"
+#define APPSVC_OPERATION_SEARCH                        "http://tizen.org/appcontrol/operation/search"
 /** APP_SVC OPERATION TYPE*/
-#define APPSVC_OPERATION_DOWNLOAD              "http://tizen.org/appsvc/operation/download"
+#define APPSVC_OPERATION_DOWNLOAD              "http://tizen.org/appcontrol/operation/download"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_SHARE                 "http://tizen.org/appcontrol/operation/share"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_MULTI_SHARE   "http://tizen.org/appcontrol/operation/multi_share"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_COMPOSE               "http://tizen.org/appcontrol/operation/compose"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_LOCATION              "http://tizen.org/appcontrol/operation/configure/location"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_FONT_TYPE             "http://tizen.org/appcontrol/operation/configure/font/type"
+/** APP_SVC OPERATION TYPE*/
+#define APPSVC_OPERATION_FONT_SIZE             "http://tizen.org/appcontrol/operation/configure/font/size"
+#define APPSVC_OPERATION_LAUNCH_ON_EVENT       "http://tizen.org/appcontrol/operation/launch_on_event"
+
 
 
 /** APP_SVC DATA SUBJECT*/
-#define APPSVC_DATA_SUBJECT            "http://tizen.org/appsvc/data/subject"
+#define APPSVC_DATA_SUBJECT            "http://tizen.org/appcontrol/data/subject"
+/** APP_SVC DATA TYPE*/
+#define APPSVC_DATA_TO                 "http://tizen.org/appcontrol/data/to"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_TO                 "http://tizen.org/appsvc/data/to"
+#define APPSVC_DATA_CC                 "http://tizen.org/appcontrol/data/cc"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_CC                 "http://tizen.org/appsvc/data/cc"
+#define APPSVC_DATA_BCC                        "http://tizen.org/appcontrol/data/bcc"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_BCC                        "http://tizen.org/appsvc/data/bcc"
+#define APPSVC_DATA_TEXT               "http://tizen.org/appcontrol/data/text"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_TEXT               "http://tizen.org/appsvc/data/text"
+#define APPSVC_DATA_TITLE              "http://tizen.org/appcontrol/data/title"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_TITLE              "http://tizen.org/appsvc/data/title"
+#define APPSVC_DATA_SELECTED           "http://tizen.org/appcontrol/data/selected"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_SELECTED           "http://tizen.org/appsvc/data/selected"
+#define APPSVC_DATA_KEYWORD            "http://tizen.org/appcontrol/data/keyword"
 /** APP_SVC DATA TYPE*/
-#define APPSVC_DATA_KEYWORD            "http://tizen.org/appsvc/data/keyword"
+#define APPSVC_DATA_PATH               "http://tizen.org/appcontrol/data/path"
+/** APP_SVC DATA TYPE*/
+#define APPSVC_DATA_SELECTION_MODE     "http://tizen.org/appcontrol/data/selection_mode"
+/** APP_SVC DATA TYPE*/
+#define APPSVC_DATA_RETURN_RESULT      "http://tizen.org/appcontrol/data/return_result"
+
+
+/** APP SVC internal private key */
+#define APP_SVC_K_URI_R_INFO           "__APP_SVC_URI_R_INFO__"
+
+#define APP_SVC_K_SELECTOR_EXTRA_LIST  "http://tizen.org/appcontrol/data/selector_extra_list"
+
+#ifdef _APPFW_FEATURE_MULTI_INSTANCE
+#define APP_SVC_K_MULTI_INSTANCE       "multi_instance"
+#endif
+
+#define APP_SELECTOR "org.tizen.app-selector"
+
+/** Internal operation for launching application which is other zone */
+#define APP_SVC_OPERATION_JUMP "http://tizen.org/appcontrol/operation/jump"
+#define APP_SVC_K_JUMP_ZONE_NAME       "__K_JUMP_DOMAIN_NAME__"
+#define APP_SVC_K_JUMP_ORIGIN_OPERATION        "__K_JUMP_ORIGIN_OPERATION__"
+#define APP_SVC_K_FOCUS_ZONE "__K_FOCUS_ZONE__"
 
 
 /**
- * @brief Return values in appsvc. 
+ * @brief Return values in appsvc.
  */
 typedef enum _appsvc_return_val {
+       APPSVC_RET_EREJECTED = -7,      /**< application launch rejected */
+       APPSVC_RET_ETERMINATING = -6,   /**< application terminating */
+       APPSVC_RET_EILLACC = -5,                /**< Illegal Access */
        APPSVC_RET_ELAUNCH = -4,                /**< Failure on launching the app */
        APPSVC_RET_ENOMATCH = -3,               /**< No matching result Error */
        APPSVC_RET_EINVAL = -2,                 /**< Invalid argument */
@@ -108,7 +150,7 @@ typedef enum _appsvc_return_val {
 
 
 /**
- * @brief result values in appsvc. 
+ * @brief result values in appsvc.
  */
 typedef enum _appsvc_result_val {
        APPSVC_RES_CANCEL = -2,         /**< Cancel by system */
@@ -117,40 +159,41 @@ typedef enum _appsvc_result_val {
 }appsvc_result_val;
 
 
-/** 
+/**
  * @brief appsvc_res_fn is appsvc result function
- * @param[out] b               result bundle   
+ * @param[out] b               result bundle
  * @param[out] request_code    request code
  * @param[out] result                  result value
- * @param[out] data            user-supplied data      
+ * @param[out] data            user-supplied data
 */
 typedef void (*appsvc_res_fn)(bundle *b, int request_code, appsvc_result_val result, void *data);
 
 
-/** 
- * @brief iterator function running with appsvc_get_list 
- * @param[out] pkg_name        package name retreived by appsvc_get_list
- * @param[out] data            user-supplied data      
+/**
+ * @brief iterator function running with appsvc_get_list
+ * @param[out] appid           appid retreived by appsvc_get_list
+ * @param[out] data            user-supplied data
 */
-typedef int (*appsvc_info_iter_fn)(const char *pkg_name, void *data);
+typedef int (*appsvc_info_iter_fn)(const char *appid, void *data);
 
+typedef int (*appsvc_host_res_fn)(void *data);
 
 /**
  * @par Description:
  * This function sets an operation to launch application based on appsvc.
  *
- * @param[in] b bundle object 
- * @param[in] operation operation 
+ * @param[in] b bundle object
+ * @param[in] operation operation
  *
  * @return 0 if success, negative value(<0) if fail
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks An application must call this function before using appsvc_run_service API. 
+ * @remarks An application must call this function before using appsvc_run_service API.
  *
  * @par Sample code:
  * @code
@@ -161,7 +204,7 @@ typedef int (*appsvc_info_iter_fn)(const char *pkg_name, void *data);
        bundle *b = NULL;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
 }
  * @endcode
@@ -173,18 +216,18 @@ int appsvc_set_operation(bundle *b, const char *operation);
  * @par Description:
  * This function sets an uri to launch application based on appsvc.
  *
- * @param[in] b bundle object 
- * @param[in] uri uri 
+ * @param[in] b bundle object
+ * @param[in] uri uri
  *
  * @return 0 if success, negative value(<0) if fail
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -195,7 +238,7 @@ int appsvc_set_operation(bundle *b, const char *operation);
        bundle *b = NULL;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
        appsvc_set_uri(b,"http://www.samsung.com");
 }
@@ -208,18 +251,18 @@ int appsvc_set_uri(bundle *b, const char *uri);
  * @par Description:
  * This function sets a mime-type to launch application based on appsvc.
  *
- * @param[in] b bundle object 
- * @param[in] mime mime-type 
+ * @param[in] b bundle object
+ * @param[in] mime mime-type
  *
  * @return 0 if success, negative value(<0) if fail
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -230,7 +273,7 @@ int appsvc_set_uri(bundle *b, const char *uri);
        bundle *b = NULL;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_PICK);
        appsvc_set_mime(b,"image/jpg");
 }
@@ -243,16 +286,16 @@ int appsvc_set_mime(bundle *b, const char *mime);
  * @par Description:
  * This function sets an extra data to launch application based on appsvc.
  *
- * @param[in] b bundle object 
- * @param[in] key key of extra data 
- * @param[in] val data 
+ * @param[in] b bundle object
+ * @param[in] key key of extra data
+ * @param[in] val data
  *
  * @return 0 if success, negative value(<0) if fail
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -263,7 +306,7 @@ int appsvc_set_mime(bundle *b, const char *mime);
        bundle *b = NULL;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_SEND);
        appsvc_set_uri(b,"mailto:xxx1@xxx");
        appsvc_add_data(b,APPSVC_DATA_CC,"xxx2@xxx");
@@ -277,9 +320,9 @@ int appsvc_add_data(bundle *b, const char *key, const char *val);
  * @par Description:
  * This function sets an extra array data to launch application based on appsvc.
  *
- * @param[in] b bundle object 
- * @param[in] key key of extra data 
- * @param[in] val_array data 
+ * @param[in] b bundle object
+ * @param[in] key key of extra data
+ * @param[in] val_array data
  * @param[in] len Length of array
  *
  * @return 0 if success, negative value(<0) if fail
@@ -287,7 +330,7 @@ int appsvc_add_data(bundle *b, const char *key, const char *val);
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -312,18 +355,18 @@ int appsvc_add_data_array(bundle *b, const char *key, const char **val_array, in
  * @par Description:
  * This function sets a package name to launch application based on appsvc.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  * @param[in] pkg_name package name for explict launch
  *
  * @return 0 if success, negative value(<0) if fail
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -334,7 +377,7 @@ int appsvc_add_data_array(bundle *b, const char *key, const char **val_array, in
        bundle *b = NULL;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_PICK);
        appsvc_set_mime(b,"image/jpg");
        appsvc_set_pkgname(b, "org.tizen.mygallery");
@@ -342,7 +385,81 @@ int appsvc_add_data_array(bundle *b, const char *key, const char **val_array, in
  * @endcode
  *
  */
-int appsvc_set_pkgname(bundle *b, const char *pkg_name);
+/* Deprecated API */
+int appsvc_set_pkgname(bundle *b, const char *pkg_name); // __attribute__((deprecated));
+
+
+/**
+ * @par Description:
+ * This function sets a appid to launch application based on appsvc.
+ *
+ * @param[in] b bundle object
+ * @param[in] appid application id for explict launch
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @retval APPSVC_RET_OK - success
+ * @retval APPSVC_RET_ERROR - general error
+ * @retval APPSVC_RET_EINVAL - invalid argument(content)
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       bundle *b = NULL;
+
+       b = bundle_create();
+
+       appsvc_set_operation(b, APPSVC_OPERATION_PICK);
+       appsvc_set_mime(b,"image/jpg");
+       appsvc_set_appid(b, "org.tizen.mygallery");
+}
+ * @endcode
+ *
+ */
+int appsvc_set_appid(bundle *b, const char *appid);
+
+
+/**
+ * @par Description:
+ * This function sets a appid to launch application based on appsvc.
+ *
+ * @param[in] b bundle object
+ * @param[in] application category
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @retval APPSVC_RET_OK - success
+ * @retval APPSVC_RET_ERROR - general error
+ * @retval APPSVC_RET_EINVAL - invalid argument(content)
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       bundle *b = NULL;
+
+       b = bundle_create();
+
+       appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
+       appsvc_set_category(b, "http://tizen.org/category/app/browser");
+}
+ * @endcode
+ *
+ */
+int appsvc_set_category(bundle *b, const char *category);
 
 /**
  * @par Description:
@@ -355,15 +472,15 @@ int appsvc_set_pkgname(bundle *b, const char *pkg_name);
  *
  * @return callee's pid if success, negative value(<0) if fail
  * @retval callee's pid - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
- * @retval APPSVC_RET_ENOMATCH - no matching result Error 
+ * @retval APPSVC_RET_ENOMATCH - no matching result Error
  * @retval APPSVC_RET_ELAUNCH - failure on launching the app
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -375,7 +492,7 @@ int appsvc_set_pkgname(bundle *b, const char *pkg_name);
        static int num = 0;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_PICK);
        appsvc_set_mime(b,"image/jpg");
 
@@ -385,6 +502,7 @@ int appsvc_set_pkgname(bundle *b, const char *pkg_name);
  *
  */
 int appsvc_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data);
+int appsvc_usr_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data, uid_t uid);
 
 /**
  * @par Description:
@@ -397,21 +515,21 @@ int appsvc_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *
  * @return 0 if success, negative value(<0) if fail
  * @retval APPSVC_RET_OK - success
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
- * @retval APPSVC_RET_ENOMATCH - no matching result Error 
+ * @retval APPSVC_RET_ENOMATCH - no matching result Error
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
 #include <appsvc.h>
 
-static int iter_fn(const char* pkg_name, void *data)
+static int iter_fn(const char* appid, void *data)
 {
        printf("\t==========================\n");
-       printf("\t pkg_name: %s\n", pkg_name);
+       printf("\t appid: %s\n", appid);
        printf("\t==========================\n");
        return 0;
 }
@@ -422,7 +540,7 @@ static int iter_fn(const char* pkg_name, void *data)
        static int num = 0;
 
        b = bundle_create();
-       
+
        appsvc_set_operation(b, APPSVC_OPERATION_PICK);
        appsvc_set_mime(b,"image/jpg");
 
@@ -432,19 +550,58 @@ static int iter_fn(const char* pkg_name, void *data)
  *
  */
 int appsvc_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data);
+int appsvc_usr_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data, uid_t uid);
+
+/**
+ * @par Description:
+ * This API use to get default applications
+ *
+ * @param[in] iter_fn iterator function
+ * @param[in] data user-supplied data for iter_fn
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @retval APPSVC_RET_OK - success
+ * @retval APPSVC_RET_EINVAL - invalid argument(content)
+ * @retval APPSVC_RET_ENOMATCH - no matching result Error
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+static int iter_fn(const char* appid, void *data)
+{
+       printf("\t==========================\n");
+       printf("\t appid : %s\n", appid);
+       printf("\t==========================\n");
+       return 0;
+}
+
+...
+{
+       return appsvc_get_all_defapps(iter_fn, (void*)NULL);
+}
+ * @endcode
+ *
+ */
+int appsvc_get_all_defapps(appsvc_info_iter_fn iter_fn, void *data);
 
 /**
  * @par Description:
  * This function gets a operation from bundle.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  *
  * @return Pointer for operation string if success, NULL if fail
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -452,7 +609,7 @@ int appsvc_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data);
 
 ...
 {
-       char *val;      
+       char *val;
        val = appsvc_get_operation(b);
 }
  * @endcode
@@ -464,14 +621,14 @@ const char *appsvc_get_operation(bundle *b);
  * @par Description:
  * This function gets a uri from bundle.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  *
  * @return Pointer for uri string if success, NULL if fail
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -479,7 +636,7 @@ const char *appsvc_get_operation(bundle *b);
 
 ...
 {
-       char *val;      
+       char *val;
        val = appsvc_get_uri(b);
 }
  * @endcode
@@ -491,14 +648,14 @@ const char *appsvc_get_uri(bundle *b);
  * @par Description:
  * This function gets a mime-type from bundle.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  *
  * @return Pointer for mime-type string if success, NULL if fail
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -506,7 +663,7 @@ const char *appsvc_get_uri(bundle *b);
 
 ...
 {
-       char *val;      
+       char *val;
        val = appsvc_get_mime(b);
 }
  * @endcode
@@ -518,14 +675,14 @@ const char *appsvc_get_mime(bundle *b);
  * @par Description:
  * This function gets a package name from bundle.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  *
  * @return Pointer for package name string if success, NULL if fail
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -533,19 +690,74 @@ const char *appsvc_get_mime(bundle *b);
 
 ...
 {
-       char *val;      
+       char *val;
        val = appsvc_get_pkgname(b);
 }
  * @endcode
  *
  */
-const char *appsvc_get_pkgname(bundle *b);
+/* Deprecated API */
+const char *appsvc_get_pkgname(bundle *b); // __attribute__((deprecated));
+
+/**
+ * @par Description:
+ * This function gets a application id from bundle.
+ *
+ * @param[in] b bundle object
+ *
+ * @return Pointer for application id string if success, NULL if fail
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       char *val;
+       val = appsvc_get_appid(b);
+}
+ * @endcode
+ *
+ */
+const char *appsvc_get_appid(bundle *b);
+
+/**
+ * @par Description:
+ * This function gets a application category from bundle.
+ *
+ * @param[in] b bundle object
+ *
+ * @return Pointer for application category string if success, NULL if fail
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       char *val;
+       val = appsvc_get_category(b);
+}
+ * @endcode
+ *
+ */
+const char *appsvc_get_category(bundle *b);
 
 /**
  * @par Description:
  * This function gets value from key.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  * @param[in] key key
  *
  * @return Pointer for value string if success, NULL if fail
@@ -553,7 +765,7 @@ const char *appsvc_get_pkgname(bundle *b);
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -561,7 +773,7 @@ const char *appsvc_get_pkgname(bundle *b);
 
 ...
 {
-       char *val;      
+       char *val;
        val = appsvc_get_data(b, APPSVC_DATA_CC);
 }
  * @endcode
@@ -573,7 +785,7 @@ const char *appsvc_get_data(bundle *b, const char *key);
  * @par Description:
  * This function gets value from key.
  *
- * @param[in] b bundle object 
+ * @param[in] b bundle object
  * @param[in] key key
  * @param[out] len length of array
  *
@@ -582,7 +794,7 @@ const char *appsvc_get_data(bundle *b, const char *key);
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -590,13 +802,13 @@ const char *appsvc_get_data(bundle *b, const char *key);
 
 ...
 {
-       char **val_array;       
+       char **val_array;
        int len;
        char *val;
 
        if(appsvc_data_is_array(b, APPSVC_DATA_SELECTED))
                val_array = appsvc_get_data_array(b, APPSVC_DATA_SELECTED, &len);
-       else 
+       else
                val = appsvc_get_data(b, APPSVC_DATA_SELECTED);
 }
  * @endcode
@@ -608,17 +820,17 @@ const char **appsvc_get_data_array(bundle *b, const char *key, int *len);
  * @par Description:
  * This API create appsvc result bundle based on bundle received in reset event.
  *
- * @param[in] inb bundle received in reset event 
- * @param[in] outb bundle to use for returning result 
+ * @param[in] inb bundle received in reset event
+ * @param[in] outb bundle to use for returning result
  *
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see appsvc_send_result.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -628,7 +840,7 @@ const char **appsvc_get_data_array(bundle *b, const char *key, int *len);
 {
        struct appdata *ad = data;
        bundle* res_bundle;
-       
+
        appsvc_create_result_bundle(ad->b,&res_bundle);
        bundle_add(res_bundle, "result", "1");
        appsvc_send_result(res_bundle, 0);
@@ -646,13 +858,13 @@ int appsvc_create_result_bundle(bundle *inb, bundle **outb);
  * @param[in] result result value
  *
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre appsvc_create_result_bundle.
  * @post None.
  * @see appsvc_send_result.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -662,7 +874,7 @@ int appsvc_create_result_bundle(bundle *inb, bundle **outb);
 {
        struct appdata *ad = data;
        bundle* res_bundle;
-       
+
        appsvc_create_result_bundle(ad->b,&res_bundle);
        bundle_add(res_bundle, "result", "1");
        appsvc_send_result(res_bundle, 0);
@@ -682,13 +894,13 @@ int appsvc_send_result(bundle *b, appsvc_result_val result);
  * @param[in] defapp   default application
  *
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  * @retval APPSVC_RET_EINVAL - invalid argument(content)
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -701,7 +913,8 @@ int appsvc_send_result(bundle *b, appsvc_result_val result);
  * @endcode
  *
  */
-int appsvc_set_defapp(const char *op,const char *mime_type,const char *scheme,const char *defapp);
+int appsvc_set_defapp(const char *op, const char *mime_type, const char *uri,
+                               const char *defapp, uid_t uid);
 
 /**
  * @par Description:
@@ -710,12 +923,12 @@ int appsvc_set_defapp(const char *op,const char *mime_type,const char *scheme,co
  * @param[in] defapp   default application
  *
  * @retval APPSVC_RET_OK - success
- * @retval APPSVC_RET_ERROR - general error 
+ * @retval APPSVC_RET_ERROR - general error
  *
  * @pre None.
  * @post None.
  * @see None.
- * @remarks None. 
+ * @remarks None.
  *
  * @par Sample code:
  * @code
@@ -728,13 +941,39 @@ int appsvc_set_defapp(const char *op,const char *mime_type,const char *scheme,co
  * @endcode
  *
  */
-int appsvc_unset_defapp(const char *defapp);
+int appsvc_unset_defapp(const char *defapp, uid_t uid);
+
+/**
+ * @par Description:
+ * This API unset all of default applications associated with op, uri and mime-type.
+ *
+ *
+ * @retval APPSVC_RET_OK - success
+ * @retval APPSVC_RET_ERROR - general error
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       appsvc_unset_all_defapps();
+}
+ * @endcode
+ *
+ */
+int appsvc_unset_all_defapps();
 
 /**
  * @par Description:
  *     This API ask a application is default application or not.
  *
- * @param[in]  pkg_name        application package name
+ * @param[in]  appid   application appid
  * @return     true / false
  * @retval     1       app_name is default application in appsvc.
  * @retval     0       app_name is NOT default application in appsvc.
@@ -742,33 +981,33 @@ int appsvc_unset_defapp(const char *defapp);
   * @pre None.
   * @post None.
   * @see None.
-  * @remarks None. 
+  * @remarks None.
   *
   * @par Sample code:
   * @code
 #include <appsvc.h>
+
  ...
 
  * int is_defapp_browser_app()
- * { 
+ * {
  *      return appsvc_is_defapp("org.tizen.browser");
  * }
  *
  * @endcode
  * @remark
  *     None
-* 
+*
 */
-int appsvc_is_defapp(const char *pkg_name);
+int appsvc_is_defapp(const char *appid, uid_t uid);
 
 
 /**
  * @par Description:
  *     This API ask a extra data is array or not.
  *
- * @param[in] b bundle object 
- * @param[in] key key of extra data 
+ * @param[in] b bundle object
+ * @param[in] key key of extra data
  * @return     true / false
  * @retval     1       a extra data is array.
  * @retval     0       a extra data is not array.
@@ -776,27 +1015,83 @@ int appsvc_is_defapp(const char *pkg_name);
   * @pre None.
   * @post None.
   * @see None.
-  * @remarks None. 
+  * @remarks None.
   *
   * @par Sample code:
   * @code
 #include <appsvc.h>
+
  ...
 
- * int is_defapp_browser_app(bundle *b, char *key)
- * { 
+ * int appsvc_data_is_array(bundle *b, char *key)
+ * {
  *      return appsvc_data_is_array(b, key);
  * }
  *
  * @endcode
  * @remark
  *     None
-* 
+*
 */
 int appsvc_data_is_array(bundle *b, const char *key);
 
+int appsvc_subapp_terminate_request_pid(int pid);
 
+/**
+ * @par Description:
+ * This function sets an uri to launch application based on appsvc.
+ *
+ * @param[in] b bundle object
+ * @param[in] char *mode
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @retval APPSVC_RET_OK - success
+ * @retval APPSVC_RET_ERROR - general error
+ * @retval APPSVC_RET_EINVAL - invalid argument(content)
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       appsvc_set_launch_mode(app_control->data, mode);
+}
+ * @endcode
+ *
+ */
+int appsvc_set_launch_mode(bundle *b, const char *mode);
+
+/**
+ * @par Description:
+ * This function sets an uri to launch application based on appsvc.
+ *
+ * @param[in] b bundle object
+ *
+ * @return Pointer for launch mode string if success, NULL if fail
+ *
+ * @pre None.
+ * @post None.
+ * @see None.
+ * @remarks None.
+ *
+ * @par Sample code:
+ * @code
+#include <appsvc.h>
+
+...
+{
+       appsvc_get_launch_mode(app_control->data);
+}
+ * @endcode
+ *
+ */
+const char *appsvc_get_launch_mode(bundle *b);
 #ifdef __cplusplus
        }
 #endif