From 94ace9e610e05d64baf0297aab0361db3f9a7c9d Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Mon, 19 Feb 2018 14:42:33 +0900 Subject: [PATCH] Add PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM property Change-Id: I5ff9a9943c97e23f6efff8b0f5fb5ae026690cac Signed-off-by: Junghyun Yeon --- include/pkgmgr-info.h | 2 ++ src/pkgmgrinfo_private.c | 6 +++++- src/pkgmgrinfo_private.h | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/pkgmgr-info.h b/include/pkgmgr-info.h index a8f3971..76197e4 100644 --- a/include/pkgmgr-info.h +++ b/include/pkgmgr-info.h @@ -99,6 +99,8 @@ extern "C" { #define PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD "PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD" /** Boolean property for filtering based on package info*/ #define PMINFO_PKGINFO_PROP_PACKAGE_READONLY "PMINFO_PKGINFO_PROP_PACKAGE_READONLY" + /** Boolean property for filtering based on package info*/ +#define PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM "PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM" /** Boolean property for filtering based on package info*/ #define PMINFO_PKGINFO_PROP_PACKAGE_UPDATE "PMINFO_PKGINFO_PROP_PACKAGE_UPDATE" /** Boolean property for filtering based on package info*/ diff --git a/src/pkgmgrinfo_private.c b/src/pkgmgrinfo_private.c index cea1f68..1bad2d0 100644 --- a/src/pkgmgrinfo_private.c +++ b/src/pkgmgrinfo_private.c @@ -78,7 +78,8 @@ static struct _pkginfo_bool_map_t pkginfo_bool_prop_map[] = { {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}, {E_PMINFO_PKGINFO_PROP_PACKAGE_DISABLE, PMINFO_PKGINFO_PROP_PACKAGE_DISABLE}, - {E_PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE, PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE} + {E_PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE, PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE}, + {E_PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM, PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM} }; struct _appinfo_str_map_t { @@ -303,6 +304,9 @@ int __get_filter_condition(gpointer data, uid_t uid, char **condition, GList **p case E_PMINFO_PKGINFO_PROP_PACKAGE_DISABLE: snprintf(buf, sizeof(buf), "pi.package_disable=? COLLATE NOCASE"); break; + case E_PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM: + snprintf(buf, sizeof(buf), "pi.package_system=? COLLATE NOCASE"); + break; case E_PMINFO_APPINFO_PROP_APP_ID: snprintf(buf, sizeof(buf), "ai.app_id=?"); diff --git a/src/pkgmgrinfo_private.h b/src/pkgmgrinfo_private.h index 4ccc425..7cfaa89 100644 --- a/src/pkgmgrinfo_private.h +++ b/src/pkgmgrinfo_private.h @@ -101,7 +101,8 @@ typedef enum _pkgmgrinfo_pkginfo_filter_prop_bool { E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE, E_PMINFO_PKGINFO_PROP_PACKAGE_DISABLE, E_PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE, - E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_BOOL = E_PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE + E_PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM, + E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_BOOL = E_PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM } pkgmgrinfo_pkginfo_filter_prop_bool; /*Integer properties for filtering based on package info*/ -- 2.7.4