From b50ac40f936574e2cb547bfdbf6740213bb87410 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 19 Aug 2016 10:52:24 +0900 Subject: [PATCH] Add installed_storage to appinfo filter Change-Id: Idbf3a84a85d3a44df9710d4f62ff66def1bf0aeb Signed-off-by: Junghyun Yeon --- include/pkgmgr-info.h | 2 ++ include/pkgmgrinfo_private.h | 1 + src/pkgmgrinfo_private.c | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/pkgmgr-info.h b/include/pkgmgr-info.h index a060660..f55996a 100644 --- a/include/pkgmgr-info.h +++ b/include/pkgmgr-info.h @@ -138,6 +138,8 @@ extern "C" { /** String property for filtering based on app info*/ #define PMINFO_APPINFO_PROP_APP_PACKAGE "PMINFO_APPINFO_PROP_APP_PACKAGE" /** String property for filtering based on app info*/ +#define PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE "PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE" + /** String property for filtering based on app info*/ #define PMINFO_APPINFO_PROP_APP_METADATA_KEY "PMINFO_APPINFO_PROP_APP_METADATA_KEY" /** String property for filtering based on app info*/ #define PMINFO_APPINFO_PROP_APP_METADATA_VALUE "PMINFO_APPINFO_PROP_APP_METADATA_VALUE" diff --git a/include/pkgmgrinfo_private.h b/include/pkgmgrinfo_private.h index 52d69a4..d72c01d 100644 --- a/include/pkgmgrinfo_private.h +++ b/include/pkgmgrinfo_private.h @@ -126,6 +126,7 @@ typedef enum _pkgmgrinfo_appinfo_filter_prop_str { E_PMINFO_APPINFO_PROP_APP_CATEGORY, E_PMINFO_APPINFO_PROP_APP_SCREENREADER, E_PMINFO_APPINFO_PROP_APP_PACKAGE, + E_PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE, E_PMINFO_APPINFO_PROP_APP_METADATA_KEY, E_PMINFO_APPINFO_PROP_APP_METADATA_VALUE, E_PMINFO_APPINFO_PROP_APP_MAX_STR = E_PMINFO_APPINFO_PROP_APP_METADATA_VALUE diff --git a/src/pkgmgrinfo_private.c b/src/pkgmgrinfo_private.c index f213959..d740f30 100644 --- a/src/pkgmgrinfo_private.c +++ b/src/pkgmgrinfo_private.c @@ -95,7 +95,8 @@ static struct _appinfo_str_map_t appinfo_str_prop_map[] = { {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} + {E_PMINFO_APPINFO_PROP_APP_PACKAGE, PMINFO_APPINFO_PROP_APP_PACKAGE}, + {E_PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE, PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE} }; struct _appinfo_int_map_t { @@ -368,6 +369,9 @@ int __get_filter_condition(gpointer data, char **condition, GList **params) case E_PMINFO_APPINFO_PROP_APP_PACKAGE: snprintf(buf, sizeof(buf), "ai.package=?"); break; + case E_PMINFO_APPINFO_PROP_APP_INSTALLED_STORAGE: + snprintf(buf, sizeof(buf), "ai.installed_storage=?"); + break; case E_PMINFO_APPINFO_PROP_APP_UI_GADGET: snprintf(buf, sizeof(buf), "ai.app_ui_gadget=? COLLATE NOCASE"); break; -- 2.7.4