Add package filter key(TPK)
authorDuyoung Jang <duyoung.jang@samsung.com>
Thu, 25 Apr 2013 11:41:57 +0000 (20:41 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Thu, 25 Apr 2013 11:41:57 +0000 (20:41 +0900)
Change-Id: I8789a029bbec4e27349f3dace660bea9c0f503ed
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
src/app/inc/FAppPkg_PackageManagerImpl.h
src/app/package/FAppPkg_PackageManagerImpl.cpp

index 8764e03..4fe5ee0 100644 (file)
@@ -65,6 +65,9 @@ static const wchar_t PACKAGE_FILTER_DOWNLOADED[] = L"http://tizen.org/package/do
 static const wchar_t PACKAGE_FILTER_EXTERNAL_STORAGE[] = L"http://tizen.org/package/externalstorage";
 static const wchar_t PACKAGE_FILTER_APP_SETTING[] = L"http://tizen.org/package/appsetting";
 
+// PackageFilter(internal)
+static const wchar_t PACKAGE_FILTER_TPK[] = L"http://tizen.org/package/tpk";
+
 // PackageAppFilter
 static const wchar_t PACKAGE_APP_FILTER_MENUICON_VISIBLE[] = L"http://tizen.org/package/app/menuiconvisible";
 static const wchar_t PACKAGE_APP_FILTER_CATEGORY_HOMEAPP[] = L"http://tizen.org/category/homeapp";
index 9b6e05c..35efd1d 100755 (executable)
@@ -872,6 +872,13 @@ _PackageManagerImpl::GetPackageInfoListN(const IMap& packageFilterMap) const
                        res = pkgmgrinfo_pkginfo_filter_add_bool(handle, PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING, value);
                        SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(APPSETTING, %d) is failed. [%d]", value, res);
                }
+               else if ((*pKey) == PACKAGE_FILTER_TPK)
+               {
+                       SysTryCatch(NID_APP, value == true, , E_SYSTEM, "Value(false) is invalid for PACKAGE_FILTER_TPK.");
+
+                       res = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_TYPE, "tpk");
+                       SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_string(TYPE, tpk) is failed. [%d]", res);
+               }
                else if ((*pKey) == PACKAGE_FILTER_EXTERNAL_STORAGE)
                {
                        String installedStorage;