+ * @param[in] handle pointer to application info handle
+ * @param[out] autorestart pointer to hold package autorestart 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_autorestart(const char *appid)
+{
+ int ret = 0;
+ bool autorestart;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_autorestart(handle, &autorestart);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app autorestart: %d\n", autorestart);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_autorestart(pkgmgrinfo_appinfo_h handle, bool *autorestart);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_mainapp(pkgmgrinfo_appinfo_h handle, bool *mainapp)
+ * @brief This API gets the value for given application is main app 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] mainapp pointer to hold package mainapp 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_mainapp(const char *appid)
+{
+ int ret = 0;
+ bool mainapp;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_mainapp(handle, &mainapp);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("mainapp: %d\n", mainapp);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_mainapp(pkgmgrinfo_appinfo_h handle, bool *mainapp);
+
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_preload(pkgmgrinfo_appinfo_h handle, bool *preload)
+ * @brief This API gets the value for given application is preload 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] preload pointer to hold preload 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_preload(const char *appid)
+{
+ int ret = 0;
+ bool preload = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_preload(handle, &preload);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("preload: %d\n", preload);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+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 int pkgmgrinfo_appinfo_is_process_pool(pkgmgrinfo_appinfo_h handle, bool *process_pool)
+ * @brief This API gets the value for given application is process_pool 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] process_pool pointer to hold process_pool 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()
+ * @code
+static int get_app_process_pool(const char *appid)
+{
+ int ret = 0;
+ bool process_pool = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_process_pool(handle, &process_pool);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("process_pool: %d\n", process_pool);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_process_pool(pkgmgrinfo_appinfo_h handle, bool *process_pool);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_installed_storage_location(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_installed_storage *storage)
+ * @brief This API gets the installed storage location 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] app_type pointer to hold installed storage location
+ * @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()
+ * @code
+static int get_app_installed_location(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_installed_storage storage;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_installed_storage_location(handle, &storage);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("Installed storage location : %d\n", storage);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_installed_storage_location(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_installed_storage *storage);
+
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_category_exist(pkgmgrinfo_appinfo_h handle, const char *category, bool *exist)
+ * @brief This API checks if the application has the given category
+ *
+ * @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[in] category category
+ * @param[out] exist value Gets whether the application has the given category
+ * @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
+ * @code
+static int is_category_exist(const char *appid, const char *category)
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_h handle;
+ bool exist = false;
+
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+
+ ret = pkgmgrinfo_appinfo_is_category_exist(handle, category, &exist);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_category_exist(pkgmgrinfo_appinfo_h handle, const char *category, bool *exist);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_ui_gadget(pkgmgrinfo_appinfo_h handle, bool *ui_gadget)
+ * @brief This API gets the application 'ui_gadget' 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] ui_gadget pointer to hold package ui_gadget value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+static int get_app_ui_gadget(const char *appid)
+{
+ int ret = 0;
+ bool ui_gadget;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_ui_gadget(handle, &ui_gadget);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app ui_gadget: %d\n", ui_gadget);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_ui_gadget(pkgmgrinfo_appinfo_h handle, bool *ui_gadget);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle, bool *support_disable)
+ * @brief This API gets the application 'support_disable' 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] support_disable pointer to hold package support_disable value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+static int get_app_support_disable(const char *appid)
+{
+ int ret = 0;
+ bool support_disable;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_support_disable(handle, &support_disable);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app support_disable: %d\n", support_disable);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle, bool *support_disable);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_removable(pkgmgrinfo_appinfo_h handle, bool *removable)
+ * @brief This API gets the application 'removable' 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] removable pointer to hold package removable 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()
+ * @code
+static int get_app_removable(const char *appid)
+{
+ int ret = 0;
+ bool removable;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_removable(handle, &removable);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app removable: %d\n", removable);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_removable(pkgmgrinfo_appinfo_h handle, bool *removable);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_system(pkgmgrinfo_appinfo_h handle, bool *system)
+ * @brief This API gets the application 'system' 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] system pointer to hold package system 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()
+ * @code
+static int get_app_system(const char *appid)
+{
+ int ret = 0;
+ bool system = false;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_system(handle, &system);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app system: %d\n", system);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_system(pkgmgrinfo_appinfo_h handle, bool *system);
+
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_disabled(pkgmgrinfo_appinfo_h handle, bool *disabled)
+ * @brief This API gets the application 'is_disable' 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] disabled pointer to hold application is_disabled value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+static int get_app_is_disable(const char *appid)
+{
+ int ret = 0;
+ bool is_disable;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_disabled(handle, &is_disable);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app is_disable: %d\n", is_disable);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_disabled(pkgmgrinfo_appinfo_h handle, bool *disabled);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_global(pkgmgrinfo_appinfo_h handle, bool *global)
+ * @brief This API gets whether the given application is global application or user application
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[in] global pointer to hold application global 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()
+ static int get_app_is_global(const char *appid)
+ {
+ int ret = 0;
+ bool global;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_global(handle, &global);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app is_global: %d\n", global);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+ }
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_global(pkgmgrinfo_appinfo_h handle, bool *global);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_splash_screen_display(pkgmgrinfo_appinfo_h handle, bool *splash_screen_display)
+ * @brief This API gets the application 'splash_screen_display' 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] splash_screen_display pointer to hold package splash_screen_display 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
+ */
+int pkgmgrinfo_appinfo_get_splash_screen_display(pkgmgrinfo_appinfo_h handle, bool *splash_screen_display);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_setup_appid(pkgmgrinfo_appinfo_h handle, char **setup_appid)
+ * @brief This API gets the application 'setup_appid' 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] setup_appid pointer to hold package setup_appid 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
+ */
+int pkgmgrinfo_appinfo_get_setup_appid(pkgmgrinfo_appinfo_h handle, char **setup_appid);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_is_support_ambient(pkgmgrinfo_appinfo_h handle, bool *support_ambient)
+ * @brief This API gets the application 'support_ambient' 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] support_ambient pointer to hold package support_ambient 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
+ */
+int pkgmgrinfo_appinfo_is_support_ambient(pkgmgrinfo_appinfo_h handle, bool *support_ambient);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
+ * @brief This API destroys the application information handle freeing up all the resources
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info handle.
+ * @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 None
+ * @see pkgmgrinfo_appinfo_get_pkgid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_type(const char *appid)
+{
+ int ret = 0;
+ char *type = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_apptype(handle, &type);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("apptype: %s\n", type);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_create(pkgmgrinfo_appinfo_filter_h *handle)
+ * @brief This API creates the application information filter handle from db. All filter properties will be ANDed.
+ The query will search the entire application information collected from the manifest file of all the installed packages
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[out] handle pointer to the application info filter handle.
+ * @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 None
+ * @post pkgmgrinfo_appinfo_filter_destroy()
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @code
+static int get_capp_count()
+{
+ int ret = 0;
+ int count = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_TYPE, "capp");
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ printf("No of capp: %d\n", count);
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_create(pkgmgrinfo_appinfo_filter_h *handle);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_destroy(pkgmgrinfo_appinfo_filter_h handle)
+ * @brief This API destroys the application information filter handle freeing up all the resources
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info filter handle.
+ * @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_filter_create()
+ * @post None
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @code
+static int get_capp_count()
+{
+ int ret = 0;
+ int count = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_TYPE, "capp");
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ printf("No of capp: %d\n", count);
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_destroy(pkgmgrinfo_appinfo_filter_h handle);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_add_bool(pkgmgrinfo_appinfo_filter_h handle, const char *property, const bool value)
+ * @brief This API adds a boolean filter property to the filter handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info filter handle.
+ * @param[in] property boolean property name.
+ * @param[in] value value corresponding to the property.
+ * @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_filter_create()
+ * @post pkgmgrinfo_appinfo_filter_destroy()
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @code
+static int get_taskmanageable_app_count()
+{
+ int ret = 0;
+ int count = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_TASKMANAGE, 1);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ printf("No of taskmanageable apps: %d\n", count);
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_add_bool(pkgmgrinfo_appinfo_filter_h handle,
+ const char *property, const bool value);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_add_int(pkgmgrinfo_appinfo_filter_h handle, const char *property, const int value)
+ * @brief This API adds an integer filter property to the filter handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info filter handle.
+ * @param[in] property integer property name.
+ * @param[in] value value corresponding to the property.
+ * @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_filter_create()
+ * @post pkgmgrinfo_appinfo_filter_destroy()
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @code
+static int get_taskmanageable_app_count()
+{
+ int ret = 0;
+ int count = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_XXX, 10);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ printf("No of apps: %d\n", count);
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_add_int(pkgmgrinfo_appinfo_filter_h handle,
+ const char *property, const int value);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_add_string(pkgmgrinfo_appinfo_filter_h handle, const char *property, const char *value)
+ * @brief This API adds a string filter property to the filter handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info filter handle.
+ * @param[in] property string property name.
+ * @param[in] value value corresponding to the property.
+ * @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_filter_create()
+ * @post pkgmgrinfo_appinfo_filter_destroy()
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @code
+static int get_capp_count()
+{
+ int ret = 0;
+ int count = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_TYPE, "capp");
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ printf("No of capp: %d\n", count);
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_add_string(pkgmgrinfo_appinfo_filter_h handle,
+ const char *property, const char *value);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_filter_foreach_appinfo(pkgmgrinfo_appinfo_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data)
+ * @brief This API executes the user supplied callback function for each application that satisfy the filter conditions
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info filter handle.
+ * @param[in] app_cb callback function.
+ * @param[in] user_data user data to be passed to the callback function
+ * @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_filter_create()
+ * @post pkgmgrinfo_appinfo_filter_destroy()
+ * @see pkgmgrinfo_appinfo_filter_count()
+ * @code
+int app_list_cb(pkgmgrinfo_appinfo_h handle, void *user_data)
+{
+ char *appid = NULL;
+ pkgmgrinfo_appinfo_get_appid(handle, &appid);
+ printf("appid : %s\n", appid);
+ return 0;
+}
+
+static int get_capp_list()
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_filter_h handle;
+ ret = pkgmgrinfo_appinfo_filter_create(&handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_TYPE, "capp");
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, app_list_cb, NULL);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return -1;
+ }
+ pkgmgrinfo_appinfo_filter_destroy(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_filter_foreach_appinfo(pkgmgrinfo_appinfo_filter_h handle,
+ pkgmgrinfo_app_list_cb app_cb, void *user_data);
+int pkgmgrinfo_appinfo_usr_filter_foreach_appinfo(pkgmgrinfo_appinfo_filter_h handle,
+ pkgmgrinfo_app_list_cb app_cb, void *user_data, uid_t uid);
+
+/**
+ * @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
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @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