*/
int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type);
+/**
+ * @fn int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
+ * @brief This API gets the application 'hwacceleration' value from the app ID
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] hwacceleration pointer to hold package hwacceleration value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_hwacceleration(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_app_hwacceleration hwacceleration;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_hwacceleration(handle, &hwacceleration);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app hwacceleration: %d\n", hwacceleration);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
+ * @brief This API gets the application's landscape & portrait effect images
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] portrait_img contains portrait mode effect image
+ * @param[out] landscape_img contains landscape mode effect image
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_nodisplay()
+ * @code
+static int get_app_effectimages(const char *appid)
+{
+ int ret = 0;
+ char *portraitimg = NULL;
+ char *landscapeimg = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_effectimage(handle, &portraitimg, &landscapeimg);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app effect image portrait: %s, app effect image landscape : %s\n", portraitimg, landscapeimg);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img);
+
+/**
+ * @fn int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid)
+ * @brief This API gets the submode_mainid of the application
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to the application info handle.
+ * @param[out] submode_mainid pointer to hold package name
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_submode_mainid(const char *appid)
+{
+ int ret = 0;
+ char *submode_mainid = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_submode_mainid(handle, &submode_mainid);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("submode_mainid: %s\n", submode_mainid);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid);
/**
* @fn int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
int pkgmgrinfo_appinfo_is_indicator_display_allowed(pkgmgrinfo_appinfo_h handle, bool *indicator_disp);
/**
- * @fn int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
- * @brief This API gets the application's landscape & portrait effect images
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to application info handle
- * @param[out] portrait_img contains portrait mode effect image
- * @param[out] landscape_img contains landscape mode effect image
- * @return 0 if success, error code(<0) if fail
- * @retval PMINFO_R_OK success
- * @retval PMINFO_R_EINVAL invalid argument
- * @retval PMINFO_R_ERROR internal error
- * @pre pkgmgrinfo_appinfo_get_appinfo()
- * @post pkgmgrinfo_appinfo_destroy_appinfo()
- * @see pkgmgrinfo_appinfo_get_appid()
- * @see pkgmgrinfo_appinfo_is_nodisplay()
- * @code
-static int get_app_effectimages(const char *appid)
-{
- int ret = 0;
- char *portraitimg = NULL;
- char *landscapeimg = NULL;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_get_effectimage(handle, &portraitimg, &landscapeimg);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- printf("app effect image portrait: %s, app effect image landscape : %s\n", portraitimg, landscapeimg);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img);
-
-/**
* @fn int pkgmgrinfo_appinfo_is_taskmanage(pkgmgrinfo_appinfo_h handle, bool *taskmanage)
* @brief This API gets the application 'taskmanage' value from the app ID
*
int pkgmgrinfo_appinfo_is_enabled(pkgmgrinfo_appinfo_h handle, bool *enabled);
/**
- * @fn int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
- * @brief This API gets the application 'hwacceleration' value from the app ID
- *
- * @par This API is for package-manager client application
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in] handle pointer to application info handle
- * @param[out] hwacceleration pointer to hold package hwacceleration value
- * @return 0 if success, error code(<0) if fail
- * @retval PMINFO_R_OK success
- * @retval PMINFO_R_EINVAL invalid argument
- * @retval PMINFO_R_ERROR internal error
- * @pre pkgmgrinfo_appinfo_get_appinfo()
- * @post pkgmgrinfo_appinfo_destroy_appinfo()
- * @see pkgmgrinfo_appinfo_get_appid()
- * @see pkgmgrinfo_appinfo_is_multiple()
- * @code
-static int get_app_hwacceleration(const char *appid)
-{
- int ret = 0;
- pkgmgrinfo_app_hwacceleration hwacceleration;
- pkgmgrinfo_appinfo_h handle;
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_get_hwacceleration(handle, &hwacceleration);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- printf("app hwacceleration: %d\n", hwacceleration);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return 0;
-}
- * @endcode
- */
-int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration);
-
-/**
* @fn int pkgmgrinfo_appinfo_is_onboot(pkgmgrinfo_appinfo_h handle, bool *onboot)
* @brief This API gets the application 'onboot' value from the app ID
*
int pkgmgrinfo_appinfo_is_preload(pkgmgrinfo_appinfo_h handle, bool *preload);
/**
+ * @fn int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode)
+ * @brief This API gets the value for given application is submode or not from handle
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to application info handle
+ * @param[out] submode pointer to hold submode is or not
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @retval PMINFO_R_ERROR internal error
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_submode(const char *appid)
+{
+ int ret = 0;
+ bool submode = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_submode(handle, &submode);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("submode: %d\n", submode);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode);
+
+/**
* @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
* @brief This API destroys the application information handle freeing up all the resources
*
Name: pkgmgr-info
Summary: Packager Manager infomation api for package
-Version: 0.0.120
+Version: 0.0.123
Release: 1
Group: Application Framework/Package Management
License: Apache-2.0
<xs:attribute name="launchcondition" type="xs:boolean"/>
<xs:attribute name="permission-type" type="xs:string"/>
<xs:attribute name="component-type" type="xs:string"/>
+ <xs:attribute name="submode" type="xs:boolean"/>
+ <xs:attribute name="submode-mainid" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="ime-application">
free((void *)uiapplication->preload);
uiapplication->preload = NULL;
}
+ if (uiapplication->submode) {
+ free((void *)uiapplication->submode);
+ uiapplication->submode = NULL;
+ }
+ if (uiapplication->submode_mainid) {
+ free((void *)uiapplication->submode_mainid);
+ uiapplication->submode_mainid = NULL;
+ }
free((void*)uiapplication);
uiapplication = NULL;
} else {
uiapplication->component_type = strdup("uiapp");
}
+ if (xmlTextReaderGetAttribute(reader, XMLCHAR("submode"))) {
+ uiapplication->submode = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("submode")));
+ if (uiapplication->submode == NULL)
+ uiapplication->submode = strdup("false");
+ } else {
+ uiapplication->submode = strdup("false");
+ }
+ if (xmlTextReaderGetAttribute(reader, XMLCHAR("submode-mainid")))
+ uiapplication->submode_mainid = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("submode-mainid")));
depth = xmlTextReaderDepth(reader);
while ((ret = __next_child_element(reader, depth))) {
AIL_INSTALL = 0,
AIL_UPDATE,
AIL_REMOVE,
+ AIL_CLEAN,
AIL_MAX
} AIL_TYPE;
case 2:
aop = "ail_desktop_remove";
break;
+ case 3:
+ aop = "ail_desktop_clean";
+ break;
default:
goto END;
break;
return -1;
}
+ if (is_update)
+ __ail_change_info(AIL_CLEAN, mfx->package);
+
for(; mfx->uiapplication; mfx->uiapplication=mfx->uiapplication->next) {
if (manifest != NULL) {
fsync(fd);
fclose(file);
- if (!is_update)
- __ail_change_info(AIL_INSTALL, mfx->uiapplication->appid);
- else
- __ail_change_info(AIL_UPDATE, mfx->uiapplication->appid);
+ __ail_change_info(AIL_INSTALL, mfx->uiapplication->appid);
}
free(buf);
return 0;
}
+
+API int pkgmgr_parser_create_desktop_file(manifest_x *mfx)
+{
+ int ret = 0;
+ if (mfx == NULL) {
+ DBG("Manifest pointer is NULL\n");
+ return -1;
+ }
+ ret = __ps_make_nativeapp_desktop(mfx, NULL, 0);
+ if (ret == -1)
+ DBG("Creating desktop file failed\n");
+ else
+ DBG("Creating desktop file Success\n");
+ return ret;
+}
+
API void pkgmgr_parser_free_manifest_xml(manifest_x *mfx)
{
if (mfx == NULL)
return PMINFO_R_OK;
}
-API int pkgmgr_parser_create_desktop_file(manifest_x *mfx)
-{
- int ret = 0;
- if (mfx == NULL) {
- DBG("Manifest pointer is NULL\n");
- return -1;
- }
- ret = __ps_make_nativeapp_desktop(mfx, NULL, 0);
- if (ret == -1)
- DBG("Creating desktop file failed\n");
- else
- DBG("Creating desktop file Success\n");
- return ret;
-}
-
-
API int pkgmgr_parser_parse_manifest_for_upgrade(const char *manifest, char *const tagv[])
{
char *temp[] = {"shortcut-list", "livebox", "account", "notifications", "privileges", "ime", "font", NULL};
DBG("parsing manifest for upgradation: %s\n", manifest);
manifest_x *mfx = NULL;
int ret = -1;
- bool preload = 0;
+ bool preload = false;
char *csc_path = NULL;
pkgmgrinfo_pkginfo_h handle = NULL;
return __ps_run_parser(docPtr, tag, ACTION_UNINSTALL, pkgid);
}
+API int pkgmgr_parser_run_post_for_installation(const char *pkgid, char *const tagv[])
+{
+ return PMINFO_R_OK;
+}
+
+API int pkgmgr_parser_run_post_for_upgrade(const char *pkgid, char *const tagv[])
+{
+ return PMINFO_R_OK;
+}
+
+API int pkgmgr_parser_run_post_for_uninstallation(const char *pkgid)
+{
+ return PMINFO_R_OK;
+}
+
#define SCHEMA_FILE "/usr/etc/package-manager/preload/manifest.xsd"
#if 1
API int pkgmgr_parser_check_manifest_validation(const char *manifest)
const char *permission_type;
const char *component_type;
const char *preload;
+ const char *submode;
+ const char *submode_mainid;
struct label_x *label;
struct icon_x *icon;
struct image_x *image;
int pkgmgr_parser_run_parser_for_uninstallation(xmlDocPtr docPtr, const char *tag, const char *pkgid);
/**
+ * @fn int pkgmgr_parser_run_post_for_installation(const char *pkgid, char *const tagv[])
+ * @brief This API is called by backend installer for post action. It is used during package installation
+ *
+ * @par This API is for package-manager installer backends.
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] pkgid the package id
+ * @param[in] tagv array of tags or NULL
+ * @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
+ * @code
+static int parse_post_for_installation(const char *pkgid)
+{
+ int ret = 0;
+ ret = pkgmgr_parser_run_post_for_installation(pkgid, NULL);
+ if (ret)
+ return -1;
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgr_parser_run_post_for_installation(const char *pkgid, char *const tagv[]);
+
+/**
+ * @fn int pkgmgr_parser_run_post_for_upgrade(const char *pkgid, char *const tagv[])
+ * @brief This API is called by backend installer for post action. It is used during package upgrade
+
+ * @par This API is for package-manager installer backends.
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] pkgid the package id
+ * @param[in] tagv array of tags or NULL
+ * @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
+ * @code
+static int parse_post_for_upgrade(const char *pkgid)
+{
+ int ret = 0;
+ ret = pkgmgr_parser_run_post_for_upgrade(pkgid, NULL);
+ if (ret)
+ return -1;
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgr_parser_run_post_for_upgrade(const char *pkgid, char *const tagv[]);
+
+/**
+ * @fn int pkgmgr_parser_run_post_for_uninstallation(const char *pkgid)
+ * @brief This API is called by backend installer for run post action. It is used during package uninstallation
+ *
+ * @par This API is for package-manager installer backends.
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] pkgid the package id
+ * @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
+ * @code
+static int parse_post_for_uninstallation(const char *pkgid)
+{
+ int ret = 0;
+ ret = pkgmgr_parser_run_post_for_uninstallation(pkgid);
+ if (ret)
+ return -1;
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgr_parser_run_post_for_uninstallation(const char *pkgid);
+
+
+/**
* @fn int pkgmgr_parser_create_desktop_file(manifest_x *mfx)
* @brief This API generates the application desktop file
*
"app_guestmodevisibility text DEFAULT 'true', " \
"app_permissiontype text DEFAULT 'normal', " \
"app_preload text DEFAULT 'false', " \
+ "app_submode text DEFAULT 'false', " \
+ "app_submode_mainid text, " \
"component_type text, " \
"package text not null, " \
"FOREIGN KEY(package) " \
"('%q', '%q', '%q', '%q', '%q', '%q', '%q')", up->package, (char*)data,
label, icon, NULL, NULL, NULL);
ret = __exec_query_no_msg(query);
- if (ret == -1) {
- snprintf(query, MAX_QUERY_LEN,
- "update package_localized_info set package_label='%s', package_icon='%s' where package='%s' and package_locale='%s'", label, icon, up->package, (char*)data);
- __exec_query_no_msg(query);
- }
}
}
snprintf(query, MAX_QUERY_LEN,
"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_mainapp , app_recentimage, " \
- "app_launchcondition, app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, app_preload, component_type, package) " \
- "values('%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
+ "app_launchcondition, app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, "\
+ "app_preload, app_submode, app_submode_mainid, component_type, package) " \
+ "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')",\
up->appid, "uiapp", up->exec, up->nodisplay, up->type, "\0", up->multiple,
"\0", up->taskmanage, up->enabled, up->hwacceleration,up->mainapp, up->recentimage,
- up->launchcondition, up->indicatordisplay, up->portraitimg, up->landscapeimg, up->guestmode_visibility, up->permission_type, mfx->preload, up->component_type, mfx->package);
+ up->launchcondition, up->indicatordisplay, up->portraitimg, up->landscapeimg, up->guestmode_visibility, up->permission_type,
+ mfx->preload, up->submode, up->submode_mainid, up->component_type, mfx->package);
ret = __exec_query(query);
if (ret == -1) {
DBG("Package UiApp Info DB Insert Failed\n");
info->manifest_info->uiapplication->preload = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->submode = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->submode_mainid = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->submode_mainid = NULL;
} else
continue;
}
info->uiapp_info->preload = strdup(coltxt[i]);
else
info->uiapp_info->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode_mainid = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode_mainid = NULL;
} else
continue;
}
info->uiapp_info->preload = strdup(coltxt[i]);
else
info->uiapp_info->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode_mainid = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode_mainid = NULL;
} else
continue;
}
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(hwacceleration == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->hwacceleration;
+ if (val) {
+ if (strcasecmp(val, "not-use-GL") == 0)
+ *hwacceleration = PMINFO_HWACCELERATION_NOT_USE_GL;
+ else if (strcasecmp(val, "use-GL") == 0)
+ *hwacceleration = PMINFO_HWACCELERATION_USE_GL;
+ else
+ *hwacceleration = PMINFO_HWACCELERATION_USE_SYSTEM_SETTING;
+ }
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(portrait_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ retvm_if(landscape_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ if (info->app_component == PMINFO_UI_APP){
+ *portrait_img = (char *)info->uiapp_info->portraitimg;
+ *landscape_img = (char *)info->uiapp_info->landscapeimg;
+ }
+
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(submode_mainid == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ *submode_mainid = (char *)info->uiapp_info->submode_mainid;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
pkgmgrinfo_app_permission_list_cb permission_func, void *user_data)
{
switch (component) {
case PMINFO_UI_APP:
if (mfx->uiapplication) {
- if (mfx->uiapplication->appcontrol) {
- appcontrol = mfx->uiapplication->appcontrol;
+ if (mfx->uiapplication->appsvc) {
+ appcontrol = mfx->uiapplication->appsvc;
}
}
break;
case PMINFO_SVC_APP:
if (mfx->serviceapplication) {
- if (mfx->serviceapplication->appcontrol) {
- appcontrol = mfx->serviceapplication->appcontrol;
+ if (mfx->serviceapplication->appsvc) {
+ appcontrol = mfx->serviceapplication->appsvc;
}
}
break;
return PMINFO_R_OK;
}
-
-API int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
-{
- retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
- retvm_if(portrait_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- retvm_if(landscape_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
-
- if (info->app_component == PMINFO_UI_APP){
- *portrait_img = (char *)info->uiapp_info->portraitimg;
- *landscape_img = (char *)info->uiapp_info->landscapeimg;
- }
-
- return PMINFO_R_OK;
-}
-
API int pkgmgrinfo_appinfo_is_taskmanage(pkgmgrinfo_appinfo_h handle, bool *taskmanage)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
}
-API int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
-{
- retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
- retvm_if(hwacceleration == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- char *val = NULL;
- pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
- val = (char *)info->uiapp_info->hwacceleration;
- if (val) {
- if (strcasecmp(val, "not-use-GL") == 0)
- *hwacceleration = PMINFO_HWACCELERATION_NOT_USE_GL;
- else if (strcasecmp(val, "use-GL") == 0)
- *hwacceleration = PMINFO_HWACCELERATION_USE_GL;
- else
- *hwacceleration = PMINFO_HWACCELERATION_USE_SYSTEM_SETTING;
- }
- return PMINFO_R_OK;
-}
-
API int pkgmgrinfo_appinfo_is_onboot(pkgmgrinfo_appinfo_h handle, bool *onboot)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ retvm_if(submode == 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->uiapp_info->submode;
+ if (val) {
+ if (strcasecmp(val, "true") == 0)
+ *submode = 1;
+ else if (strcasecmp(val, "false") == 0)
+ *submode = 0;
+ else
+ *submode = 0;
+ }
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");