Change-Id: I49a6cb8854cbc74d2d38c6edb18268e41bd6b705
*/
#define PMINFO_PKGINFO_INSTALL_LOCATION_EXTERNAL "LOCATION_EXTERNAL"
*/
#define PMINFO_PKGINFO_INSTALL_LOCATION_EXTERNAL "LOCATION_EXTERNAL"
-/**
- * @brief Value to be used when filtering based on app-component
- */
-#define PMINFO_APPINFO_UI_APP "UI_APP"
-
-/**
- * @brief Value to be used when filtering based on app-component
- */
-#define PMINFO_APPINFO_SVC_APP "SVC_APP"
-
typedef enum {
PMINFO_HWACCELERATION_NOT_USE_GL = 0, /**< Don't use hardware acceleration*/
PMINFO_HWACCELERATION_USE_GL = 1, /**< Use hardware acceleration*/
typedef enum {
PMINFO_HWACCELERATION_NOT_USE_GL = 0, /**< Don't use hardware acceleration*/
PMINFO_HWACCELERATION_USE_GL = 1, /**< Use hardware acceleration*/
+static const char *__appcomponent_str(pkgmgrinfo_app_component comp);
+
API 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)
API 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)
- switch (component) {
- case PMINFO_UI_APP:
- comp_str = PMINFO_APPINFO_UI_APP;
- break;
- case PMINFO_SVC_APP:
- comp_str = PMINFO_APPINFO_SVC_APP;
- break;
- default:
- break;
- }
+ comp_str = __appcomponent_str(component);
if (comp_str) {
if (pkgmgrinfo_appinfo_filter_add_string(filter,
if (comp_str) {
if (pkgmgrinfo_appinfo_filter_add_string(filter,
+static const char *__appcomponent_str(pkgmgrinfo_app_component comp)
+{
+ switch (comp) {
+ case PMINFO_UI_APP:
+ return "uiapp";
+ case PMINFO_SVC_APP:
+ return "svcapp";
+ case PMINFO_WIDGET_APP:
+ return "widgetapp";
+ case PMINFO_WATCH_APP:
+ return "watchapp";
+ default:
+ return NULL;
+ }
+}
+
API int pkgmgrinfo_appinfo_get_component(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_component *component)
{
pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
API int pkgmgrinfo_appinfo_get_component(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_component *component)
{
pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
node->prop = prop;
switch (prop) {
case E_PMINFO_APPINFO_PROP_APP_COMPONENT:
node->prop = prop;
switch (prop) {
case E_PMINFO_APPINFO_PROP_APP_COMPONENT:
- if (strcmp(value, PMINFO_APPINFO_UI_APP) == 0)
- val = strndup("uiapp", PKG_STRING_LEN_MAX - 1);
- else
- val = strndup("svcapp", PKG_STRING_LEN_MAX - 1);
- node->value = val;
+ node->value = strdup(value);
link = g_slist_find_custom(filter->list, (gconstpointer)node, __compare_func);
if (link)
filter->list = g_slist_delete_link(filter->list, link);
link = g_slist_find_custom(filter->list, (gconstpointer)node, __compare_func);
if (link)
filter->list = g_slist_delete_link(filter->list, link);