{E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALLED_STORAGE,PMINFO_PKGINFO_PROP_PACKAGE_INSTALLED_STORAGE},
{E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_NAME, PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_NAME},
{E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_EMAIL, PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_EMAIL},
- {E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF, PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF}
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF, PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF},
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE, PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE}
};
struct _pkginfo_int_map_t {
{E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY, PMINFO_PKGINFO_PROP_PACKAGE_READONLY},
{E_PMINFO_PKGINFO_PROP_PACKAGE_UPDATE, PMINFO_PKGINFO_PROP_PACKAGE_UPDATE},
{E_PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING, PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING},
- {E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING, PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING}
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING, PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING},
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE, PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE}
};
struct _appinfo_str_map_t {
{E_PMINFO_APPINFO_PROP_APP_CATEGORY, PMINFO_APPINFO_PROP_APP_CATEGORY},
{E_PMINFO_APPINFO_PROP_APP_HWACCELERATION, PMINFO_APPINFO_PROP_APP_HWACCELERATION},
{E_PMINFO_APPINFO_PROP_APP_SCREENREADER, PMINFO_APPINFO_PROP_APP_SCREENREADER},
+ {E_PMINFO_APPINFO_PROP_APP_METADATA_KEY, PMINFO_APPINFO_PROP_APP_METADATA_KEY},
+ {E_PMINFO_APPINFO_PROP_APP_METADATA_VALUE, PMINFO_APPINFO_PROP_APP_METADATA_VALUE},
{E_PMINFO_APPINFO_PROP_APP_PACKAGE, PMINFO_APPINFO_PROP_APP_PACKAGE}
};
};
static struct _appinfo_int_map_t appinfo_int_prop_map[] = {
- /*Currently No Fields*/
+ {E_PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER, PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER}
};
struct _appinfo_bool_map_t {
{E_PMINFO_APPINFO_PROP_APP_AUTORESTART, PMINFO_APPINFO_PROP_APP_AUTORESTART},
{E_PMINFO_APPINFO_PROP_APP_TASKMANAGE, PMINFO_APPINFO_PROP_APP_TASKMANAGE},
{E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION, PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION},
- {E_PMINFO_APPINFO_PROP_APP_UI_GADGET, PMINFO_APPINFO_PROP_APP_UI_GADGET}
+ {E_PMINFO_APPINFO_PROP_APP_UI_GADGET, PMINFO_APPINFO_PROP_APP_UI_GADGET},
+ {E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE, PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE}
};
inline pkgmgrinfo_pkginfo_filter_prop_str _pminfo_pkginfo_convert_to_prop_str(const char *property)
void __get_filter_condition(gpointer data, char **condition)
{
pkgmgrinfo_node_x *node = (pkgmgrinfo_node_x*)data;
- char buf[MAX_QUERY_LEN + 1] = {'\0'};
+ char buf[MAX_QUERY_LEN] = {'\0'};
char temp[PKG_STRING_LEN_MAX] = {'\0'};
switch (node->prop) {
case E_PMINFO_PKGINFO_PROP_PACKAGE_ID:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_TYPE:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_type='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_type='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_VERSION:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_version='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_version='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALL_LOCATION:
- snprintf(buf, MAX_QUERY_LEN, "package_info.install_location='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.install_location='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALLED_STORAGE:
- snprintf(buf, MAX_QUERY_LEN, "package_info.installed_storage='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.installed_storage='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_NAME:
- snprintf(buf, MAX_QUERY_LEN, "package_info.author_name='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.author_name='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF:
- snprintf(buf, MAX_QUERY_LEN, "package_info.author_href='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.author_href='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_EMAIL:
- snprintf(buf, MAX_QUERY_LEN, "package_info.author_email='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.author_email='%s'", node->value);
+ break;
+ case E_PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE:
+ snprintf(buf, sizeof(buf), "package_privilege_info.privilege='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_SIZE:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_size='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_size='%s'", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_removable IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_removable IN %s", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_preload IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_preload IN %s", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_readonly IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_readonly IN %s", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_UPDATE:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_update IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_update IN %s", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_appsetting IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_appsetting IN %s", node->value);
break;
case E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING:
- snprintf(buf, MAX_QUERY_LEN, "package_info.package_nodisplay IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_info.package_nodisplay IN %s", node->value);
+ break;
+ case E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE:
+ snprintf(buf, sizeof(buf), "package_info.package_support_disable IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_ID:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_id='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_id='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_COMPONENT:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_component='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_component='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_EXEC:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_exec='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_exec='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_ICON:
- snprintf(buf, MAX_QUERY_LEN, "package_app_localized_info.app_icon='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_localized_info.app_icon='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_TYPE:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_type='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_type='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_OPERATION:
- snprintf(temp, PKG_STRING_LEN_MAX, "(%s)", node->value);
- snprintf(buf, MAX_QUERY_LEN, "package_app_app_svc.operation IN %s", temp);
+ snprintf(temp, sizeof(temp), "(%s)", node->value);
+ snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %s|%%|%%", temp);
break;
case E_PMINFO_APPINFO_PROP_APP_URI:
- snprintf(temp, PKG_STRING_LEN_MAX, "(%s)", node->value);
- snprintf(buf, MAX_QUERY_LEN, "package_app_app_svc.uri_scheme IN %s", temp);
+ snprintf(temp, sizeof(temp), "(%s)", node->value);
+ snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %%|%s|%%", temp);
break;
case E_PMINFO_APPINFO_PROP_APP_MIME:
- snprintf(temp, PKG_STRING_LEN_MAX, "(%s)", node->value);
- snprintf(buf, MAX_QUERY_LEN, "package_app_app_svc.mime_type IN %s", temp);
+ snprintf(temp, sizeof(temp), "(%s)", node->value);
+ snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %%|%%|%s", temp);
break;
case E_PMINFO_APPINFO_PROP_APP_CATEGORY:
- snprintf(temp, PKG_STRING_LEN_MAX, "(%s)", node->value);
- snprintf(buf, MAX_QUERY_LEN, "package_app_app_category.category IN %s", temp);
+ snprintf(temp, sizeof(temp), "(%s)", node->value);
+ snprintf(buf, sizeof(buf), "package_app_app_category.category IN %s", temp);
break;
case E_PMINFO_APPINFO_PROP_APP_NODISPLAY:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_nodisplay IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_nodisplay IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_MULTIPLE:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_multiple IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_multiple IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_ONBOOT:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_onboot IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_onboot IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_AUTORESTART:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_autorestart IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_autorestart IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_TASKMANAGE:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_taskmanage IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_taskmanage IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_HWACCELERATION:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_hwacceleration='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_hwacceleration='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_SCREENREADER:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_screenreader='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_screenreader='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_launchcondition IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_launchcondition IN %s", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_PACKAGE:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.package='%s'", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.package='%s'", node->value);
break;
case E_PMINFO_APPINFO_PROP_APP_UI_GADGET:
- snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_ui_gadget IN %s", node->value);
+ snprintf(buf, sizeof(buf), "package_app_info.app_ui_gadget IN %s", node->value);
+ break;
+ case E_PMINFO_APPINFO_PROP_APP_METADATA_KEY:
+ snprintf(buf, sizeof(buf), "package_app_app_metadata.md_key='%s'", node->value);
+ break;
+ case E_PMINFO_APPINFO_PROP_APP_METADATA_VALUE:
+ snprintf(buf, sizeof(buf), "package_app_app_metadata.md_value='%s'", node->value);
+ break;
+ case E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE:
+ snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_support_disable IN %s", node->value);
+ break;
+ case E_PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER:
+ snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_id NOT IN "
+ "(SELECT app_id from package_app_disable_for_user WHERE uid='%s')", node->value);
break;
default:
_LOGE("Invalid Property Type\n");