int pkgmgrinfo_pkginfo_get_version(pkgmgrinfo_pkginfo_h handle, char **version);
/**
+ * @fn int pkgmgrinfo_pkginfo_get_tep_name(pkgmgrinfo_pkginfo_h handle, char **tep_name)
+ * @brief This API gets tep(tizen expansion package) file name associated with the package
+ *
+ * @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
+ * @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_tep_name(const char *pkgid)
+{
+ int ret = 0;
+ char *tep_name = NULL;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_get_tep_name(handle, &tep_name);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("TEP name is: %s\n", tep_name);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+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
*
int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode);
/**
+ * @fn int int pkgmgrinfo_appinfo_is_process_pool(pkgmgrinfo_appinfo_h handle, bool *process_pool)
+ * @brief This API gets the value for given application is process_pool or not from handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] process_pool pointer to hold process_pool is or not
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @code
+static int get_app_process_pool(const char *appid)
+{
+ int ret = 0;
+ bool process_pool = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_process_pool(handle, &process_pool);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("process_pool: %d\n", process_pool);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_process_pool(pkgmgrinfo_appinfo_h handle, bool *process_pool);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_installed_storage_location(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_installed_storage *storage)
+ * @brief This API gets the installed storage location of the application
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info handle.
+ * @param[out] app_type pointer to hold installed storage location
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @code
+static int get_app_installed_location(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_installed_storage storage;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_installed_storage_location(handle, &storage);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("Installed storage location : %d\n", storage);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_installed_storage_location(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_installed_storage *storage);
+
+
+/**
* @fn int pkgmgrinfo_appinfo_is_category_exist(pkgmgrinfo_appinfo_h handle, const char *category, bool *exist)
* @brief This API checks if the application has the given category
*
const char *submode; /*attr, default: "false"*/
const char *submode_mainid; /*attr, default: "false"*/
const char *process_pool; /*attr, default: "false"*/
+ const char *installed_storage;
const char *autorestart; /*attr, default: "false"*/
const char *onboot; /*attr, default: "false"*/
const char *multi_instance; /*attr, default: "false"*/
retvm_if(((strcmp(application->component_type, "svcapp") != 0) && (strcmp(application->component_type, "uiapp") != 0) && (strcmp(application->component_type, "widgetapp") != 0)), PM_PARSER_R_ERROR, "invalid component_type[%s]", application->component_type);
__save_xml_attribute(reader, "submode", &application->submode, "false");
__save_xml_attribute(reader, "submode-mainid", &application->submode_mainid, NULL);
+ __save_xml_attribute(reader, "process-pool", &application->process_pool, "false");
__save_xml_attribute(reader, "launch_mode", &application->launch_mode, "caller");
__save_xml_attribute(reader, "ui-gadget", &application->ui_gadget, "false");
__save_xml_attribute(reader, "auto-restart", &application->autorestart, "false");
"app_preload text DEFAULT 'false', " \
"app_submode text DEFAULT 'false', " \
"app_submode_mainid text, " \
+ "app_installed_storage text, " \
+ "app_process_pool text DEFAULT 'false', " \
"app_launch_mode text NOT NULL DEFAULT 'caller', " \
"app_ui_gadget text DEFAULT 'false', " \
"app_support_disable text DEFAULT 'false', " \
"insert into package_app_info(app_id, app_component, app_exec, app_nodisplay, app_type, app_onboot, " \
"app_multiple, app_autorestart, app_taskmanage, app_enabled, app_hwacceleration, app_screenreader, app_mainapp , app_recentimage, " \
"app_launchcondition, app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, "\
- "app_preload, app_submode, app_submode_mainid, app_launch_mode, app_ui_gadget, app_support_disable, component_type, package, app_tep_name) " \
- "values('%s', '%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
+ "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) " \
+ "values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
app->appid,
app->component_type,
app->exec,
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_permissiontype, app_preload, app_submode, "
"app_submode_mainid, app_launch_mode, app_ui_gadget, "
"app_support_disable, "
- "component_type, package "
+ "component_type, package, app_process_pool, app_installed_storage "
"FROM package_app_info WHERE app_id=%Q";
int ret;
char *query;
_save_column_str(stmt, idx++, &info->support_disable);
_save_column_str(stmt, idx++, &info->component_type);
_save_column_str(stmt, idx++, &info->package);
+ _save_column_str(stmt, idx++, &info->process_pool);
+ _save_column_str(stmt, idx++, &info->installed_storage);
if (_appinfo_get_label(db, info->appid, locale, &info->label)) {
pkgmgrinfo_basic_free_application(info);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_is_process_pool(pkgmgrinfo_appinfo_h handle, bool *process_pool)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ retvm_if(process_pool == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->app_info->process_pool;
+ if (val) {
+ if (strcasecmp(val, "true") == 0)
+ *process_pool = 1;
+ else if (strcasecmp(val, "false") == 0)
+ *process_pool = 0;
+ else
+ *process_pool = 0;
+ }
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_installed_storage_location(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_installed_storage *storage)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ if (info->app_info && info->app_info->installed_storage){
+ if (strcmp(info->app_info->installed_storage,"installed_internal") == 0)
+ *storage = PMINFO_INTERNAL_STORAGE;
+ else if (strcmp(info->app_info->installed_storage,"installed_external") == 0)
+ *storage = PMINFO_EXTERNAL_STORAGE;
+ else
+ return PMINFO_R_ERROR;
+ }else
+ return PMINFO_R_ERROR;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_get_launch_mode(pkgmgrinfo_appinfo_h handle, char **mode)
{
pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
free((void *)application->submode);
if (application->submode_mainid)
free((void *)application->submode_mainid);
+ if (application->process_pool)
+ free((void *)application->process_pool);
+ if (application->installed_storage)
+ free((void *)application->installed_storage);
if (application->launch_mode)
free((void *)application->launch_mode);
if (application->ui_gadget)
* limitations under the License.
*
*/
-
+
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
"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_support_disable, package_tep_name "
"FROM package_info WHERE package=%Q";
int ret;
char *query;
_save_column_str(stmt, idx++, &info->nodisplay_setting);
_save_column_str(stmt, idx++, &info->api_version);
_save_column_str(stmt, idx++, &info->support_disable);
+ _save_column_str(stmt, idx++, &info->tep_name);
if (_pkginfo_get_author(db, info->package, &info->author)) {
pkgmgrinfo_basic_free_package(info);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_pkginfo_get_tep_name(pkgmgrinfo_pkginfo_h handle, char **tep_name)
+{
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
+
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
+ retvm_if(tep_name == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+ if (info->pkg_info == NULL || info->pkg_info->tep_name == NULL)
+ return PMINFO_R_ERROR;
+
+ *tep_name = (char *)info->pkg_info->tep_name;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_pkginfo_get_install_location(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_install_location *location)
{
char *val;