Add missing api declaration 91/47591/1
authorSangyoon Jang <s89.jang@samsung.com>
Mon, 7 Sep 2015 01:50:44 +0000 (10:50 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Mon, 7 Sep 2015 01:52:03 +0000 (10:52 +0900)
add aul_app_get_pkgid_bypid at aul.h
add _status_get_pkgid_bypid at amd_status.h

Change-Id: Id8f5fb936e28cc558ddf72493e8ccafb47e5b0ed
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
am_daemon/amd_status.h
include/aul.h

index acdc0b7..43b4044 100644 (file)
@@ -35,6 +35,7 @@ int _status_app_is_running_v2(const char *appid, uid_t caller_uid);
 char *_status_app_get_appid_bypid(int pid);
 int _status_send_running_appinfo_v2(int fd); //depcrecated
 int _status_get_appid_bypid(int fd, int pid);
+int _status_get_pkgid_bypid(int fd, int pid);
 
 
 
index e2fd249..4422b5f 100644 (file)
@@ -790,6 +790,45 @@ int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len);
 
 /**
  * @par Description:
+ *     This API get application pkgid by pid
+ * @par Purpose:
+ *     If you want to get pkgid 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] pkgid           package id
+ * @param[in]  len             length of pkgid
+ * @return     0 if success, negative value(<0) if fail
+ * @retval     AUL_R_OK        - success
+ * @retval     AUL_R_ERROR     - no such a appid
+ * @pre
+ *     None
+ * @post
+ *     None
+ * @see
+ *     None
+ * @code
+ * #include <aul.h>
+ * #include <bundle.h>
+ *
+ * static int app_reset(bundle *b, void *data)
+ * {
+ *     int pid;
+ *     char pkgid[255];
+ *
+ *     pid = atoi(bundle_get_val(b, AUL_K_CALLER_PID));
+ *     aul_app_get_pkgid_bypid(pid, pkgid, sizeof(pkgid));
+ * }
+ *
+ * @endcode
+ * @remark
+ *     None
+*/
+int aul_app_get_pkgid_bypid(int pid, char *pkgid, int len);
+
+/**
+ * @par Description:
  *     This API get application appid by pid
  * @par Purpose:
  *     If you want to get appid of running application, use this API
@@ -827,7 +866,6 @@ int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len);
 */
 int aul_app_get_appid_bypid(int pid, char *appid, int len);
 
-
 /** @} */
 
 /**