}pkgmgrinfo_app_hwacceleration;
typedef enum {
+ PMINFO_SCREENREADER_OFF = 0, /**< Don't use screen reader*/
+ PMINFO_SCREENREADER_ON = 1, /**< Use screen reader*/
+ PMINFO_SCREENREADER_USE_SYSTEM_SETTING = 2 /**< Follow system setting for screen reader */
+}pkgmgrinfo_app_screenreader;
+
+typedef enum {
PMINFO_RECENTIMAGE_USE_ICON = 0, /**<Use icon for recent image*/
PMINFO_RECENTIMAGE_USE_CAPTURE = 1, /**< Use capture for recent image*/
PMINFO_RECENTIMAGE_USE_NOTHING = 2 /**< Don't use recent image */
#define PMINFO_APPINFO_PROP_APP_CATEGORY "PMINFO_APPINFO_PROP_APP_CATEGORY"
/** String property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_HWACCELERATION "PMINFO_APPINFO_PROP_APP_HWACCELERATION"
+ /** String property for filtering based on app info*/
+#define PMINFO_APPINFO_PROP_APP_SCREENREADER "PMINFO_APPINFO_PROP_APP_SCREENREADER"
/** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_NODISPLAY "PMINFO_APPINFO_PROP_APP_NODISPLAY"
/** string property for filtering based on pkg info*/
#define PMINFO_PKGINFO_PROP_RANGE_BASIC "PMINFO_PKGINFO_PROP_RANGE_BASIC"
+/* For multiuser support */
+char *getUserDBLabel(void);
+char *getUserPkgParserDBPath(void);
+char *getUserPkgParserDBPathUID(uid_t uid);
+char *getUserPkgParserJournalDBPath(uid_t uid);
+char *getUserPkgCertDBPath(void);
+char *getUserPkgCertDBPathUID(uid_t uid);
+char *getUserPkgCertJournalDBPath(uid_t uid);
+const char* getUserDesktopPath(uid_t uid);
+const char* getUserManifestPath(uid_t uid);
+
/**
* @fn int pkgmgrinfo_pkginfo_get_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data)
+ * @fn int pkgmgrinfo_pkginfo_get_usr_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data, uid_t uid)
* @brief This API gets list of installed packages
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
* @param[in] pkg_list_cb iteration function for list
* @param[in] user_data user data to be passed to callback function
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
* @endcode
*/
int pkgmgrinfo_pkginfo_get_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data);
-
+int pkgmgrinfo_pkginfo_get_usr_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data, uid_t uid);
/**
* @fn int pkgmgrinfo_pkginfo_get_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle)
* @brief This API creates the package information handle from db
* @par Sync (or) Async : Synchronous API
*
* @param[in] pkgid pointer to package ID
+ * @param[in] uid the addressee user id of the instruction
* @param[out] handle pointer to the package info handle.
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @endcode
*/
int pkgmgrinfo_pkginfo_get_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle);
+int pkgmgrinfo_pkginfo_get_usr_pkginfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkginfo_h *handle);
/**
* @fn int pkgmgrinfo_pkginfo_get_pkgname(pkgmgrinfo_pkginfo_h handle, char **pkg_name)
* @endcode
*/
int pkgmgrinfo_pkginfo_compare_pkg_cert_info(const char *lhs_package_id, const char *rhs_package_id, pkgmgrinfo_cert_compare_result_type_e *compare_result);
-
+int pkgmgrinfo_pkginfo_compare_usr_pkg_cert_info(const char *lhs_package_id, const char *rhs_package_id, uid_t uid, pkgmgrinfo_cert_compare_result_type_e *compare_result);
/**
* @fn int pkgmgrinfo_pkginfo_compare_app_cert_info(const char *lhs_app_id, const char *rhs_app_id, pkgmgrinfo_cert_compare_result_type_e *compare_result)
* @brief This API compare the cert information from given app id
* @endcode
*/
int pkgmgrinfo_pkginfo_compare_app_cert_info(const char *lhs_app_id, const char *rhs_app_id, pkgmgrinfo_cert_compare_result_type_e *compare_result);
-
+int pkgmgrinfo_pkginfo_compare_usr_app_cert_info(const char *lhs_app_id, const char *rhs_app_id, uid_t uid, pkgmgrinfo_cert_compare_result_type_e *compare_result);
/**
* @fn int pkgmgrinfo_pkginfo_is_removable(pkgmgrinfo_pkginfo_h handle, bool *removable)
* @brief This API gets the package 'removable' value from the package ID
int pkgmgrinfo_pkginfo_is_preload(pkgmgrinfo_pkginfo_h handle, bool *preload);
/**
+ * @fn int pkgmgrinfo_pkginfo_is_system(pkgmgrinfo_pkginfo_h handle, bool *system)
+ * @brief This API gets the value for given handle is system or not
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to package info handle
+ * @param[out] system pointer to hold system is or not
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ * @see pkgmgrinfo_pkginfo_is_readonly()
+ * @code
+static int get_pkg_system(const char *pkgid)
+{
+ int ret = 0;
+ bool system = false;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_is_system(handle, &system);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("pkg system: %d\n", system);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_pkginfo_is_system(pkgmgrinfo_pkginfo_h handle, bool *system);
+
+/**
* @fn int pkgmgrinfo_pkginfo_is_readonly(pkgmgrinfo_pkginfo_h handle, bool *readonly)
* @brief This API gets the package 'readonly' value from the package ID
*
/**
* @fn int pkgmgrinfo_pkginfo_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count)
+ * @fn int pkgmgrinfo_pkginfo_usr_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count, uid_t uid)
* @brief This API counts the package that satisfy the filter conditions
*
* @par This API is for package-manager client application
*
* @param[in] handle pointer to the package info filter handle.
* @param[in] count pointer to store the count value.
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
* @endcode
*/
int pkgmgrinfo_pkginfo_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count);
-
+int pkgmgrinfo_pkginfo_usr_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count, uid_t uid);
/**
* @fn int pkgmgrinfo_pkginfo_foreach_privilege(pkgmgrinfo_pkginfo_h handle,
pkgmgrinfo_pkg_privilege_list_cb privilege_func, void *user_data);
* @endcode
*/
int pkgmgrinfo_appinfo_get_install_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
-
+int pkgmgrinfo_appinfo_get_usr_install_list(pkgmgrinfo_app_list_cb app_func, uid_t uid, void *user_data);
/**
* @fn int pkgmgrinfo_appinfo_get_installed_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
* @brief This API gets list of installed applications from all packages.
* @endcode
*/
int pkgmgrinfo_appinfo_get_installed_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
+int pkgmgrinfo_appinfo_get_usr_installed_list(pkgmgrinfo_app_list_cb app_func, uid_t uid, void *user_data);
/**
* @fn int pkgmgrinfo_appinfo_get_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle)
* @endcode
*/
int pkgmgrinfo_appinfo_get_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle);
-
+int pkgmgrinfo_appinfo_get_usr_appinfo(const char *appid, uid_t uid, pkgmgrinfo_appinfo_h *handle);
/**
* @fn int pkgmgrinfo_appinfo_get_appid(pkgmgrinfo_appinfo_h handle, char **appid)
* @brief This API gets the application ID
*/
int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type);
+/**
+ * @fn int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
+ * @brief This API gets the application 'hwacceleration' value from the app ID
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] hwacceleration pointer to hold package hwacceleration value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_hwacceleration(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_app_hwacceleration hwacceleration;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_hwacceleration(handle, &hwacceleration);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app hwacceleration: %d\n", hwacceleration);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader)
+ * @brief This API gets the application 'screenreader' value from the app ID
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] screenreader pointer to hold package accessibility value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_screenreader(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_app_screenreader screenreader = PMINFO_USE_SYSTEM_SETTING;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_screenreader(handle, &screenreader);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app screenreader: %d\n", screenreader);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
+ * @brief This API gets the application's landscape & portrait effect images
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] portrait_img contains portrait mode effect image
+ * @param[out] landscape_img contains landscape mode effect image
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_nodisplay()
+ * @code
+static int get_app_effectimages(const char *appid)
+{
+ int ret = 0;
+ char *portraitimg = NULL;
+ char *landscapeimg = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_effectimage(handle, &portraitimg, &landscapeimg);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app effect image portrait: %s, app effect image landscape : %s\n", portraitimg, landscapeimg);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid)
+ * @brief This API gets the submode_mainid of the application
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info handle.
+ * @param[out] submode_mainid pointer to hold package name
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_submode_mainid(const char *appid)
+{
+ int ret = 0;
+ char *submode_mainid = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_submode_mainid(handle, &submode_mainid);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("submode_mainid: %s\n", submode_mainid);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid);
/**
* @fn int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
/**
* @fn int pkgmgrinfo_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle,
pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data);
+ * @fn int pkgmgrinfo_usr_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data, uid_t uid);
* @brief This API gets the list of app-control for a particular application
*
* @par This API is for package-manager client application
* @param[in] handle pointer to the application info handle.
* @param[in] appcontrol_func callback function for list
* @param[in] user_data user data to be passed to callback function
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
*/
int pkgmgrinfo_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle,
pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data);
+int pkgmgrinfo_usr_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data, uid_t uid);
/**
* @fn int pkgmgrinfo_appinfo_is_nodisplay(pkgmgrinfo_appinfo_h handle, bool *nodisplay)
int pkgmgrinfo_appinfo_is_indicator_display_allowed(pkgmgrinfo_appinfo_h handle, bool *indicator_disp);
/**
- * @fn int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
- * @brief This API gets the application's landscape & portrait effect images
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to application info handle
- * @param[out] portrait_img contains portrait mode effect image
- * @param[out] landscape_img contains landscape mode effect image
- * @return 0 if success, error code(<0) if fail
- * @retval PMINFO_R_OK success
- * @retval PMINFO_R_EINVAL invalid argument
- * @retval PMINFO_R_ERROR internal error
- * @pre pkgmgrinfo_appinfo_get_appinfo()
- * @post pkgmgrinfo_appinfo_destroy_appinfo()
- * @see pkgmgrinfo_appinfo_get_appid()
- * @see pkgmgrinfo_appinfo_is_nodisplay()
- * @code
-static int get_app_effectimages(const char *appid)
-{
- int ret = 0;
- char *portraitimg = NULL;
- char *landscapeimg = NULL;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_get_effectimage(handle, &portraitimg, &landscapeimg);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- printf("app effect image portrait: %s, app effect image landscape : %s\n", portraitimg, landscapeimg);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img);
-
-/**
* @fn int pkgmgrinfo_appinfo_is_taskmanage(pkgmgrinfo_appinfo_h handle, bool *taskmanage)
* @brief This API gets the application 'taskmanage' value from the app ID
*
int pkgmgrinfo_appinfo_is_enabled(pkgmgrinfo_appinfo_h handle, bool *enabled);
/**
- * @fn int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
- * @brief This API gets the application 'hwacceleration' value from the app ID
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to application info handle
- * @param[out] hwacceleration pointer to hold package hwacceleration value
- * @return 0 if success, error code(<0) if fail
- * @retval PMINFO_R_OK success
- * @retval PMINFO_R_EINVAL invalid argument
- * @retval PMINFO_R_ERROR internal error
- * @pre pkgmgrinfo_appinfo_get_appinfo()
- * @post pkgmgrinfo_appinfo_destroy_appinfo()
- * @see pkgmgrinfo_appinfo_get_appid()
- * @see pkgmgrinfo_appinfo_is_multiple()
- * @code
-static int get_app_hwacceleration(const char *appid)
-{
- int ret = 0;
- pkgmgrinfo_app_hwacceleration hwacceleration;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_get_hwacceleration(handle, &hwacceleration);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- printf("app hwacceleration: %d\n", hwacceleration);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration);
-
-/**
* @fn int pkgmgrinfo_appinfo_is_onboot(pkgmgrinfo_appinfo_h handle, bool *onboot)
* @brief This API gets the application 'onboot' value from the app ID
*
int pkgmgrinfo_appinfo_is_preload(pkgmgrinfo_appinfo_h handle, bool *preload);
/**
+ * @fn int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode)
+ * @brief This API gets the value for given application is submode or not from handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] submode pointer to hold submode is or not
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_submode(const char *appid)
+{
+ int ret = 0;
+ bool submode = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_submode(handle, &submode);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("submode: %d\n", submode);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode);
+
+/**
* @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
* @brief This API destroys the application information handle freeing up all the resources
*
/**
* @fn int pkgmgrinfo_appinfo_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count)
+ * @fn int pkgmgrinfo_appinfo_usr_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count, uid_t uid)
* @brief This API counts the application that satisfy the filter conditions
*
* @par This API is for package-manager client application
*
* @param[in] handle pointer to the application info filter handle.
* @param[in] count pointer to store count value
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
* @endcode
*/
int pkgmgrinfo_appinfo_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count);
-
+int pkgmgrinfo_appinfo_usr_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count, uid_t uid);
/**
* @fn int pkgmgrinfo_appinfo_metadata_filter_create(pkgmgrinfo_appinfo_metadata_filter_h *handle)
* @brief This API creates the application's metadata information filter handle from db.
/**
* @fn int pkgmgrinfo_appinfo_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data)
+ * @fn int pkgmgrinfo_appinfo_usr_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data, uid_t uid)
* @brief This API executes the filter query. The query will search the entire application metadata information collected from
* the manifest file of all the installed packages. For each application returned by the query, the callback will be called. If callback returns
* negative value, no more callbacks will be called and API will return.
* @param[in] handle pointer to the application metadata info filter handle.
* @param[in] app_cb function pointer to callback
* @param[in] user_data pointer to user data
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
*/
int pkgmgrinfo_appinfo_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle,
pkgmgrinfo_app_list_cb app_cb, void *user_data);
-
+int pkgmgrinfo_appinfo_usr_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle,
+ pkgmgrinfo_app_list_cb app_cb, void *user_data, uid_t uid);
/**
* @fn int pkgmgrinfo_pkginfo_create_certinfo(pkgmgrinfo_certinfo_h *handle)
* @brief This API creates the package cert information handle to get data from db.
/**
* @fn int pkgmgrinfo_create_pkgdbinfo(const char *pkgid, pkgmgrinfo_pkgdbinfo_h *handle)
+ * @fn int pkgmgrinfo_create_pkgusrdbinfo(const char *pkgid, pkgmgrinfo_pkgdbinfo_h *handle)
* @brief This API creates the package db information handle to set data in db.
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
* @param[in] pkgid pointer to the package ID.
+ * @param[in] uid the addressee user id of the instruction
* @param[out] handle pointer to the package db info handle.
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @endcode
*/
int pkgmgrinfo_create_pkgdbinfo(const char *pkgid, pkgmgrinfo_pkgdbinfo_h *handle);
+int pkgmgrinfo_create_pkgusrdbinfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkgdbinfo_h *handle);
/**
* @fn int pkgmgrinfo_set_type_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *type)
/**
* @fn int pkgmgrinfo_save_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle)
+ * @fn int pkgmgrinfo_save_pkgdbusrinfo(pkgmgrinfo_pkgdbinfo_h handle, uid_t uid)
* @brief This API saves all the information from the handle to the DB.
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
* @param[in] handle pointer to the package db info handle.
+ * @param[in] uid the addressee user id of the instruction
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
* @endcode
*/
int pkgmgrinfo_save_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle);
-
+int pkgmgrinfo_save_pkgdbusrinfo(pkgmgrinfo_pkgdbinfo_h handle, uid_t uid);
/**
* @fn int pkgmgrinfo_destroy_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle)
* @brief This API destroys the package db information handle freeing up all the resources
* @endcode
*/
int pkgmgrinfo_appinfo_set_guestmode_visibility(pkgmgrinfo_appinfo_h handle, bool status);
+ int pkgmgrinfo_appinfo_set_usr_guestmode_visibility(pkgmgrinfo_appinfo_h handle, uid_t uid, bool status);
+/**
+ * @pkgmgrinfo client API
+**/
+
+/**
+ * @brief listening status type in pkgmgrinfo.
+ */
+#define PMINFO_CLIENT_STATUS_ALL 0x00
+#define PMINFO_CLIENT_STATUS_INSTALL 0x01
+#define PMINFO_CLIENT_STATUS_UNINSTALL 0x02
+#define PMINFO_CLIENT_STATUS_UPGRADE 0x04
+#define PMINFO_CLIENT_STATUS_MOVE 0x08
+#define PMINFO_CLIENT_STATUS_CLEAR_DATA 0x10
+#define PMINFO_CLIENT_STATUS_INSTALL_PROGRESS 0x20
+
+/**
+ * @brief type definition.
+ */
+typedef void pkgmgrinfo_client;
+typedef int (*pkgmgrinfo_handler)(int req_id, const char *pkg_type,
+ const char *pkgid, const char *key,
+ const char *val, const void *pmsg, void *data);
+
+typedef enum {
+ PMINFO_REQUEST = 0,
+ PMINFO_LISTENING,
+ PMINFO_BROADCAST,
+}pkgmgrinfo_client_type;
+
+/**
+ * @brief This APIs provides pkgmgrinfo client listener
+ */
+pkgmgrinfo_client *pkgmgrinfo_client_new(pkgmgrinfo_client_type ctype);
+int pkgmgrinfo_client_set_status_type(pkgmgrinfo_client *pc, int status_type);
+int pkgmgrinfo_client_listen_status(pkgmgrinfo_client *pc, pkgmgrinfo_handler event_cb, void *data);
+int pkgmgrinfo_client_free(pkgmgrinfo_client *pc);
+int pkgmgrinfo_client_request_enable_external_pkg(char *pkgid);
+
+/**
+ * @pkgmgrinfo client API end
+**/
/** @} */