int pkgmgrinfo_pkginfo_get_tep_name(pkgmgrinfo_pkginfo_h handle, char **tep_name);
/**
+ * @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 Sync (or) Async : Synchronous API
+ *
+ * @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()
+ * @code
+static int get_zip_mount_file(const char *pkgid)
+{
+ int ret = 0;
+ 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_zip_mount_file(handle, &zip_mount_file);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ 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_zip_mount_file(pkgmgrinfo_pkginfo_h handle, char **zip_mount_file);
+
+/**
* @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
*
int pkgmgrinfo_appinfo_get_tep_name(pkgmgrinfo_appinfo_h handle, char **tep_name);
/**
+ * @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;
+ 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_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_get_zip_mount_file(pkgmgrinfo_appinfo_h handle, char **zip_mount_file);
+
+/**
* @fn int pkgmgrinfo_appinfo_get_root_path(pkgmgrinfo_appinfo_h handle, char **path)
* @brief This API gets the root path of application
*
char *effective_appid; /*attr*/
char *package_type; /*set from package_x*/
char *tep_name; /*set from package_x*/
+ char *zip_mount_file; /*set from package_x*/
char *root_path; /*set from package_x*/
char *api_version; /*set from package_x*/
char *for_all_users; /**< Flag that indicates if the package is available for everyone or for current user only, no xml part*/
char *support_disable; /**< package support disable flag, attr, default: "false"*/
char *api_version; /**< minimum version of API package using, attr, default: patch_version trimmed version from tizen_full_version*/
char *tep_name; /*no xml part*/
+ char *zip_mount_file; /*no xml part*/
char *backend_installer; /**< package backend installer, attr*/
GList *icon; /**< package icon, element*/
GList *label; /**< package label, element*/
"package_version text, " \
"package_api_version text, " \
"package_tep_name text, " \
+ "package_zip_mount_file text, " \
"install_location text, " \
"package_size text, " \
"package_removable text DEFAULT 'true', " \
"component_type text, " \
"package text not null, " \
"app_tep_name text, " \
+ "app_zip_mount_file text, " \
"app_background_category INTEGER DEFAULT 0, " \
"app_root_path text, " \
"app_api_version text, " \
"app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, " \
"app_preload, app_submode, app_submode_mainid, app_installed_storage, app_process_pool, " \
"app_launch_mode, app_ui_gadget, app_support_disable, component_type, package, " \
- "app_tep_name, app_background_category, app_package_type, app_root_path, app_api_version, " \
+ "app_tep_name, app_zip_mount_file, app_background_category, app_package_type, app_root_path, app_api_version, " \
"app_effective_appid, app_splash_screen_display) " \
"values(" \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
- "'%s', '%d', '%s', '%s', '%s', " \
- "'%s', '%s')", \
+ "'%s', '%s', '%d', '%s', '%s', " \
+ "'%s', '%s', '%s')", \
app->appid, app->component_type, app->exec, app->nodisplay, app->type,
app->onboot, app->multiple, app->autorestart, app->taskmanage, app->enabled,
app->hwacceleration, app->screenreader, app->mainapp, __get_str(app->recentimage), app->launchcondition,
app->guestmode_visibility, app->permission_type,
mfx->preload, app->submode, __get_str(app->submode_mainid), mfx->installed_storage, app->process_pool,
app->launch_mode, app->ui_gadget, mfx->support_disable, app->component_type, mfx->package,
- __get_str(mfx->tep_name), background_value, type, mfx->root_path, __get_str(mfx->api_version),
+ __get_str(mfx->tep_name), __get_str(mfx->zip_mount_file), background_value, type, mfx->root_path, __get_str(mfx->api_version),
__get_str(effective_appid), app->splash_screen_display);
ret = __exec_query(query);
/*Insert in the package_info DB*/
snprintf(query, MAX_QUERY_LEN,
"insert into package_info(" \
- "package, package_type, package_version, package_api_version, package_tep_name, " \
+ "package, package_type, package_version, package_api_version, package_tep_name, package_zip_mount_file, " \
"install_location, package_size, package_removable, package_preload, package_readonly, " \
"package_update, package_appsetting, package_nodisplay, package_system, author_name, " \
"author_email, author_href, installed_time, installed_storage, storeclient_id, " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
- "'%s', '%s', '%s', '%s', '%s')", \
- mfx->package, mfx->type, mfx->version, __get_str(mfx->api_version), __get_str(mfx->tep_name),
+ "'%s', '%s', '%s', '%s', '%s', " \
+ "'%s')", \
+ mfx->package, mfx->type, mfx->version, __get_str(mfx->api_version), __get_str(mfx->tep_name), __get_str(mfx->zip_mount_file),
__get_str(mfx->installlocation), __get_str(mfx->package_size), mfx->removable, mfx->preload, mfx->readonly,
mfx->update, mfx->appsetting, mfx->nodisplay_setting, mfx->system, __get_str(auth_name),
__get_str(auth_email), __get_str(auth_href), mfx->installed_time, mfx->installed_storage,
"app_permissiontype, app_preload, app_submode, "
"app_submode_mainid, app_launch_mode, app_ui_gadget, "
"app_support_disable, "
- "component_type, package, app_tep_name, app_process_pool, "
+ "component_type, package, app_tep_name, app_zip_mount_file, app_process_pool, "
"app_installed_storage, app_background_category, "
"app_package_type, app_root_path, app_api_version, "
"app_effective_appid, app_disable, app_splash_screen_display "
_save_column_str(stmt, idx++, &info->component_type);
_save_column_str(stmt, idx++, &info->package);
_save_column_str(stmt, idx++, &info->tep_name);
+ _save_column_str(stmt, idx++, &info->zip_mount_file);
_save_column_str(stmt, idx++, &info->process_pool);
_save_column_str(stmt, idx++, &info->installed_storage);
_save_column_str(stmt, idx++, &bg_category_str);
"app_onboot, app_multiple, app_autorestart, app_taskmanage, "
"app_hwacceleration, app_permissiontype, app_preload, "
"app_installed_storage, app_process_pool, app_launch_mode, "
- "app_package_type, component_type, package, app_tep_name, "
+ "app_package_type, component_type, package, app_tep_name, app_zip_mount_file, "
"app_background_category, app_root_path, app_api_version, "
"app_effective_appid, app_disable, app_splash_screen_display, "
"(CASE WHEN A.app_disable='true' THEN 'true' "
_save_column_str(stmt, idx++, &appinfo->component_type);
_save_column_str(stmt, idx++, &appinfo->package);
_save_column_str(stmt, idx++, &appinfo->tep_name);
+ _save_column_str(stmt, idx++, &appinfo->zip_mount_file);
_save_column_str(stmt, idx++, &bg_category_str);
_save_column_str(stmt, idx++, &appinfo->root_path);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_zip_mount_file(pkgmgrinfo_appinfo_h handle, char **zip_mount_file)
+{
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ if (handle == NULL || zip_mount_file == NULL) {
+ LOGE("invalid parameter");
+ return PMINFO_R_EINVAL;
+ }
+
+ *zip_mount_file = (char *)info->app_info->zip_mount_file;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_get_root_path(pkgmgrinfo_appinfo_h handle, char **root_path)
{
pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
free((void *)application->support_disable);
if (application->tep_name)
free((void *)application->tep_name);
+ if (application->zip_mount_file)
+ free((void *)application->zip_mount_file);
if (application->root_path)
free((void *)application->root_path);
if (application->api_version)
free((void *)package->support_disable);
if (package->tep_name)
free((void *)package->tep_name);
+ if (package->zip_mount_file)
+ free((void *)package->zip_mount_file);
/*Free Icon*/
g_list_free_full(package->icon, __ps_free_icon);
"package_system, package_type, package_size, installed_time, "
"installed_storage, storeclient_id, mainapp_id, package_url, "
"root_path, csc_path, package_nodisplay, package_api_version, "
- "package_support_disable, package_tep_name "
+ "package_support_disable, package_tep_name, package_zip_mount_file "
"FROM package_info WHERE package=%Q AND package_disable='false'";
int ret;
char *query;
_save_column_str(stmt, idx++, &info->api_version);
_save_column_str(stmt, idx++, &info->support_disable);
_save_column_str(stmt, idx++, &info->tep_name);
+ _save_column_str(stmt, idx++, &info->zip_mount_file);
if (_pkginfo_get_author(db, info->package, &info->author)) {
pkgmgrinfo_basic_free_package(info);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_pkginfo_get_zip_mount_file(pkgmgrinfo_pkginfo_h handle, char **zip_mount_file)
+{
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
+
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
+ retvm_if(zip_mount_file == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+ if (info->pkg_info == NULL)
+ return PMINFO_R_ERROR;
+
+ if (strlen(info->pkg_info->zip_mount_file) > 0)
+ *zip_mount_file = (char *)info->pkg_info->zip_mount_file;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location)
{
char *val;