#define PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING "PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING"
/** Boolean property for filtering based on package info*/
#define PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE"
+ /** Boolean property for filtering based on package info*/
+#define PMINFO_PKGINFO_PROP_PACKAGE_DISABLE "PMINFO_PKGINFO_PROP_PACKAGE_DISABLE"
+ /** Boolean property for filtering based on package info*/
+#define PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE "PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE"
/** Integer property for filtering based on package info*/
#define PMINFO_PKGINFO_PROP_PACKAGE_SIZE "PMINFO_PKGINFO_PROP_PACKAGE_SIZE"
/** String property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_PACKAGE "PMINFO_APPINFO_PROP_APP_PACKAGE"
/** String property for filtering based on app info*/
-#define PMINFO_APPINFO_PROP_APP_METADATA_KEY "PMINFO_APPINFO_PROP_APP_METADATA_KEY"
- /** String property for filtering based on app info*/
-#define PMINFO_APPINFO_PROP_APP_METADATA_VALUE "PMINFO_APPINFO_PROP_APP_METADATA_VALUE"
+#define PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE "PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE"
- /** Integer property for filtering app disabled by user*/
-#define PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER "PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER_VALUE"
+/** Integer property for filtering app support mode */
+#define PMINFO_APPINFO_PROP_APP_SUPPORT_MODE "PMINFO_APPINFO_PROP_APP_SUPPORT_MODE"
/** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_NODISPLAY "PMINFO_APPINFO_PROP_APP_NODISPLAY"
/** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_UI_GADGET "PMINFO_APPINFO_PROP_APP_UI_GADGET"
/** Boolean property for filtering based on app info*/
+#define PMINFO_APPINFO_PROP_APP_DISABLE "PMINFO_APPINFO_PROP_APP_DISABLE"
+ /** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE "PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE"
+ /** Boolean property for filtering based on app info*/
+#define PMINFO_APPINFO_PROP_APP_CHECK_STORAGE "PMINFO_APPINFO_PROP_APP_CHECK_STORAGE"
/** will be updated*/
/** string property for filtering based on pkg info*/
#define PMINFO_PKGINFO_PROP_RANGE_BASIC "PMINFO_PKGINFO_PROP_RANGE_BASIC"
/* For multiuser support */
-const char *getIconPath(uid_t uid);
-const char *getUserPkgParserDBPath(void);
-const char *getUserPkgParserDBPathUID(uid_t uid);
-const char *getUserPkgCertDBPath(void);
-const char *getUserPkgCertDBPathUID(uid_t uid);
-const char *getUserDesktopPath(uid_t uid);
-const char *getUserManifestPath(uid_t uid);
+const char *getIconPath(uid_t uid, bool readonly);
+char *getUserPkgParserDBPath(void);
+char *getUserPkgParserDBPathUID(uid_t uid);
+char *getUserPkgCertDBPath(void);
+char *getUserPkgCertDBPathUID(uid_t uid);
+const char *getUserManifestPath(uid_t uid, bool readonly);
/**
* @fn int pkgmgrinfo_pkginfo_get_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data)
*/
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_disabled_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data)
+ * @fn int pkgmgrinfo_pkginfo_get_usr_disabled_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data, uid_t uid)
+ * @brief This API gets list of disabled 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
+ * @retval PMINFO_R_ERROR internal error
+ * @pre None
+ * @post None
+ */
+int pkgmgrinfo_pkginfo_get_disabled_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data);
+int pkgmgrinfo_pkginfo_get_usr_disabled_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
+ * @brief This API creates the package information handle from db which is not disabled
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
int pkgmgrinfo_pkginfo_get_usr_pkginfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkginfo_h *handle);
/**
+ * @fn int pkgmgrinfo_pkginfo_get_disabled_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle)
+ * @brief This API creates the disabled package information handle from db
+ *
+ * @par This API is for package-manager client application
+ * @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
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre None
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkginfo()
+ */
+int pkgmgrinfo_pkginfo_get_disabled_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle);
+int pkgmgrinfo_pkginfo_get_usr_disabled_pkginfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkginfo_h *handle);
+
+/**
+ * @fn int pkgmgrinfo_pkginfo_get_all_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle)
+ * @brief This API creates the package information handle from db regardless of its disable or storage status
+ *
+ * @par This API is for package-manager client application
+ * @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
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre None
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ * @see pkgmgrinfo_pkginfo_is_removable()
+ * @code
+static int get_pkg_type(const char *pkgid)
+{
+ int ret = 0;
+ char *type = NULL;
+ pkgmgrinfo_pkginfo_h handle;
+ ret = pkgmgrinfo_pkginfo_get_all_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_get_type(handle, &type);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("pkgtype: %s\n", type);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_pkginfo_get_all_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle);
+int pkgmgrinfo_pkginfo_get_usr_all_pkginfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkginfo_h *handle);
+
+/**
* @fn int pkgmgrinfo_pkginfo_get_pkgname(pkgmgrinfo_pkginfo_h handle, char **pkg_name)
* @brief This API gets the package name from the package ID
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] handle pointer to the pkginfo handle.
- * @param[out] tep_name pointer to hold tep name
+ * @param[in] handle pointer to the pkginfo handle.
+ * @param[out] tep_name pointer to hold tep 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_pkginfo_get_pkginfo()
- * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @pre pkgmgrinfo_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
* @see pkgmgrinfo_pkginfo_get_pkgid()
* @code
static int get_tep_name(const char *pkgid)
int pkgmgrinfo_pkginfo_get_tep_name(pkgmgrinfo_pkginfo_h handle, char **tep_name);
/**
- * @fn int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location)
- * @brief This API gets the package install location from the package ID
+ * @fn int pkgmgrinfo_pkginfo_get_zip_mount_file(pkgmgrinfo_pkginfo_h handle, char **zip_mount_file)
+ * @brief This API gets package mount point path associated with the package
+ * if package is mount-installed. Otherwise, zip_mount_file is left as NULL value
*
- * @par This API is for package-manager client application
+ * @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] location pointer to hold package install location
+ * @param[in] handle pointer to the pkginfo handle.
+ * @param[out] zip_mount_file pointer to hold zip mount file
* @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_removable()
+ * @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()
* @code
-static int get_pkg_install_location(const char *pkgid)
+static int get_zip_mount_file(const char *pkgid)
{
int ret = 0;
- pkgmgrinfo_install_location location;
- pkgmgrinfo_pkginfo_h handle;
+ char *zip_mount_file = NULL;
+ pkgmgrinfo_pkginfo_h handle = NULL;
ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_get_install_location(handle, &location);
+ ret = pkgmgrinfo_pkginfo_get_zip_mount_file(handle, &zip_mount_file);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return -1;
}
- printf("pkg install location: %d\n", location);
+ if (zip_mount_file != NULL)
+ printf("Zip mount path is: %s\n", zip_mount_file);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location);
+int pkgmgrinfo_pkginfo_get_zip_mount_file(pkgmgrinfo_pkginfo_h handle, char **zip_mount_file);
/**
- * @fn int pkgmgrinfo_pkginfo_get_package_size(pkgmgrinfo_pkginfo_h handle, int *size)
- * @brief This API gets the package size from the package ID. size will be 0 if package install location is internal-only.
- size will be 0 if package install location is prefer-external but size is not specified in manifest file.Application should check
- the return value of pkgmgrinfo_pkginfo_get_install_location() and use it to distinguish the above cases.
+ * @fn int pkgmgrinfo_pkginfo_get_external_image_path(pkgmgrinfo_pkginfo_h handle, char **ext_image_path)
+ * @brief This API gets package external image path associated with the package
+ * if package is installed in external storage.
+ * Otherwise, the return value will be PMINFO_R_ENOENT.
*
- * @par This API is for package-manager client application
+ * @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] size pointer to hold package size
+ * @param[in] handle pointer to the pkginfo handle.
+ * @param[out] ext_image_path pointer to hold external image path
* @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_removable()
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @revall PMINFO_R_ENOENT no valid data
+ * @pre pkgmgrinfo_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
* @code
-static int get_pkg_size(const char *pkgid)
+static int get_external_image_path(const char *pkgid)
{
int ret = 0;
- int size = 0;
- pkgmgrinfo_pkginfo_h handle;
+ char *ext_image_path = NULL;
+ pkgmgrinfo_pkginfo_h handle = NULL;
ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_get_package_size(handle, &size);
+ ret = pkgmgrinfo_pkginfo_get_external_image_path(handle, &ext_image_path);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return -1;
}
- printf("pkgsize: %d\n", size);
+ printf("external image path is: %s\n", ext_image_path);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_pkginfo_get_package_size(pkgmgrinfo_pkginfo_h handle, int *size);
+int pkgmgrinfo_pkginfo_get_external_image_path(pkgmgrinfo_pkginfo_h handle, char **ext_image_path);
/**
- * @fn int pkgmgrinfo_pkginfo_get_total_size(pkgmgrinfo_pkginfo_h handle, int *size)
- * @brief This API gets the installed package total size on the target.
+ * @fn int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location)
+ * @brief This API gets the package install location from the package ID
*
* @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] size pointer to hold package total size
+ * @param[in] handle pointer to package info handle
+ * @param[out] location pointer to hold package install 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_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ * @see pkgmgrinfo_pkginfo_is_removable()
* @code
-static int get_pkg_total_size(const char *pkgid)
+static int get_pkg_install_location(const char *pkgid)
{
int ret = 0;
- int size = 0;
+ pkgmgrinfo_install_location location;
pkgmgrinfo_pkginfo_h handle;
ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_get_total_size(handle, &size);
+ ret = pkgmgrinfo_pkginfo_get_install_location(handle, &location);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return -1;
}
- printf("pkg total size: %d\n", size);
+ printf("pkg install location: %d\n", location);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return 0;
}
* @endcode
*/
- int pkgmgrinfo_pkginfo_get_total_size(pkgmgrinfo_pkginfo_h handle, int *size);
+int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location);
/**
- * @fn int pkgmgrinfo_pkginfo_get_data_size(pkgmgrinfo_pkginfo_h handle, int *size)
- * @brief This API gets the installed package data size on the target.
+ * @fn int pkgmgrinfo_pkginfo_get_package_size(pkgmgrinfo_pkginfo_h handle, int *size)
+ * @brief This API gets the package size from the package ID. size will be 0 if package install location is internal-only.
+ size will be 0 if package install location is prefer-external but size is not specified in manifest file.Application should check
+ the return value of pkgmgrinfo_pkginfo_get_install_location() and use it to distinguish the above cases.
*
* @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] size pointer to hold package data size
+ * @param[out] size pointer to hold package size
* @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_removable()
* @code
-static int get_pkg_data_size(const char *pkgid)
+static int get_pkg_size(const char *pkgid)
{
int ret = 0;
int size = 0;
ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_get_data_size(handle, &size);
+ ret = pkgmgrinfo_pkginfo_get_package_size(handle, &size);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return -1;
}
- printf("pkg data size: %d\n", size);
+ printf("pkgsize: %d\n", size);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return 0;
}
* @endcode
*/
- int pkgmgrinfo_pkginfo_get_data_size(pkgmgrinfo_pkginfo_h handle, int *size);
+int pkgmgrinfo_pkginfo_get_package_size(pkgmgrinfo_pkginfo_h handle, int *size);
/**
* @fn int pkgmgrinfo_pkginfo_get_icon(pkgmgrinfo_pkginfo_h handle, char **icon)
*/
int pkgmgrinfo_pkginfo_get_url(pkgmgrinfo_pkginfo_h handle, char **url);
-
/**
* @fn int pkgmgrinfo_pkginfo_get_root_path(pkgmgrinfo_pkginfo_h handle, char **path)
* @brief This API gets the root path of package
int pkgmgrinfo_pkginfo_get_csc_path(pkgmgrinfo_pkginfo_h handle, char **path);
/**
+ * @fn int pkgmgrinfo_pkginfo_get_support_mode(pkgmgrinfo_pkginfo_h handle, int *support_mode)
+ * @brief This API gets the support_mode of package
+ *
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to package info handle
+ * @param[out] support_mode pointer to hold support_mode of package
+ * @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 get_support_mode(const char *pkgid)
+{
+ int ret = 0;
+ int support_mode = 0;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+
+ ret = pkgmgrinfo_pkginfo_get_support_mode(handle, &support_mode);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("support_mode : %s\n", support_mode);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_pkginfo_get_support_mode(pkgmgrinfo_pkginfo_h handle, int *support_mode);
+
+/**
* @fn 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)
* @brief This API compare the cert information from given package id
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] uid uid of the user to determine the database
- * @param[in] pkgid id of the current package
- * @return 1 if it a global package, 0 else
- */
-
+ * @param[in] handle pointer to package info handle
+ * @param[in] global pointer to hold package 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_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ static int get_pkg_support_disable(const char *pkgid)
+ {
+ int ret = 0;
+ bool global;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_is_global(handle, &global);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("pkg is_global: %d\n", global);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+ }
+ * @endcode
+ */
int pkgmgrinfo_pkginfo_is_global(pkgmgrinfo_pkginfo_h handle, bool *global);
-
/**
* @fn int pkgmgrinfo_pkginfo_is_accessible(pkgmgrinfo_pkginfo_h handle, bool *accessible)
* @brief This API gets the package 'accessible' value from the package ID
* @see pkgmgrinfo_pkginfo_filter_count()
* @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
* @code
-static int get_rpm_pkg_count()
+static int get_tpk_pkg_count()
{
int ret = 0;
int count = 0;
ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "rpm");
+ ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
}
- printf("No of rpm pkgs: %d\n", count);
+ printf("No of tpk pkgs: %d\n", count);
pkgmgrinfo_pkginfo_filter_destroy(handle);
return 0;
}
* @see pkgmgrinfo_pkginfo_filter_count()
* @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
* @code
-static int get_rpm_pkg_count()
+static int get_tpk_pkg_count()
{
int ret = 0;
int count = 0;
ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "rpm");
+ ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
}
- printf("No of rpm pkgs: %d\n", count);
+ printf("No of tpk pkgs: %d\n", count);
pkgmgrinfo_pkginfo_filter_destroy(handle);
return 0;
}
* @see pkgmgrinfo_pkginfo_filter_count()
* @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
* @code
-static int get_rpm_pkg_count()
+static int get_tpk_pkg_count()
{
int ret = 0;
int count = 0;
ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "rpm");
+ ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
}
- printf("No of rpm pkgs: %d\n", count);
+ printf("No of tpk pkgs: %d\n", count);
pkgmgrinfo_pkginfo_filter_destroy(handle);
return 0;
}
return 0;
}
-static int get_rpm_pkg_list()
+static int get_tpk_pkg_list()
{
int ret = 0;
pkgmgrinfo_pkginfo_filter_h handle;
ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "rpm");
+ ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
* @post pkgmgrinfo_pkginfo_filter_destroy()
* @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
* @code
-static int get_rpm_pkg_count()
+static int get_tpk_pkg_count()
{
int ret = 0;
int count = 0;
ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "rpm");
+ ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
if (ret != PMINFO_R_OK) {
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
pkgmgrinfo_pkginfo_filter_destroy(handle);
return -1;
}
- printf("No of rpm pkgs: %d\n", count);
+ printf("No of tpk pkgs: %d\n", count);
pkgmgrinfo_pkginfo_filter_destroy(handle);
return 0;
}
pkgmgrinfo_pkg_privilege_list_cb privilege_func, void *user_data);
/* TODO: add doxygen comment here */
-int pkgmgrinfo_pkginfo_get_size_from_xml(const char *manifest, int *size);
-int pkgmgrinfo_pkginfo_get_location_from_xml(const char *manifest, pkgmgrinfo_install_location *location);
int pkgmgrinfo_pkginfo_is_for_all_users(pkgmgrinfo_pkginfo_h handle, bool *for_all_users);
-int pkgmgrinfo_appinfo_set_state_enabled(const char *appid, bool enabled);
-int pkgmgrinfo_appinfo_set_usr_state_enabled(const char *appid, bool enabled, uid_t uid);
-int pkgmgrinfo_appinfo_set_default_label(const char *appid, const char *label);
-int pkgmgrinfo_appinfo_set_usr_default_label(const char *appid, const char *label, uid_t uid);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_clone_appinfo(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_pkginfo_h *clone)
+ * @brief This API copy the application information handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the package info handle.
+ * @param[out] handle pointer to the package 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 None
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+static int get_appinfo_clone(pkgmgrinfo_pkginfo_h handle)
+{
+ int ret = 0;
+
+ pkgmgrinfo_pkginfo_h clone;
+
+ ret = pkgmgrinfo_appinfo_clone_appinfo(handle, &clone);
+ if (ret != PMINFO_R_OK)
+ return -1;
+
+
+ printf("package: %s\n", clone->package);
+ pkgmgrinfo_appinfo_destroy_appinfo(clone);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_clone_appinfo(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_pkginfo_h *clone);
+
/**
* @fn int pkgmgrinfo_appinfo_get_list(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_app_component component,
pkgmgrinfo_app_list_cb app_func, void *user_data);
int pkgmgrinfo_appinfo_get_usr_list(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_app_component component,
pkgmgrinfo_app_list_cb app_func, void *user_data, uid_t uid);
+
/**
- * @fn int pkgmgrinfo_appinfo_get_install_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
+ * @fn int pkgmgrinfo_appinfo_get_applist_for_amd(pkgmgrinfo_app_list_cb app_func, void *user_data);
* @brief This API gets list of installed applications from all packages with minimum informaion.
*
* @par This API is for package-manager client application
{
int ret = 0;
char *name = "helloworld";
- ret = pkgmgrinfo_appinfo_get_install_list(app_list_cb, (void *)name);
+ ret = pkgmgrinfo_appinfo_get_applist_for_amd(app_list_cb, (void *)name);
if (ret != PMINFO_R_OK) {
return -1;
}
}
* @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);
+int pkgmgrinfo_appinfo_get_usr_applist_for_amd(pkgmgrinfo_app_list_cb app_func, uid_t uid, void *user_data);
+int pkgmgrinfo_appinfo_get_applist_for_amd(pkgmgrinfo_app_list_cb app_func, 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.
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)
- * @brief This API creates the application information handle from db
+ * @fn int pkgmgrinfo_appinfo_get_disabled_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle)
+ * @brief This API creates the disabled application information handle from db
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
* @see pkgmgrinfo_appinfo_get_pkgid()
* @see pkgmgrinfo_appinfo_is_multiple()
* @code
-static int get_app_type(const char *appid)
+static int get_disabled_app_type(const char *appid)
{
int ret = 0;
char *type = NULL;
pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ ret = pkgmgrinfo_appinfo_get_disabled_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
ret = pkgmgrinfo_appinfo_get_apptype(handle, &type);
}
* @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);
+int pkgmgrinfo_appinfo_get_disabled_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle);
+int pkgmgrinfo_appinfo_get_usr_disabled_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
+ * @fn int pkgmgrinfo_appinfo_get_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle)
+ * @brief This API creates the application information handle from db
*
* @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] appid pointer to hold appid
+ * @param[in] appid pointer to appid
+ * @param[out] 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()
+ * @pre None
* @post pkgmgrinfo_appinfo_destroy_appinfo()
* @see pkgmgrinfo_appinfo_get_pkgid()
* @see pkgmgrinfo_appinfo_is_multiple()
* @code
-static int get_app_id(const char *appid)
+static int get_app_type(const char *appid)
{
int ret = 0;
- char *app_id = NULL;
+ 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_appid(handle, &app_id);
+ ret = pkgmgrinfo_appinfo_get_apptype(handle, &type);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
- printf("app id: %s\n", app_id);
+ printf("apptype: %s\n", type);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_appinfo_get_appid(pkgmgrinfo_appinfo_h handle, char **appid);
+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_pkgname(pkgmgrinfo_appinfo_h handle, char **pkg_name)
- * @brief This API gets the package name of the application
+ * @fn int pkgmgrinfo_appinfo_get_all_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle)
+ * @brief This API creates the application information handle from db regardless of its disable or storage status
*
* @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] pkg_name pointer to hold package name
- * @return 0 if success, error code(<0) if fail
+ * @param[in] appid pointer to appid
+ * @param[out] 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 None
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @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_all_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_get_all_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle);
+int pkgmgrinfo_appinfo_get_usr_all_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
+ *
+ * @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] appid pointer to hold appid
+ * @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_pkgid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_id(const char *appid)
+{
+ int ret = 0;
+ char *app_id = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_appid(handle, &app_id);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app id: %s\n", app_id);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_appid(pkgmgrinfo_appinfo_h handle, char **appid);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_pkgname(pkgmgrinfo_appinfo_h handle, char **pkg_name)
+ * @brief This API gets the package name 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] pkg_name 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
int pkgmgrinfo_appinfo_get_pkgid(pkgmgrinfo_appinfo_h handle, char **pkgid);
/**
+ * @fn int pkgmgrinfo_appinfo_get_pkgtype(pkgmgrinfo_appinfo_h handle, char **pkgtype)
+ * @brief This API gets the package type 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] pkgtype pointer to hold package type
+ * @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_pkgtype(const char *appid)
+{
+ int ret = 0;
+ char *pkgtype = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_pkgtype(handle, &pkgtype);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("pkgtype: %s\n", pkgtype);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_pkgtype(pkgmgrinfo_appinfo_h handle, char **pkgtype);
+
+/**
* @fn int pkgmgrinfo_appinfo_get_exec(pkgmgrinfo_appinfo_h handle, char **exec)
* @brief This API gets the executable name of the application
*
int pkgmgrinfo_appinfo_usr_get_localed_label(const char *appid, const char *locale, uid_t uid, char **label);
/**
+ * @fn int pkgmgrinfo_appinfo_get_metadata_value(pkgmgrinfo_appinfo_h handle, const char *metadata_key, char **metadata_value)
+ * @brief This API gets metadata value by given metadata key
+ *
+ * @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] metadata_key metadata key
+ * @param[out] metadata_value pointer to hold metadata value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @code
+static int get_metadata_value(const char *appid, const char *metadata_key)
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ char *metadata_value = NULL;
+
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+
+ ret = pkgmgrinfo_appinfo_get_metadata_value(handle, metadata_key, &metadata_value);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_metadata_value(pkgmgrinfo_appinfo_h handle, const char *metadata_key, char **metadata_value);
+
+/**
* @fn int pkgmgrinfo_appinfo_get_component(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_component *component)
* @brief This API gets the component of the application
*
int pkgmgrinfo_appinfo_get_effective_appid(pkgmgrinfo_appinfo_h handle, char **effective_appid);
/**
- * @fn int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_permission_list_cb permission_func, void *user_data);
- * @brief This API gets the list of permission for a particular application
+ * @fn int pkgmgrinfo_appinfo_get_tep_name(pkgmgrinfo_appinfo_h handle, char **tep_name)
+ * @brief This API gets tep(tizen expansion package) file name associated with the package which contain given application
*
- * @par This API is for package-manager client 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[in] permission_func callback function for list
- * @param[in] user_data user data to be passed to callback function
+ *
+ * @param[in] handle pointer to the appinfo handle.
+ * @param[out] tep_name pointer to hold tep 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()
+ * @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
-int permission_func(const char *name, void *user_data)
+static int get_tep_name(const char *appid)
{
- if (strcmp(name, (char *)user_data) == 0)
+ int ret = 0;
+ char *tep_name = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
return -1;
- else
- return 0;
+ ret = pkgmgrinfo_appinfo_get_tep_name(handle, &tep_name);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("TEP name is: %s\n", tep_name);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_tep_name(pkgmgrinfo_appinfo_h handle, char **tep_name);
-static int list_permission(const char *appid, char *permission)
+/**
+ * @fn int pkgmgrinfo_appinfo_get_zip_mount_file(pkgmgrinfo_appinfo_h handle, char **zip_mount_file)
+ * @brief This API gets zip mount file name associated with the package which contain given application
+ * If package is not "mount-installed", zip_mount_file is left as NULL pointer.
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the appinfo handle.
+ * @param[out] zip_mount_file pointer to hold zip mount file 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()
+ * @code
+static int get_zip_mount_file(const char *appid)
{
int ret = 0;
- pkgmgrinfo_appinfo_h handle;
+ char *zip_mount_file = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_appinfo_foreach_permission(handle, permission_func, (void *)permission);
+ ret = pkgmgrinfo_appinfo_get_zip_mount_file(handle, &zip_mount_file);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
+ printf("Mount file name is: %s\n", zip_mount_file);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_permission_list_cb permission_func, void *user_data);
+int pkgmgrinfo_appinfo_get_zip_mount_file(pkgmgrinfo_appinfo_h handle, char **zip_mount_file);
/**
- * @fn int pkgmgrinfo_appinfo_foreach_category(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_category_list_cb category_func, void *user_data);
- * @brief This API gets the list of category for a particular application
+ * @fn int pkgmgrinfo_appinfo_get_root_path(pkgmgrinfo_appinfo_h handle, char **path)
+ * @brief This API gets the root path of 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[in] category_func callback function for list
- * @param[in] user_data user data to be passed to callback function
+ *
+ * @param[in] handle pointer to appinfo handle
+ * @param[out] path pointer to hold root path of application
* @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()
* @code
-int category_func(const char *name, void *user_data)
-{
- if (strcmp(name, (char *)user_data) == 0)
- return -1;
- else
- return 0;
-}
-
-static int list_category(const char *appid, char *category)
+static int get_root_path(const char *appid)
{
int ret = 0;
+ char *path = 0;
pkgmgrinfo_appinfo_h handle;
ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_appinfo_foreach_category(handle, category_func, (void *)category);
+
+ ret = pkgmgrinfo_appinfo_get_root_path(handle, &path);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
+ printf("path : %s\n", path);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
+
return 0;
}
* @endcode
*/
-int pkgmgrinfo_appinfo_foreach_category(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_category_list_cb category_func, void *user_data);
+int pkgmgrinfo_appinfo_get_root_path(pkgmgrinfo_appinfo_h handle, char **root_path);
/**
- * @fn int pkgmgrinfo_appinfo_foreach_metadata(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_metadata_list_cb metadata_func, void *user_data);
- * @brief This API gets the list of metadata for a particular application
+ * @fn int pkgmgrinfo_appinfo_get_api_version(pkgmgrinfo_appinfo_h handle, char **api_version)
+ * @brief This API gets the application api_version from the application ID
*
* @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] metadata_func callback function for list
- * @param[in] user_data user data to be passed to callback function
+ *
+ * @param[in] handle pointer to appinfo handle
+ * @param[out] api_version pointer to hold application api_version
* @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
-int metadata_func(const char *key, const char *value, void *user_data)
-{
- if (strcmp(key, (char *)user_data) == 0) {
- printf("Value is %s\n", value);
- return -1;
- }
- else
- return 0;
-}
-
-static int list_metadata(const char *appid, char *key)
+static int get_app_api_version(const char *appid)
{
int ret = 0;
- pkgmgrinfo_appinfo_h handle;
+ char *api_version = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_appinfo_foreach_metadata(handle, metadata_func, (void *)key);
+ ret = pkgmgrinfo_appinfo_get_api_version(handle, &api_version);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
+ printf("app api_version: %s\n", api_version);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_appinfo_foreach_metadata(pkgmgrinfo_appinfo_h handle,
- pkgmgrinfo_app_metadata_list_cb metadata_func, void *user_data);
-
+int pkgmgrinfo_appinfo_get_api_version(pkgmgrinfo_appinfo_h handle, char **api_version);
/**
- * @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
+ * @fn int pkgmgrinfo_appinfo_get_installed_time(pkgmgrinfo_appinfo_h handle, int *installed_time)
+ * @brief This API gets the installed_time 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[in] appcontrol_func callback function for list
- * @param[in] user_data user data to be passed to callback function
+ *
+ * @param[in] handle pointer to the application info handle.
+ * @param[out] installed_time pointer to hold installed_time
+ * @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_installed_time(const char *appid)
+{
+ int ret = 0;
+ int installed_time = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_installed_time(handle, &installed_time);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("installed_time: %d\n", installed_time);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_installed_time(pkgmgrinfo_appinfo_h handle, int *installed_time);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_support_mode(pkgmgrinfo_appinfo_h handle, int *support_mode)
+ * @brief This API gets the support_mode 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] support_mode pointer to hold app support_mode
+ * @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_support_mode(const char *appid)
+{
+ int ret = 0;
+ int support_mode = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_support_mode(handle, &support_mode);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("support_mode: %s\n", support_mode);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_support_mode(pkgmgrinfo_appinfo_h handle, int *support_mode);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_permission_list_cb permission_func, void *user_data);
+ * @brief This API gets the list of permission for a particular 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[in] permission_func callback function for list
+ * @param[in] user_data user data to be passed to 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_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+int permission_func(const char *name, void *user_data)
+{
+ if (strcmp(name, (char *)user_data) == 0)
+ return -1;
+ else
+ return 0;
+}
+
+static int list_permission(const char *appid, char *permission)
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_foreach_permission(handle, permission_func, (void *)permission);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_permission_list_cb permission_func, void *user_data);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_foreach_category(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_category_list_cb category_func, void *user_data);
+ * @brief This API gets the list of category for a particular 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[in] category_func callback function for list
+ * @param[in] user_data user data to be passed to 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_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+int category_func(const char *name, void *user_data)
+{
+ if (strcmp(name, (char *)user_data) == 0)
+ return -1;
+ else
+ return 0;
+}
+
+static int list_category(const char *appid, char *category)
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_foreach_category(handle, category_func, (void *)category);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_foreach_category(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_category_list_cb category_func, void *user_data);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_foreach_metadata(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_metadata_list_cb metadata_func, void *user_data);
+ * @brief This API gets the list of metadata for a particular 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[in] metadata_func callback function for list
+ * @param[in] user_data user data to be passed to 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_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+int metadata_func(const char *key, const char *value, void *user_data)
+{
+ if (strcmp(key, (char *)user_data) == 0) {
+ printf("Value is %s\n", value);
+ return -1;
+ }
+ else
+ return 0;
+}
+
+static int list_metadata(const char *appid, char *key)
+{
+ int ret = 0;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_foreach_metadata(handle, metadata_func, (void *)key);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_foreach_metadata(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_metadata_list_cb metadata_func, void *user_data);
+
+
+/**
+ * @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
+ * @par Sync (or) Async : Synchronous API
+ * @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
pkgmgrinfo_app_background_category_list_cb category_func, void *user_data);
/**
+ * @fn int pkgmgrinfo_appinfo_foreach_splash_screen(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_splash_screen_list_cb splash_screen_func, void *user_data);
+ * @brief This API gets the list of splashscreen for a particular 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[in] splash_screen_func callback function for list
+ * @param[in] user_data user data to be passed to 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_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+ */
+int pkgmgrinfo_appinfo_foreach_splash_screen(pkgmgrinfo_appinfo_h handle,
+ pkgmgrinfo_app_splash_screen_list_cb splash_screen_func, void *user_data);
+
+/**
* @fn int pkgmgrinfo_appinfo_is_nodisplay(pkgmgrinfo_appinfo_h handle, bool *nodisplay)
* @brief This API gets the application 'nodisplay' 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 the application info handle.
- * @param[out] app_type pointer to hold installed storage location
+ * @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()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
* @see pkgmgrinfo_appinfo_get_appid()
* @code
static int get_app_installed_location(const char *appid)
int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle, bool *support_disable);
/**
- * @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_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 the application info handle.
+ * @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 None
- * @see pkgmgrinfo_appinfo_get_pkgid()
- * @see pkgmgrinfo_appinfo_is_multiple()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
* @code
-static int get_app_type(const char *appid)
+static int get_app_removable(const char *appid)
{
int ret = 0;
- char *type = NULL;
- pkgmgrinfo_appinfo_h handle;
+ bool removable;
+ pkgmgrinfo_appinfo_h handle = NULL;
ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_appinfo_get_apptype(handle, &type);
+ ret = pkgmgrinfo_appinfo_is_removable(handle, &removable);
if (ret != PMINFO_R_OK) {
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
- printf("apptype: %s\n", type);
+ printf("app removable: %d\n", removable);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle);
+int pkgmgrinfo_appinfo_is_removable(pkgmgrinfo_appinfo_h handle, bool *removable);
/**
- * @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
+ * @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[out] handle pointer to the application info filter handle.
+ * @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 None
- * @post pkgmgrinfo_appinfo_filter_destroy()
- * @see pkgmgrinfo_appinfo_filter_count()
- * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
* @code
-static int get_capp_count()
+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 whethere 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;
}
* @endcode
*/
- int pkgmgrinfo_delete_certinfo(const char *pkgid);
- int pkgmgrinfo_delete_usr_certinfo(const char *pkgid, uid_t uid);
+int pkgmgrinfo_delete_certinfo(const char *pkgid);
+int pkgmgrinfo_delete_usr_certinfo(const char *pkgid, uid_t uid);
+
/**
- * @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.
+ * @fn int pkgmgrinfo_create_certinfo_set_handle(pkgmgrinfo_instcertinfo_h *handle)
+ * @brief This API creates the package cert 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.
+ * @param[out] handle pointer to the package cert 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_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
+ * @post pkgmgrinfo_destroy_certinfo_set_handle()
+ * @see pkgmgrinfo_set_cert_value()
+ * @see pkgmgrinfo_save_certinfo()
* @code
-static int set_pkg_in_db(const char *pkgid)
+static int set_cert_in_db(const char *pkgid)
{
int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ pkgmgrinfo_instcertinfo_h handle;
+ ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_set_version_to_pkgdbinfo(handle, "0.0.1");
+ ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
+ ret = pkgmgrinfo_save_certinfo(pkgid, handle);
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return 0;
}
* @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);
+int pkgmgrinfo_create_certinfo_set_handle(pkgmgrinfo_instcertinfo_h *handle);
/**
- * @fn int pkgmgrinfo_set_type_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *type)
- * @brief This API sets the package type in db handle
+ * @fn int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle, pkgmgrinfo_instcert_type cert_type, char *cert_value)
+ * @brief This API sets the package cert information in the handle.
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] type pointer to the package type.
+ * @param[in] handle pointer to the package cert handle.
+ * @param[in] cert_type certificate type.
+ * @param[in] cert_value certificate 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_version_to_pkgdbinfo()
+ * @pre pkgmgrinfo_create_certinfo_set_handle()
+ * @post pkgmgrinfo_destroy_certinfo_set_handle()
+ * @see pkgmgrinfo_save_certinfo()
* @code
-static int set_pkg_type_in_db(const char *pkgid)
+static int set_cert_in_db(const char *pkgid)
{
int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ pkgmgrinfo_instcertinfo_h handle;
+ ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_set_type_to_pkgdbinfo(handle, "wgt");
+ ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
+ ret = pkgmgrinfo_save_certinfo(pkgid, handle);
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_set_type_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *type);
+int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle, pkgmgrinfo_instcert_type cert_type, char *cert_value);
/**
- * @fn int pkgmgrinfo_set_version_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *version)
- * @brief This API sets the package version in db handle
+ * @fn int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h handle)
+ * @brief This API saves the package cert information in the DB.
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] version pointer to the package version
+ * @param[in] pkgid pointer to the package ID.
+ * @param[in] handle pointer to the package cert 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
+ * @pre pkgmgrinfo_create_certinfo_set_handle()
+ * @post pkgmgrinfo_destroy_certinfo_set_handle()
+ * @see pkgmgrinfo_save_certinfo()
* @code
-static int set_pkg_version_in_db(const char *pkgid)
+static int set_cert_in_db(const char *pkgid)
{
int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ pkgmgrinfo_instcertinfo_h handle;
+ ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_set_version_to_pkgdbinfo(handle, "0.0.1");
+ ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
+ ret = pkgmgrinfo_save_certinfo(pkgid, handle);
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_set_version_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *version);
+int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h handle, uid_t uid);
/**
- * @fn int pkgmgrinfo_set_install_location_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, INSTALL_LOCATION location)
- * @brief This API sets the package install location in db handle
+ * @fn int pkgmgrinfo_destroy_certinfo_set_handle(pkgmgrinfo_instcertinfo_h handle)
+ * @brief This API destroys the package cert 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 pkgdbinfo handle.
- * @param[in] location package install location
+ * @param[in] handle pointer to the package cert 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
+ * @pre pkgmgrinfo_create_certinfo_set_handle()
+ * @post None
+ * @see pkgmgrinfo_save_certinfo()
* @code
-static int set_pkg_install_location_in_db(const char *pkgid)
+static int set_cert_in_db(const char *pkgid)
{
int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ pkgmgrinfo_instcertinfo_h handle;
+ ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_set_install_location_to_pkgdbinfo(handle, INSTALL_INTERNAL);
+ ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
+ ret = pkgmgrinfo_save_certinfo(pkgid, handle);
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return -1;
}
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_destroy_certinfo_set_handle(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_set_install_location_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, INSTALL_LOCATION location);
+int pkgmgrinfo_destroy_certinfo_set_handle(pkgmgrinfo_instcertinfo_h handle);
/**
- * @fn int pkgmgrinfo_set_size_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *size)
- * @brief This API sets the package size in db handle
+ * @fn int pkgmgrinfo_datacontrol_get_info(const char *providerid, const char * type, char **appid, char **access)
+ * @brief This API gets the datacontrol info
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] size pointer to the package size
+ * @param[in] providerid pointer to the providerid of dataconltrol.
+ * @param[in] type pointer to the type of dataconltrol.
+ * @param[out] appid pointer to hold appid, need to free after using
+ * @param[out] access pointer to hold access, need to free after using
* @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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_size_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_size_to_pkgdbinfo(handle, "15");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
* @endcode
*/
-int pkgmgrinfo_set_size_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *size);
+int pkgmgrinfo_datacontrol_get_info(const char *providerid, const char * type, char **appid, char **access);
/**
- * @fn int pkgmgrinfo_set_label_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *label, const char *locale)
- * @brief This API sets the package label in db handle
+ * @fn int pkgmgrinfo_appinfo_is_guestmode_appstatus(pkgmgrinfo_appinfo_h handle, bool *status)
+ * @brief This API gets the application 'guest mode visibility' value from the DB
*
* @par This API is for package-manager client application
* @par Sync (or) Async : Synchronous API
*
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] label pointer to the package label
- * @param[in] locale pointer to the locale
+ * @param[in] handle pointer to application info handle
+ * @param[out] status pointer to hold app guest mode visibility 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
* @code
-static int set_pkg_label_in_db(const char *pkgid)
+static int get_app_guestmode_visibility(const char *appid)
{
int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ bool status;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK)
return -1;
- ret = pkgmgrinfo_set_label_to_pkgdbinfo(handle, "helloworld", "en-us");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
+ ret = pkgmgrinfo_appinfo_is_guestmode_visibility(handle, &status);
if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
return -1;
}
- pkgmgrinfo_destroy_pkgdbinfo(handle);
+ printf("app guest mode visibility: %d\n", status);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
return 0;
}
* @endcode
*/
-int pkgmgrinfo_set_label_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *label, const char *locale);
-
-/**
- * @fn int pkgmgrinfo_set_icon_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *icon, const char *locale)
- * @brief This API sets the package icon in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] icon pointer to the package icon
- * @param[in] locale pointer to the locale
- * @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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_icon_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_icon_to_pkgdbinfo(handle, "helloworld.png", "en-us");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_icon_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *icon, const char *locale);
-
-/**
- * @fn int pkgmgrinfo_set_description_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *description, const char *locale)
- * @brief This API sets the package description in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] description pointer to the package description
- * @param[in] locale pointer to the locale
- * @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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_description_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_description_to_pkgdbinfo(handle, "helloworld application", "en-us");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_description_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *description, const char *locale);
-
-/**
- * @fn int pkgmgrinfo_set_author_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *author_name,
- const char *author_email, const char *author_href, const char *locale)
- * @brief This API sets the package author info in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] author_name pointer to the package author name
- * @param[in] author_email pointer to the package author email
- * @param[in] author_href pointer to the package author href
- * @param[in] locale pointer to the locale
- * @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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_author_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_author_to_pkgdbinfo(handle, "John", "john@samsung.com", "www.samsung.com", "en-us");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_author_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, const char *author_name,
- const char *author_email, const char *author_href, const char *locale);
-
-/**
- * @fn int pkgmgrinfo_set_removable_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, int removable)
- * @brief This API sets the package 'removable' value in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] removable 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_removable_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_removable_to_pkgdbinfo(handle, 1);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_removable_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, int removable);
-
-/**
- * @fn int pkgmgrinfo_set_preload_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, int preload)
- * @brief This API sets the package 'preload' value in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] preload package preload 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_preload_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_preload_to_pkgdbinfo(handle, 1);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_preload_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, int preload);
-
-/**
- * @fn int pkgmgrinfo_set_installed_storage_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, INSTALL_LOCATION location)
- * @brief This API sets the package 'installed_storage' value in db handle
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the pkgdbinfo handle.
- * @param[in] location installed_storage 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_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @code
-static int set_pkg_installed_storage_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_installed_storage_to_pkgdbinfo(handle, INSTALL_INTERNAL);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_installed_storage_to_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle, INSTALL_LOCATION location);
-
-/**
- * @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
- * @retval PMINFO_R_ERROR internal error
- * @pre pkgmgrinfo_create_pkgdbinfo()
- * @post pkgmgrinfo_destroy_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_version_to_pkgdbinfo(handle, "0.0.1");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_save_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle);
-int pkgmgrinfo_save_pkgusrdbinfo(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
- *
- * @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.
- * @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_create_pkgdbinfo()
- * @post None
- * @see pkgmgrinfo_save_pkgdbinfo()
- * @see pkgmgrinfo_set_type_to_pkgdbinfo()
- * @code
-static int set_pkg_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_pkgdbinfo_h handle;
- ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_version_to_pkgdbinfo(handle, "0.0.1");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_pkgdbinfo(handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return -1;
- }
- pkgmgrinfo_destroy_pkgdbinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_destroy_pkgdbinfo(pkgmgrinfo_pkgdbinfo_h handle);
-
-
-/**
- * @fn int pkgmgrinfo_create_certinfo_set_handle(pkgmgrinfo_instcertinfo_h *handle)
- * @brief This API creates the package cert information handle to set data in db.
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[out] handle pointer to the package cert 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_destroy_certinfo_set_handle()
- * @see pkgmgrinfo_set_cert_value()
- * @see pkgmgrinfo_save_certinfo()
- * @code
-static int set_cert_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_instcertinfo_h handle;
- ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_certinfo(pkgid, handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_create_certinfo_set_handle(pkgmgrinfo_instcertinfo_h *handle);
-
-/**
- * @fn int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle, pkgmgrinfo_instcert_type cert_type, char *cert_value)
- * @brief This API sets the package cert information in the handle.
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to the package cert handle.
- * @param[in] cert_type certificate type.
- * @param[in] cert_value certificate 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_create_certinfo_set_handle()
- * @post pkgmgrinfo_destroy_certinfo_set_handle()
- * @see pkgmgrinfo_save_certinfo()
- * @code
-static int set_cert_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_instcertinfo_h handle;
- ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_certinfo(pkgid, handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle, pkgmgrinfo_instcert_type cert_type, char *cert_value);
-
-/**
- * @fn int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h handle)
- * @brief This API saves the package cert information in the 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] handle pointer to the package cert 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_create_certinfo_set_handle()
- * @post pkgmgrinfo_destroy_certinfo_set_handle()
- * @see pkgmgrinfo_save_certinfo()
- * @code
-static int set_cert_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_instcertinfo_h handle;
- ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_certinfo(pkgid, handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_save_certinfo(const char *pkgid, pkgmgrinfo_instcertinfo_h handle, uid_t uid);
-
-/**
- * @fn int pkgmgrinfo_destroy_certinfo_set_handle(pkgmgrinfo_instcertinfo_h handle)
- * @brief This API destroys the package cert 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 package cert 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_create_certinfo_set_handle()
- * @post None
- * @see pkgmgrinfo_save_certinfo()
- * @code
-static int set_cert_in_db(const char *pkgid)
-{
- int ret = 0;
- pkgmgrinfo_instcertinfo_h handle;
- ret = pkgmgrinfo_create_certinfo_set_handle(&handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_set_cert_value(handle, PMINFO_SET_AUTHOR_ROOT_CERT, "author root certificate");
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- ret = pkgmgrinfo_save_certinfo(pkgid, handle);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return -1;
- }
- pkgmgrinfo_destroy_certinfo_set_handle(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_destroy_certinfo_set_handle(pkgmgrinfo_instcertinfo_h handle);
-
-/**
- * @fn int pkgmgrinfo_datacontrol_get_info(const char *providerid, const char * type, char **appid, char **access)
- * @brief This API gets the datacontrol info
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] providerid pointer to the providerid of dataconltrol.
- * @param[in] type pointer to the type of dataconltrol.
- * @param[out] appid pointer to hold appid, need to free after using
- * @param[out] access pointer to hold access, need to free after using
- * @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
- * @endcode
- */
-int pkgmgrinfo_datacontrol_get_info(const char *providerid, const char * type, char **appid, char **access);
-
-/**
- * @fn int pkgmgrinfo_appinfo_is_guestmode_appstatus(pkgmgrinfo_appinfo_h handle, bool *status)
- * @brief This API gets the application 'guest mode visibility' value from the DB
- *
- * @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] status pointer to hold app guest mode visibility 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_guestmode_visibility(const char *appid)
-{
- int ret = 0;
- bool status;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_is_guestmode_visibility(handle, &status);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- printf("app guest mode visibility: %d\n", status);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @endcode
- */
- int pkgmgrinfo_appinfo_is_guestmode_visibility(pkgmgrinfo_appinfo_h handle, bool *status);
-
-/**
- * @fn int pkgmgrinfo_appinfo_set_guestmode_visibility(pkgmgrinfo_appinfo_h handle, bool status)
- * @brief This API sets the application 'guest mode visibility' value in the DB
- *
- * @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] status app guest mode visibility 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 set_app_guestmode_visibility(const char *appid, bool value)
-{
- int ret = 0;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_set_guestmode_visibility(handle, value);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @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);
+int pkgmgrinfo_appinfo_is_guestmode_visibility(pkgmgrinfo_appinfo_h handle, bool *status);
/**
* @fn int pkgmgrinfo_pkginfo_set_installed_storage(const char *pkgid, INSTALL_LOCATION location)
* @brief This API sets the package 'installed_storage' value in db
*
-* @par This API is for package-manager client application
+* @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] pkgid pointer to the package ID.
* @param[in] location package install location
+* @param[in] external_pkg_path image path if pkg has installed at external storage
* @return 0 if success, error code(<0) if fail
* @retval PMINFO_R_OK success
* @retval PMINFO_R_EINVAL invalid argument
}
* @endcode
*/
- int pkgmgrinfo_pkginfo_set_installed_storage(const char *pkgid, INSTALL_LOCATION location);
- int pkgmgrinfo_pkginfo_set_usr_installed_storage(const char * pkgid, INSTALL_LOCATION location, uid_t uid);
+int pkgmgrinfo_pkginfo_set_installed_storage(const char *pkgid, INSTALL_LOCATION location, const char *external_pkg_path);
+int pkgmgrinfo_pkginfo_set_usr_installed_storage(const char *pkgid, INSTALL_LOCATION location, const char *external_pkg_path, uid_t uid);
-/**
- * @pkgmgrinfo client API
-**/
+/* version compare */
+int pkgmgrinfo_compare_package_version(const char *current_version,
+ const char *target_version, pkgmgrinfo_version_compare_type *res);
/**
- * @brief listening status type in pkgmgrinfo.
+ * @brief TEMP
*/
-#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 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);
+int pkgmgrinfo_pkginfo_get_usr_list_full(pkgmgrinfo_pkg_list_cb pkg_list_cb,
+ int flag, void *user_data, uid_t uid);
+int pkgmgrinfo_pkginfo_get_list_full(pkgmgrinfo_pkg_list_cb pkg_list_cb,
+ int flag, void *user_data);
+int pkgmgrinfo_appinfo_get_usr_installed_list_full(
+ pkgmgrinfo_app_list_cb app_func, uid_t uid, int flag,
+ void *user_data);
+int pkgmgrinfo_appinfo_get_installed_list_full(
+ pkgmgrinfo_app_list_cb app_func, int flag, void *user_data);
/**
* @pkgmgrinfo client API end