int pkgmgrinfo_appinfo_get_permission_type(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_permission_type *permission);
/**
+ * @fn int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type)
+ * @brief This API gets the component_type
+ *
+ * @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] component_type pointer to hold component_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_pkgid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_component_type(const char *appid)
+{
+ int ret = 0;
+ char *component_type = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_component_type(handle, &component_type);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("component_type: %s\n", component_type);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type);
+
+
+/**
* @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
Name: pkgmgr-info
Summary: Packager Manager infomation api for package
-Version: 0.0.118
+Version: 0.0.119
Release: 1
Group: Application Framework/Package Management
License: Apache-2.0
<xs:attribute name="guestmode-visibility" type="xs:string"/>
<xs:attribute name="launchcondition" type="xs:boolean"/>
<xs:attribute name="permission-type" type="xs:string"/>
+ <xs:attribute name="component-type" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="ime-application">
free((void *)uiapplication->permission_type);
uiapplication->permission_type = NULL;
}
+ if (uiapplication->component_type) {
+ free((void *)uiapplication->component_type);
+ uiapplication->component_type = NULL;
+ }
free((void*)uiapplication);
uiapplication = NULL;
} else {
uiapplication->permission_type = strdup("normal");
}
+ if (xmlTextReaderGetAttribute(reader, XMLCHAR("component-type"))) {
+ uiapplication->component_type = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("component-type")));
+ if (uiapplication->component_type == NULL)
+ uiapplication->component_type = strdup("uiapp");
+ } else {
+ uiapplication->component_type = strdup("uiapp");
+ }
depth = xmlTextReaderDepth(reader);
while ((ret = __next_child_element(reader, depth))) {
const char *guestmode_visibility;
const char *app_component;
const char *permission_type;
+ const char *component_type;
struct label_x *label;
struct icon_x *icon;
struct image_x *image;
"app_landscapeimg text, " \
"app_guestmodevisibility text DEFAULT 'true', " \
"app_permissiontype text DEFAULT 'normal', " \
+ "component_type text, " \
"package text not null, " \
"FOREIGN KEY(package) " \
"REFERENCES package_info(package) " \
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, package) " \
- "values('%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, 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')",\
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->package);
+ up->launchcondition, up->indicatordisplay, up->portraitimg, up->landscapeimg, up->guestmode_visibility, up->permission_type, up->component_type, mfx->package);
ret = __exec_query(query);
if (ret == -1) {
DBG("Package UiApp Info DB Insert Failed\n");
info->manifest_info->uiapplication->permission_type = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->component_type = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->component_type = NULL;
} else
continue;
}
info->uiapp_info->permission_type = strdup(coltxt[i]);
else
info->uiapp_info->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->component_type = strdup(coltxt[i]);
+ else
+ info->uiapp_info->component_type = NULL;
} else
continue;
}
info->uiapp_info->permission_type = strdup(coltxt[i]);
else
info->uiapp_info->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->component_type = strdup(coltxt[i]);
+ else
+ info->uiapp_info->component_type = NULL;
} else
continue;
}
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(component_type == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ *component_type = (char *)info->uiapp_info->component_type;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
pkgmgrinfo_app_permission_list_cb permission_func, void *user_data)
{