appmgr: fix build on Tizen 5.0 13/188613/7
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 6 Sep 2018 12:48:17 +0000 (14:48 +0200)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 15 Nov 2018 12:37:19 +0000 (13:37 +0100)
Refactor code to use public privilege APIs
Change-Id: Iab287a87b57aab25e213da69aa154d1583b91f56

setting-appmgr/.cproject
setting-appmgr/.settings/org.eclipse.cdt.core.prefs
setting-appmgr/inc/setting-appmgr-pkginfo-utils.h
setting-appmgr/inc/setting-appmgr-utils.h
setting-appmgr/inc/setting-appmgr.h
setting-appmgr/src/setting-appmgr-pkginfo-utils.c
setting-appmgr/src/setting-appmgr-pkginfo.c
setting-appmgr/src/setting-appmgr-runinfo.c
setting-appmgr/src/setting-appmgr-utils.c

index 09424348fea3f7e4ae3219f65eb56f1c9761dfba..d642a795bd02440d107d6874623b5898c7909bd6 100644 (file)
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
                                                                </option>
                                                                <option id="gnu.cpp.link.option.libs.371254988" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="setting-common"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pkgmgr-info"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="vconf"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="aul"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pkgmgr-client"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="security-privilege-manager"/>
+                                                                       <listOptionValue builtIn="false" value="setting-common"/>
+                                                                       <listOptionValue builtIn="false" value="vconf"/>
+                                                                       <listOptionValue builtIn="false" value="aul"/>
+                                                                       <listOptionValue builtIn="false" value="pkgmgr-client"/>
                                                                </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1207417503" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.release.497512744" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.release">
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.390868565" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                        <builder buildPath="${workspace_loc:/setting-appmgr}/Release" id="org.tizen.nativecore.target.sbi.gnu.builder.1451686306" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/>
-                                                       <tool command="ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.1252437672" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
+                                                       <tool command="i586-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.1252437672" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
                                                        <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1715316881" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
                                                                <option id="gnu.cpp.compiler.option.optimization.level.1043539898" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
                                                                <option defaultValue="gnu.cpp.compiler.debugging.level.none" id="sbi.gnu.cpp.compiler.option.debugging.level.core.731276312" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.1026173465" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.934785064" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-4.0-emulator.core_llvm40.i386"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-5.0-emulator.core_llvm40.i386"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1605278370" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.971161677" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" valueType="stringList">
                                                                        <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
                                                                <option defaultValue="gnu.c.debugging.level.none" id="sbi.gnu.c.compiler.option.debugging.level.core.158559396" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.1364549398" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.c.compiler.option.788813465" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-4.0-emulator.core_llvm40.i386"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-5.0-emulator.core_llvm40.i386"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.765076546" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.300650064" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" valueType="stringList">
                                                                        <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-Xlinker --version-script=&quot;${PROJ_PATH}/.exportMap&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/>
                                                                </option>
                                                                <option id="gnu.cpp.link.option.paths.1363258407" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
                                                                </option>
+                                                               <option id="gnu.cpp.link.option.libs.251848276" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
+                                                                       <listOptionValue builtIn="false" value="setting-common"/>
+                                                                       <listOptionValue builtIn="false" value="vconf"/>
+                                                                       <listOptionValue builtIn="false" value="aul"/>
+                                                                       <listOptionValue builtIn="false" value="pkgmgr-client"/>
+                                                               </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1792813598" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
index 2d95b570ee58f11817f5f5c5c425a883692ca093..28b8addc588e14814a58724329ff105f7e24ef5b 100644 (file)
@@ -7,7 +7,7 @@ environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/EF
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/EFL_LIB_PATH/value=${SDK_PATH}/platforms/tizen-5.0/common/efl-tool/efl-tools/lib
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/RS_LIBRARIES/delimiter=\:
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/RS_LIBRARIES/operation=replace
-environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/RS_LIBRARIES/value=-laccounts-svc -lanl -lappcore-agent -lasp -lbadge -lbase-utils-i18n -lBrokenLocale -lbundle -lcairo -lcalendar-service2 -lcapi-appfw-alarm -lcapi-appfw-app-common -lcapi-appfw-app-control -lcapi-appfw-application -lcapi-appfw-app-manager -lcapi-appfw-event -lcapi-appfw-job-scheduler -lcapi-appfw-package-manager -lcapi-appfw-preference -lcapi-appfw-widget-application -lcapi-base-common -lcapi-content-media-content -lcapi-content-mime-type -lcapi-context-motion -lcapi-context -lcapi-geofence-manager -lcapi-location-manager -lcapi-maps-service -lcapi-media-audio-io -lcapi-media-camera -lcapi-media-codec -lcapi-media-controller -lcapi-mediademuxer -lcapi-media-image-util -lcapi-media-metadata-editor -lcapi-media-metadata-extractor -lcapi-mediamuxer -lcapi-media-player -lcapi-media-radio -lcapi-media-recorder -lcapi-media-screen-mirroring -lcapi-media-sound-manager -lcapi-media-sound-pool -lcapi-media-streamer -lcapi-media-streamrecorder -lcapi-media-thumbnail-util -lcapi-media-tone-player -lcapi-media-tool -lcapi-media-video-util -lcapi-media-vision -lcapi-media-wav-player -lcapi-messaging-email -lcapi-messaging-messages -lcapi-network-bluetooth -lcapi-network-connection -lcapi-network-http -lcapi-network-mtp -lcapi-network-nfc -lcapi-network-smartcard -lcapi-network-stc -lcapi-network-wifi-manager -lcapi-network-wifi -lcapi-privacy-privilege-manager -lcapi-system-device -lcapi-system-info -lcapi-system-media-key -lcapi-system-runtime-info -lcapi-system-sensor -lcapi-system-system-settings -lcapi-system-usbhost -lcapi-telephony -lcapi-ui-efl-util -lcapi-ui-inputmethod-manager -lcapi-ui-inputmethod -lcapi-vpnsvc -lcapi-web-url-download -lchromium-ewk -lcidn -lcontacts-service2 -lcore-sync-client -lcrypto -lcrypt -lc -lcsr-client -lcurl -ldali-adaptor -ldali-core -ldali-toolkit -ldata-control -ldlog -ldl -ldpm -lecore_buffer -lecore_con -lecore_evas -lecore_file -lecore_imf_evas -lecore_imf -lecore_input_evas -lecore_input -lecore_ipc -lecore -ledbus -ledje -leet -lefl-extension -lefreet_mime -lefreet -lefreet_trash -leina -leio -leldbus -lelementary -lembryo -leom -leo -lethumb_client -lethumb -levas -lexif -lfeedback -lfido-client -lfontconfig -lfreetype -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lharfbuzz-icu -lharfbuzz -liotcon -ljson-glib-1.0 -lkey-manager-client -lmessage-port -lminizip -lm -lnotification -lnsd-dns-sd -lnsd-ssdp -lnsl -lnss_compat -lnss_dns -lnss_files -lnss_hesiod -lnss_nisplus -lnss_nis -loauth2 -loauth -lopenal -lphonenumber-utils -lprivilege-info -lpthread -lpush -lresolv -lrt -lsqlite3 -lssl -lstorage -lstt_engine -lstt -ltbm -lteec -lthread_db -lttrace -ltts_engine -ltts -ltzsh_common -ltzsh_quickpanel -lutil -lvc-elm -lvc -lwidget_service -lwidget_viewer_dali -lwidget_viewer_evas -lwifi-direct -lxml2 -lyaca -lz
+environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/RS_LIBRARIES/value=-laccounts-svc -lanl -lappcore-agent -lasp -lbadge -lbase-utils-i18n -lBrokenLocale -lbundle -lcairo -lcalendar-service2 -lcapi-appfw-alarm -lcapi-appfw-app-common -lcapi-appfw-app-control -lcapi-appfw-application -lcapi-appfw-app-manager -lcapi-appfw-event -lcapi-appfw-job-scheduler -lcapi-appfw-package-manager -lcapi-appfw-preference -lcapi-appfw-widget-application -lcapi-base-common -lcapi-content-media-content -lcapi-content-mime-type -lcapi-context-motion -lcapi-context -lcapi-geofence-manager -lcapi-location-manager -lcapi-maps-service -lcapi-media-audio-io -lcapi-media-camera -lcapi-media-codec -lcapi-media-controller -lcapi-mediademuxer -lcapi-media-image-util -lcapi-media-metadata-editor -lcapi-media-metadata-extractor -lcapi-mediamuxer -lcapi-media-player -lcapi-media-radio -lcapi-media-recorder -lcapi-media-screen-mirroring -lcapi-media-sound-manager -lcapi-media-sound-pool -lcapi-media-streamer -lcapi-media-streamrecorder -lcapi-media-thumbnail-util -lcapi-media-tone-player -lcapi-media-tool -lcapi-media-video-util -lcapi-media-vision -lcapi-media-wav-player -lcapi-messaging-email -lcapi-messaging-messages -lcapi-network-bluetooth -lcapi-network-connection -lcapi-network-http -lcapi-network-mtp -lcapi-network-nfc -lcapi-network-smartcard -lcapi-network-stc -lcapi-network-wifi-manager -lcapi-network-wifi -lcapi-privacy-privilege-manager -lcapi-system-device -lcapi-system-info -lcapi-system-media-key -lcapi-system-runtime-info -lcapi-system-sensor -lcapi-system-system-settings -lcapi-system-usbhost -lcapi-telephony -lcapi-ui-efl-util -lcapi-ui-inputmethod-manager -lcapi-ui-inputmethod -lcapi-vpnsvc -lcapi-web-url-download -lchromium-ewk -lcidn -lcontacts-service2 -lcore-sync-client -lcrypto -lcrypt -lc -lcsr-client -lcurl -ldali-adaptor -ldali-core -ldali-toolkit -ldata-control -ldlog -ldl -ldpm -lecore_buffer -lecore_con -lecore_evas -lecore_file -lecore_imf_evas -lecore_imf -lecore_input_evas -lecore_input -lecore_ipc -lecore -ledje -leet -lefl-extension -lefreet_mime -lefreet -lefreet_trash -leina -leio -lelementary -lembryo -leom -leo -lethumb_client -lethumb -levas -lexif -lfeedback -lfido-client -lfontconfig -lfreetype -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lharfbuzz-icu -lharfbuzz -liotcon -ljson-glib-1.0 -lkey-manager-client -lmessage-port -lminizip -lm -lnotification -lnsd-dns-sd -lnsd-ssdp -lnsl -lnss_compat -lnss_dns -lnss_files -lnss_hesiod -lnss_nisplus -lnss_nis -loauth2 -loauth -lopenal -lphonenumber-utils -lprivilege-info -lpthread -lpush -lresolv -lrt -lsqlite3 -lssl -lstorage -lstt_engine -lstt -ltbm -lteec -lthread_db -lttrace -ltts_engine -ltts -ltzsh_common -ltzsh_quickpanel -lutil -lvc-elm -lvc -lwidget_service -lwidget_viewer_dali -lwidget_viewer_evas -lwifi-direct -lxml2 -lyaca -lz
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/SBI_SYSROOT/delimiter=\:
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/SBI_SYSROOT/operation=replace
 environment/project/org.tizen.nativecore.config.sbi.gcc45.app.debug.488787282/SBI_SYSROOT/value=${SDK_PATH}/platforms/tizen-5.0/mobile/rootstraps/mobile-5.0-emulator.core.private.latest
index 9f35410b4fa9a54b9a72574dc48e593fb3053ac1..e93dc5bb988cbddcee9f98cebad5c31e72266442 100644 (file)
 #ifndef __SETTING_APPMGR_PKGINFO_UTILS_H__
 #define __SETTING_APPMGR_PKGINFO_UTILS_H__
 
-#include "setting-appmgr.h"
+#include <Eina.h>
 
-void appmgr_pkg_webapp(void *data, Evas_Object *obj, void *event_info);
+/**
+ * Handle to privilege group
+ */
+typedef struct _AppMgr_Privilege_Group AppMgr_Privilege_Group;
+
+/**
+ * Handle to privilege
+ */
+typedef struct _AppMgr_Privilege AppMgr_Privilege;
+
+/**
+ * @brief Gets Privilege human-readable group name.
+ * @return name.
+ */
+const char *appmgr_pkg_privilege_group_name_get(AppMgr_Privilege_Group *group);
+
+/**
+ * @brief Gets Privilege human-readable group description
+ * @return description.
+ */
+const char *appmgr_pkg_privilege_group_description_get(AppMgr_Privilege_Group *group);
+
+/**
+ * @brief Gets all Privileges contained in AppMgr_Privilege_Group.
+ */
+const Eina_Inarray *appmgr_pkg_privilege_group_privileges_array_get(const AppMgr_Privilege_Group *group);
+
+/**
+ * @brief Gets Privilege human-readable group name.
+ * @return name.
+ */
+const char *appmgr_pkg_privilege_name_get(AppMgr_Privilege *group);
+
+/**
+ * @brief Gets Privilege human-readable group description
+ * @return description.
+ */
+const char *appmgr_pkg_privilege_description_get(AppMgr_Privilege *group);
+
+/**
+ * @brief Gets all AppMgr_Privilege_Group as eina_inarray
+ *
+ * @param[in] pkg_id package id
+ * @return eina_inarray of AppMgr_Privilege_Group structures, NULL on error.
+ *
+ * @note the Eina_Inarry can be iterated with eina_inarray_foreach func.
+ * @note returnd value should be free with @appmgr_pkg_privilege_groups_array_free
+ */
+Eina_Inarray *appmgr_pkg_privilege_groups_array_get(const char *pkg_id);
+
+/**
+ * @brief Free data returned vt appmgr_pkg_privilege_groups_array_get
+ */
+void appmgr_pkg_privilege_groups_array_free(Eina_Inarray *array);
 
-int appmgr_pkg_get_privileges_iter(const char *privilege,
-               void *user_data);
-void appmgr_pkg_privilege_info_view(void *data, Evas_Object *obj,
-               void *event_info);
 #endif /*__SETTING_APPMGR_PKGINFO_UTILS_H__ */
index 2c79e431b95c132833a0a6893c7a9c76ec8058da..3fd5629ac9114e8c8af6365db08028efdd16077b 100644 (file)
@@ -64,4 +64,18 @@ bool appmgr_utils_SD_card_in_internal_mode(bool *in_internal_mode);
  */
 bool appmgr_utils_get_pkg_storage_type(const char *pkg_id, bool *internal);
 
+/**
+ * Gets "taskmanage" property value for given app d
+ *
+ * @param[in] app_id application id.
+ * @param[out] true if application is taskmanagable, false otherwise
+ *
+ * @return true if call was successful, false on error.
+ *
+ * @note the function is added because Tizen app_info API do not have
+ * app_info_is_taskmange function. Replace function calls when such API will be
+ * available.
+ */
+bool appmgr_utils_app_id_is_taskmanage(const char *app_id, bool *taskmange);
+
 #endif /*__SETTING_APPMGR_UTILS_H__ */
index a70d939683c4d9b8a9e56e53e2e121a2fb72062f..deb774e29214b353c0620cc0ac11f9ca7d9cc2f5 100644 (file)
@@ -61,6 +61,7 @@ typedef struct {
        bool is_default;
        package_info_h package_info;
        Eina_List *apps_in_package; /* [char *] data type */
+       Eina_Inarray *privilege_groups;
 } SettingAppMgr_PkgInfo;
 
 typedef struct {
index 704bb6081fc553a4c138421e46ecc95394038cf8..3bdb736c55450bbc0dfbddb587b9488770d8b54a 100644 (file)
  * limitations under the License.
  *
  */
-#include <appsvc.h>
-#include <app2ext_interface.h>
 
 #include <package_info.h>
-#include <privilege_info.h>
 #include <privilege_information.h>
 
 #include "setting-appmgr-utils.h"
 #include "setting-appmgr-pkginfo-utils.h"
 
-int appmgr_pkg_get_privileges_iter(const char *privilege,
-               void *user_data)
+#define API_VERSION "3.0"
+
+struct _AppMgr_Privilege_Group
+{
+       char *name;
+       char *description;
+       Eina_Inarray *privileges;
+};
+
+struct _AppMgr_Privilege
+{
+       char *name;
+       char *description;
+       char *id;
+};
+
+const char *appmgr_pkg_privilege_group_name_get(AppMgr_Privilege_Group *group)
+{
+       return group->name;
+}
+
+static char *_appmgr_pkg_privilege_group_description_build(AppMgr_Privilege_Group *group)
+{
+       bool is_first = true;
+       Eina_Strbuf *buf = eina_strbuf_new();
+       AppMgr_Privilege *p;
+
+       if (!buf) {
+               SETTING_TRACE_ERROR("eina_strbuf_new() failed.");
+               return NULL;
+       }
+
+       EINA_INARRAY_FOREACH(group->privileges, p) {
+               const char *name = appmgr_pkg_privilege_name_get(p);
+               if (!name) continue;
+
+               eina_strbuf_append(buf, name);
+
+               if (is_first) {
+                       is_first = false;
+               } else {
+                       eina_strbuf_append(buf, "\n");
+               }
+       }
+
+       char *ret = eina_strbuf_string_steal(buf);
+       eina_strbuf_free(buf);
+
+       return ret;
+}
+
+const char *appmgr_pkg_privilege_group_description_get(AppMgr_Privilege_Group *group)
+{
+       if (!group->description)
+               group->description = _appmgr_pkg_privilege_group_description_build(group);
+
+       return group->description;
+}
+
+const Eina_Inarray *appmgr_pkg_privilege_group_privileges_array_get(const AppMgr_Privilege_Group *group)
+{
+       return group->privileges;
+}
+
+static char *_appmgr_pkg_privilege_name_build(const char *privilege)
+{
+       char *ret = NULL;
+       int err = privilege_info_get_display_name(API_VERSION, privilege, &ret);
+       if (err != PRVINFO_ERROR_NONE) {
+               SETTING_TRACE_ERROR("privilege_info_get_display_name() Erro: (%s)",
+                               get_error_message(err));
+       }
+       return ret;
+}
+
+const char *appmgr_pkg_privilege_name_get(AppMgr_Privilege *privilege)
+{
+       if (!privilege->name)
+               privilege->name = _appmgr_pkg_privilege_name_build(privilege->id);
+
+       return privilege->name;
+}
+
+static char *_appmgr_pkg_privilege_description_build(const char *privilege)
+{
+       char *ret = NULL;
+       int err = privilege_info_get_description(API_VERSION, privilege, &ret);
+       if (err != PRVINFO_ERROR_NONE) {
+               SETTING_TRACE_ERROR("privilege_info_get_description() Erro: (%s)",
+                               get_error_message(err));
+       }
+       return ret;
+}
+
+const char *appmgr_pkg_privilege_description_get(AppMgr_Privilege *privilege)
+{
+       if (!privilege->description)
+               privilege->description = _appmgr_pkg_privilege_description_build(privilege->id);
+
+       return privilege->description;
+}
+
+static int _appmgr_group_search_cb(const void *data1, const void *data2)
 {
-       int ret;
-       gchar **str = user_data;
-       char *tmp = NULL;
-       char *name = NULL;
+       const char *name1 = data1;
+       AppMgr_Privilege_Group *group = (AppMgr_Privilege_Group*)data2;
+       const char *name2 = appmgr_pkg_privilege_group_name_get(group);
 
-       retv_if(!user_data, -1);
-       retv_if(!privilege, 0);
+       int res = strcmp(name1, name2);
+       return res > 0 ? 1 : res < 0 ? -1 : 0;
+}
+
+static int _appmgr_group_compare_cb(const void *data1, const void *data2)
+{
+       AppMgr_Privilege_Group *group1 = (AppMgr_Privilege_Group*)data1;
+       AppMgr_Privilege_Group *group2 = (AppMgr_Privilege_Group*)data2;
+
+       const char *name1 = appmgr_pkg_privilege_group_name_get(group1);
+       const char *name2 = appmgr_pkg_privilege_group_name_get(group2);
+
+       int res = strcmp(name1, name2);
+       return res > 0 ? 1 : res < 0 ? -1 : 0;
+}
+
+static bool _appmgr_package_info_foreach_privilege_cb(const char *privilege_name, void *user_data)
+{
+       Eina_Inarray *groups = user_data;
+       AppMgr_Privilege_Group *group;
+       AppMgr_Privilege privilege;
+       char *group_name;
+       int err;
+
+       err = privilege_info_get_privacy_display_name(privilege_name, &group_name);
+       if (err != PRVINFO_ERROR_NONE) {
+               SETTING_TRACE_ERROR("privilege_info_get_privacy_display_name() failed: %s",
+                               get_error_message(err));
+               return NULL;
+       }
+
+       int idx = eina_inarray_search_sorted(groups, group_name, _appmgr_group_search_cb);
+
+       if (idx == -1) {
+               AppMgr_Privilege_Group added_group;
+               added_group.name = strdup(group_name);
+               added_group.privileges = eina_inarray_new(sizeof(AppMgr_Privilege), 4);
+               added_group.description = NULL;
+               idx = eina_inarray_insert_sorted(groups, &added_group, _appmgr_group_compare_cb);
+               if (idx == -1) {
+                       SETTING_TRACE_ERROR("eina_inarray_insert_sorted () failed.");
+               }
+       }
+
+       group = eina_inarray_nth(groups, idx);
+
+       privilege.id = strdup(privilege_name);
+       privilege.name = NULL;
+       privilege.description = NULL;
+
+       idx = eina_inarray_push(group->privileges, &privilege);
+
+       if (idx == -1) {
+               SETTING_TRACE_ERROR("eina_inarray_insert_sorted () failed.");
+       }
+
+       free(group_name);
+
+       return true;
+}
+
+Eina_Inarray *appmgr_pkg_privilege_groups_array_get(const char *pkg_id)
+{
+       int err;
+       package_info_h handle;
+
+       err = package_manager_get_package_info(pkg_id, &handle);
+       if (err != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR("package_manager_get_package_info () failed: %s",
+                               get_error_message(err));
+               return NULL;
+       }
+
+       Eina_Inarray *ret = eina_inarray_new(sizeof(AppMgr_Privilege_Group), 4);
+
+       if (!ret) {
+               package_info_destroy(handle);
+               SETTING_TRACE_ERROR("eina_inarray_new() failed.");
+               return NULL;
+       }
+
+       err = package_info_foreach_privilege_info(handle, _appmgr_package_info_foreach_privilege_cb, ret);
+       if (err != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR("package_info_foreach_privilege_info() failed: %s",
+                               get_error_message(err));
+       }
+
+       package_info_destroy(handle);
+       return ret;
+}
+
+static void _appmgr_pkg_privilege_free(AppMgr_Privilege *privilege)
+{
+       free(privilege->name);
+       free(privilege->id);
+       free(privilege->description);
+}
+
+static void _appmgr_pkg_privilege_group_free(AppMgr_Privilege_Group *group)
+{
+       AppMgr_Privilege *priv;
+       free(group->name);
+       free(group->description);
+
+       EINA_INARRAY_FOREACH(group->privileges, priv) {
+               _appmgr_pkg_privilege_free(priv);
+       }
+       eina_inarray_free(group->privileges);
+}
+
+void appmgr_pkg_privilege_groups_array_free(Eina_Inarray *array)
+{
+       AppMgr_Privilege_Group *group;
 
-       ret = privilege_info_get_display_name("3.0", privilege, &name);
-       if (PRVINFO_ERROR_NONE != ret || !name) {
-               SETTING_TRACE_ERROR(
-                               "privilege_info_get_display_name() Fail(%d)",
-                               ret);
-               return 0;
+       EINA_INARRAY_FOREACH(array, group) {
+               _appmgr_pkg_privilege_group_free(group);
        }
 
-       tmp = g_strconcat(*str, name, "<br>", NULL);
-       g_free(*str);
-       free(name);
-       *str = tmp;
-       return 0;
+       eina_inarray_free(array);
 }
index dfde2cd4a6b9afc021b2de99812d248e222cba34..62e561b6c2cd3aac417fb3df694f35ea1ee6541f 100644 (file)
  * limitations under the License.
  *
  */
-#include <appsvc.h>
 #include <aul_svc.h>
 #include <package_manager.h>
-#include <privilege_info.h>
-#include <pkgmgr-info.h>
-#include <privilege_information.h>
 #include <efl_extension.h>
 
 #include "setting-appmgr-utils.h"
 
 setting_view setting_view_appmgr_pkginfo;
 
-typedef struct {
-       char *name;
-       char *explanation;
-} privilege_detail_t;
-
 /* Package and App manager related functions: */
 static void _size_info_receive_cb(const char *package_id,
                        const package_size_info_h size_info, void *user_data);
@@ -46,8 +37,8 @@ static bool _supports_disable_filter_cb(package_info_h package_info,
 static bool _is_disabled_filter_cb(package_info_h package_info,
                                        void *user_data);
 static int _default_apps_cb(const char* appid, void *data);
-static int _get_privileges_grp_iter(const char *grp, void *user_data);
-static int _get_privilege_detail_cb(const char *privilege, void *user_data);
+static Eina_Bool _get_privileges_grp_iter(const void *container, void *data, void *user_data);
+static Eina_Bool _get_privilege_detail_cb(const void *container, void *data, void *user_data);
 static void _package_move_finished(int id, const char *type,
                const char *package, package_manager_event_type_e event_type,
                package_manager_event_state_e event_state, int progress,
@@ -88,7 +79,6 @@ static char *_cache_size_text_get(void *data, Evas_Object *obj,
                                        const char *part);
 static char *_privilige_detail_text_get(void *data, Evas_Object *obj,
                                                const char *part);
-static void _privilige_detail_del(void *data, Evas_Object *genlist);
 
 /* UI callbacks */
 static void _force_close_cb(void *data, Evas_Object *button, void *event_info);
@@ -232,27 +222,18 @@ static void _pkginfo_append_default(SettingAppMgr *ad)
 
 static void _pkginfo_append_privilege(SettingAppMgr *ad)
 {
-       int ret = 0;
-       SettingAppMgr_PkgInfo *pkg = NULL;
+       SettingAppMgr_PkgInfo *pkg = &ad->selected_pkg;
 
-       ret_if(!ad);
+       if (eina_inarray_count(pkg->privilege_groups) == 0) {
+               SETTING_TRACE_DEBUG("No privilege");
+               return;
+       }
 
-       pkg = &ad->selected_pkg;
        ad->prv_group_item = setting_create_Gendial_field_titleItem(
                                ad->package_info_gl, &ad->itc_grp_title,
                                _("IDS_ST_HEADER_PRIVILEGES"), NULL);
 
-       /* Deprecated API */
-       ret = privilege_info_foreach_privilege_group_list_by_pkgid(pkg->id,
-                                               _get_privileges_grp_iter, ad);
-       warn_if(PRVMGR_ERR_NONE != ret,
-       "privilege_info_foreach_privilege_group_list_by_pkgid() Fail(%d)", ret);
-
-       if (!ad->first_prv) {
-               SETTING_TRACE_DEBUG("No privilege");
-               if (ad->prv_group_item)
-                       elm_object_item_del(ad->prv_group_item->item);
-       }
+       eina_inarray_foreach(pkg->privilege_groups, _get_privileges_grp_iter, ad);
 }
 
 static void _pkginfo_append_genlist(SettingAppMgr *ad)
@@ -309,7 +290,6 @@ static int _view_create(void *data)
        itc_cache_size_item.func.text_get = _cache_size_text_get;
        itc_privilege_detail.item_style = "multiline";
        itc_privilege_detail.func.text_get = _privilige_detail_text_get;
-       itc_privilege_detail.func.del = _privilige_detail_del;
 
        ret = package_info_create(ad->selected_pkg.id,
                                        &ad->selected_pkg.package_info);
@@ -393,6 +373,9 @@ static int _view_destroy(void *data)
 
        setting_view_appmgr_pkginfo.is_create = 0;
 
+       appmgr_pkg_privilege_groups_array_free(ad->selected_pkg.privilege_groups);
+       ad->selected_pkg.privilege_groups = NULL;
+
        return SETTING_RETURN_SUCCESS;
 }
 
@@ -471,41 +454,18 @@ static int _view_cleanup(void *data)
 static bool _app_in_package_info_cb(package_info_app_component_type_e comp_type,
                                        const char *app_id, void *user_data)
 {
-       int ret = 0;
        SettingAppMgr_PkgInfo *pkg = user_data;
-       pkgmgrinfo_appinfo_h handle = NULL;
-       bool autorestart_flag = false;
        bool taskmanage_flag = false;
 
        retv_if(!pkg, true);
 
-       ret = pkgmgrinfo_appinfo_get_appinfo(app_id, &handle);
-       if (PMINFO_R_OK != ret) {
-               SETTING_TRACE_ERROR("pkgmgrinfo_appinfo_get_appinfo()"\
-                               "Fail(%s) for %s",
-                               get_error_message(ret),
-                               app_id);
-               return true;
-       }
-       ret = pkgmgrinfo_appinfo_is_autorestart(handle, &autorestart_flag);
-       if (PMINFO_R_OK != ret) {
-               SETTING_TRACE_ERROR(
-               "pkgmgrinfo_appinfo_is_autorestart()Fail(%s) for %s",
-               get_error_message(ret), app_id);
-               pkgmgrinfo_appinfo_destroy_appinfo(handle);
-               return true;
-       }
-       ret = pkgmgrinfo_appinfo_is_taskmanage(handle, &taskmanage_flag);
-       if (PMINFO_R_OK != ret) {
+       if (!appmgr_utils_app_id_is_taskmanage(app_id, &taskmanage_flag)) {
                SETTING_TRACE_ERROR(
-               "pkgmgrinfo_appinfo_is_taskmanage()Fail(%s) for %s",
-               get_error_message(ret), app_id);
-               pkgmgrinfo_appinfo_destroy_appinfo(handle);
+               "appmgr_utils_app_id_is_taskmanage ()Fail for %s", app_id);
                return true;
        }
-       pkgmgrinfo_appinfo_destroy_appinfo(handle);
 
-       if (!autorestart_flag && taskmanage_flag)
+       if (taskmanage_flag)
                pkg->apps_in_package = eina_list_append(pkg->apps_in_package,
                                                strdup(app_id));
        return true;
@@ -583,6 +543,12 @@ static int _get_package_information(SettingAppMgr *ad)
                goto finish;
        }
 
+       pkg->privilege_groups = appmgr_pkg_privilege_groups_array_get(pkg->id);
+       if (!pkg->privilege_groups) {
+               SETTING_TRACE_ERROR("appmgr_pkg_privilege_groups_array_get() failed");
+               success = false;
+               goto finish;
+       }
        /*
        ret = package_info_get_installed_storage(pkg->package_info, &storage);
        if (PACKAGE_MANAGER_ERROR_NONE != ret) {
@@ -759,58 +725,25 @@ static int _default_apps_cb(const char *appid, void *data)
        return 0;
 }
 
-static int _get_privileges_grp_iter(const char *grp, void *user_data)
+static Eina_Bool _get_privileges_grp_iter(const void *container, void *data, void *user_data)
 {
-       int ret = 0;
-       char *grp_name = NULL;
-       gchar *prv_desc = NULL;
        SettingAppMgr *ad = user_data;
-       SettingAppMgr_PkgInfo *pkg = NULL;
-
-       retv_if(!user_data, -1);
-
-       pkg = &ad->selected_pkg;
-       /*Deprecated API */
-       ret = privilege_info_get_privilege_group_display_name(grp, &grp_name);
-       if (PRVMGR_ERR_NONE != ret) {
-               SETTING_TRACE_ERROR(
-                               "privilege_info_get_privilege_group_display_"\
-                               "name() Fail(%d)",
-                               ret);
-               return 0;
-       }
-
-       prv_desc = g_strdup("");
-       if (prv_desc == NULL) {
-               SETTING_TRACE_ERROR("Fail to get prv_desc by g_strdup()");
-               free(grp_name);
-               return 0;
-       }
+       AppMgr_Privilege_Group *group = data;
 
-       /*Deprecated API */
-       ret =
-       privilege_info_foreach_privilege_list_by_pkgid_and_privilege_group(
-               pkg->id, grp, appmgr_pkg_get_privileges_iter, &prv_desc);
+       retv_if(!ad, EINA_FALSE);
+       retv_if(!group, EINA_FALSE);
 
-       if (PRVMGR_ERR_NONE != ret || '\0' == *prv_desc) {
-               SETTING_TRACE_ERROR(
-                               "privilege_info_foreach_privilege_list_by_"\
-                               "pkgid_and_privilege_group()"
-                               " Fail(%d), prv_desc(%p)", ret, prv_desc);
-               G_FREE(prv_desc);
-               free(grp_name);
-               return 0;
-       }
-
-       /* remove the last <br> */
-       char *p = strrchr(prv_desc, '<');
-       if (p)
-               *p = '\0';
        ad->last_prv = setting_create_Gendial_field_def(ad->package_info_gl,
                        &ad->itc_1txt_1ic_2,
-                       _privilege_item_click_cb, (void *)grp,
-                       SWALLOW_Type_INVALID, NULL,
-                       NULL, 0, grp_name, prv_desc, NULL);
+                       _privilege_item_click_cb,
+                       (void *)group,
+                       SWALLOW_Type_INVALID,
+                       NULL,
+                       NULL,
+                       0,
+                       appmgr_pkg_privilege_group_name_get(group),
+                       appmgr_pkg_privilege_group_description_get(group),
+                       NULL);
        if (ad->last_prv) {
                ad->last_prv->userdata = ad;
 
@@ -818,55 +751,23 @@ static int _get_privileges_grp_iter(const char *grp, void *user_data)
                        ad->first_prv = ad->last_prv;
        }
 
-       free(grp_name);
-       G_FREE(prv_desc);
-
-       return 0;
+       return EINA_TRUE;
 }
 
-static int _get_privilege_detail_cb(const char *privilege, void *user_data)
+static Eina_Bool _get_privilege_detail_cb(const void *container, void *data, void *user_data)
 {
        SETTING_TRACE_BEGIN;
-       int ret = 0;
        SettingAppMgr *ad = user_data;
-       privilege_detail_t *privilege_data = NULL;
+       AppMgr_Privilege *privilege = data;
 
-       retv_if(NULL == user_data, -1);
-       retv_if(NULL == privilege, 0);
-
-       privilege_data = calloc(1, sizeof(privilege_detail_t));
-
-       if (!privilege_data) {
-               SETTING_TRACE_ERROR("memory allocation failure");
-               abort();
-               return 0;
-       }
-
-       ret = privilege_info_get_display_name("3.0", privilege,
-                                               &privilege_data->name);
-       if (PRVINFO_ERROR_NONE != ret) {
-               SETTING_TRACE_ERROR(
-                               "privilege_info_get_display_name() Fail(%s)",
-                               get_error_message(ret));
-               free(privilege_data);
-               return 0;
-       }
-
-       ret = privilege_info_get_description("3.0", privilege,
-                                               &privilege_data->explanation);
-       if (PRVINFO_ERROR_NONE != ret) {
-               SETTING_TRACE_ERROR("privilege_info_get_description() Fail(%d)",
-                               get_error_message(ret));
-               free(privilege_data->name);
-               free(privilege_data);
-               return 0;
-       }
+       retv_if(NULL == user_data, EINA_FALSE);
+       retv_if(NULL == privilege, EINA_FALSE);
 
        Elm_Object_Item *it = elm_genlist_item_append(ad->privilege_detail_gl, &itc_privilege_detail,
-                               privilege_data, NULL, ELM_GENLIST_ITEM_NONE,
+                               privilege, NULL, ELM_GENLIST_ITEM_NONE,
                                NULL, NULL);
        elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_NONE);
-       return 0;
+       return EINA_TRUE;
 }
 
 __attribute__((unused))
@@ -1223,30 +1124,19 @@ static char *_cache_size_text_get(void *data, Evas_Object *obj,
 static char *_privilige_detail_text_get(void *data, Evas_Object *obj,
                                                const char *part)
 {
-       privilege_detail_t *privilege_data = data;
+       AppMgr_Privilege *privilege_data = data;
 
        if (!privilege_data)
                return NULL;
 
        if (!strcmp("elm.text", part))
-               return SAFE_STRDUP(privilege_data->name);
+               return SAFE_STRDUP(appmgr_pkg_privilege_name_get(privilege_data));
        if (!strcmp("elm.text.multiline", part))
-               return SAFE_STRDUP(privilege_data->explanation);
+               return SAFE_STRDUP(appmgr_pkg_privilege_description_get(privilege_data));
 
        return NULL;
 }
 
-static void _privilige_detail_del(void *data, Evas_Object *genlist)
-{
-       privilege_detail_t *privilege_data = data;
-
-       if (privilege_data) {
-               free(privilege_data->name);
-               free(privilege_data->explanation);
-       }
-       free(privilege_data);
-}
-
 /* UI callbacks */
 
 static void _force_close_cb(void *data, Evas_Object *button, void *event_info)
@@ -1463,11 +1353,11 @@ static void _privilege_item_click_cb(void *data, Evas_Object *genlist,
 {
        SETTING_TRACE_BEGIN;
 
-       char *grp = data;
+       AppMgr_Privilege_Group *group = data;
        SettingAppMgr *ad = NULL;
-       char *grp_name = NULL;
        Setting_GenGroupItem_Data *d_item = NULL;
        Elm_Object_Item *item = event_info;
+       const Eina_Inarray *privileges;
 
        ret_if(data == NULL);
        ret_if(event_info == NULL);
@@ -1479,20 +1369,18 @@ static void _privilege_item_click_cb(void *data, Evas_Object *genlist,
 
        ad = d_item->userdata;
 
-       /* Deprecated API */
-       privilege_info_get_privilege_group_display_name(grp, &grp_name);
-
-       setting_create_genlist_and_push_to_naviframe(grp_name, NULL,
+       setting_create_genlist_and_push_to_naviframe(
+                       (char*)appmgr_pkg_privilege_group_name_get(group),
+                       NULL,
                        _privilege_detail_pop_cb,
                        ad, &ad->privilege_detail_gl,
                        ad->md.naviframe);
-       free(grp_name);
 
        elm_genlist_mode_set(ad->privilege_detail_gl, ELM_LIST_COMPRESS);
        elm_genlist_homogeneous_set(ad->privilege_detail_gl, EINA_FALSE);
-       /* Deprecated API */
-       privilege_info_foreach_privilege_list_by_pkgid_and_privilege_group(
-                       ad->selected_pkg.id, grp, _get_privilege_detail_cb, ad);
+
+       privileges = appmgr_pkg_privilege_group_privileges_array_get(group);
+       eina_inarray_foreach(privileges, _get_privilege_detail_cb, ad);
 }
 
 static void _clear_default_cb(void *data, Evas_Object *obj, void *event_info)
index 342f658360f2e7fbea0daf0c880d28b6f5b55e54..17d77ceec9abbbe2056c04fc182fd88bc347548d 100644 (file)
@@ -17,7 +17,6 @@
  *
  */
 #include <app_manager.h>
-#include <pkgmgr-info.h>
 #include "setting-appmgr-utils.h"
 #include "setting-appmgr-runinfo.h"
 
@@ -386,9 +385,7 @@ Evas_Object *appmgr_run_gl_stop_btn_content_get(void *data, Evas_Object *obj,
        Evas_Object *btn = NULL;
        SettingAppMgr *ad = data;
        app_t *sibling = NULL;
-       pkgmgrinfo_appinfo_h sibling_handle = NULL;
        bool running_flag = false;
-       bool autorestart_flag = false;
        bool taskmanage_flag = false;
 
        retv_if(!data, NULL);
@@ -413,39 +410,14 @@ Evas_Object *appmgr_run_gl_stop_btn_content_get(void *data, Evas_Object *obj,
                        sibling) {
                if (!sibling)
                        continue;
-               sibling_handle = NULL;
-               autorestart_flag  = false;
-               ret = pkgmgrinfo_appinfo_get_appinfo(sibling->id,
-                                                       &sibling_handle);
-               if (PMINFO_R_OK != ret) {
-                       SETTING_TRACE_ERROR("pkgmgrinfo_appinfo_get_appinfo()"\
-                                       "Fail(%s) for %s",
-                                       get_error_message(ret),
-                                       sibling->label);
-                       continue;
-               }
 
-               ret = pkgmgrinfo_appinfo_is_autorestart(sibling_handle,
-                                                       &autorestart_flag);
-               if (PMINFO_R_OK != ret) {
-                       SETTING_TRACE_ERROR(
-                       "pkgmgrinfo_appinfo_is_autorestart()Fail(%s) for %s",
-                       get_error_message(ret), sibling->label);
-                       pkgmgrinfo_appinfo_destroy_appinfo(sibling_handle);
-                       continue;
-               }
-               ret = pkgmgrinfo_appinfo_is_taskmanage(sibling_handle,
-                                               &taskmanage_flag);
-               if (PMINFO_R_OK != ret) {
+               if (!appmgr_utils_app_id_is_taskmanage(sibling->id, &taskmanage_flag)) {
                        SETTING_TRACE_ERROR(
-                       "pkgmgrinfo_appinfo_is_taskmanage()Fail(%s) for %s",
-                       get_error_message(ret), sibling->label);
-                       pkgmgrinfo_appinfo_destroy_appinfo(sibling_handle);
+                       "appmgr_utils_app_id_is_taskmanage() Fail for %s", sibling->label);
                        continue;
                }
-               pkgmgrinfo_appinfo_destroy_appinfo(sibling_handle);
                /* We won't be able to kill it anyway: */
-               if (autorestart_flag || !taskmanage_flag)
+               if (!taskmanage_flag)
                        continue;
                ret = app_manager_is_running(sibling->id, &running_flag);
                if (APP_MANAGER_ERROR_NONE != ret)
index 0a53b3a0b9ce3c8ec51c6477781c92561da2e03e..fdced8cd98e13734d2809532ed18a611d1ae1bae 100644 (file)
@@ -1,8 +1,6 @@
 /*
  * setting
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
+ * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -20,7 +18,6 @@
 #include <app_manager.h>
 #include <package_manager.h>
 #include <runtime_info.h>
-#include <pkgmgr-info.h>
 #include "setting-appmgr-main.h"
 #include "setting-appmgr-runinfo.h"
 #include "setting-appmgr-pkginfo-utils.h"
@@ -116,9 +113,7 @@ int get_process_ram_usage_mb(app_info_h handle)
                SETTING_TRACE_DEBUG("app_manager_get_app_context(%s) %s",
                                app_id, get_error_message(ret));
                free(app_id);
-               return 0;
-       }
-       /* get running app pid */
+               return 0; } /* get running app pid */
        ret = app_context_get_pid(app_context, &pid);
        if (ret == APP_MANAGER_ERROR_NONE) {
                ret = runtime_info_get_process_memory_info(
@@ -295,7 +290,7 @@ void appmgr_utils_update_package_node(package_node *node,
                                        package_info_h package_info)
 {
        char *main_app_id = NULL;
-       pkgmgrinfo_pkginfo_h internal_api_handle = NULL;
+       package_info_h internal_api_handle = NULL;
        int ret = 0;
        ret_if(!node);
 
@@ -309,15 +304,16 @@ void appmgr_utils_update_package_node(package_node *node,
                free(node->icon_path);
                node->icon_path = NULL;
                /* try harder(internal API): */
-               ret = pkgmgrinfo_pkginfo_get_pkginfo(node->pkgid,
+               ret = package_manager_get_package_info(node->pkgid,
                                                        &internal_api_handle);
-               if (PMINFO_R_OK == ret) {
-                       ret = pkgmgrinfo_pkginfo_get_mainappid(
+               if (PACKAGE_MANAGER_ERROR_NONE == ret) {
+                       ret = package_info_get_main_app_id(
                                        internal_api_handle, &main_app_id);
 
-                       if (PMINFO_R_OK == ret)
+                       if (PACKAGE_MANAGER_ERROR_NONE == ret)
                                        node->icon_path = get_application_default_icon(main_app_id);
-                       pkgmgrinfo_pkginfo_destroy_pkginfo(internal_api_handle);
+                       free(main_app_id);
+                       package_info_destroy(internal_api_handle);
                }
        }
 
@@ -502,31 +498,81 @@ bool appmgr_utils_SD_card_in_internal_mode(bool *in_internal_mode)
 
 bool appmgr_utils_get_pkg_storage_type(const char *pkg_id, bool *internal)
 {
-       int ret = PMINFO_R_OK;
-       pkgmgrinfo_installed_storage storage;
-       pkgmgrinfo_pkginfo_h internal_api_handle = NULL;
+       int ret;
+       package_info_installed_storage_type_e storage;
+       package_info_h handle = NULL;
 
        if (!internal)
                return false;
 
-       ret = pkgmgrinfo_pkginfo_get_pkginfo(pkg_id, &internal_api_handle);
+       ret = package_manager_get_package_info(pkg_id, &handle);
 
-       if (PMINFO_R_OK != ret) {
-               SETTING_TRACE_ERROR("pkgmgrinfo_pkginfo_get_pkginfo(): %s",
+       if (PACKAGE_MANAGER_ERROR_NONE != ret) {
+               SETTING_TRACE_ERROR("package_manager_get_package_info(): %s",
                                                        get_error_message(ret));
                return false;
        }
-       ret = pkgmgrinfo_pkginfo_get_installed_storage(internal_api_handle,
-                                                                                                       &storage);
-       if (PMINFO_R_OK != ret) {
-               SETTING_TRACE_ERROR("pkgmgrinfo_pkginfo_get_installed_storage(): %s",
+       ret = package_info_get_installed_storage(handle, &storage);
+       if (PACKAGE_MANAGER_ERROR_NONE != ret) {
+               SETTING_TRACE_ERROR("package_info_get_installed_storage(): %s",
                                                        get_error_message(ret));
-               pkgmgrinfo_pkginfo_destroy_pkginfo(internal_api_handle);
+               package_info_destroy(handle);
+               return false;
+       }
+
+       package_info_destroy(handle);
+       *internal = (PACKAGE_INFO_INTERNAL_STORAGE == storage);
+
+       return true;
+}
+
+static bool _foreach_filtered_appinfo_cb(app_info_h app_info, void *user_data)
+{
+       bool *is_taskmange = user_data;
+       *is_taskmange = true;
+       return false;
+}
+
+bool appmgr_utils_app_id_is_taskmanage(const char *appid, bool *taskmanage)
+{
+       app_info_filter_h filter;
+       bool is_taskmanage = false;
+       int ret;
+
+       ret = app_info_filter_create(&filter);
+       if (ret != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR(
+               "app_info_filter_create failed:%s", get_error_message(ret));
                return false;
        }
 
-       pkgmgrinfo_pkginfo_destroy_pkginfo(internal_api_handle);
-       *internal = (PMINFO_INTERNAL_STORAGE == storage);
+       ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_ID, appid);
+       if (ret != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR(
+               "app_info_filter_add_string failed:%s", get_error_message(ret));
+               app_info_filter_destroy(filter);
+               return false;
+       }
+
+       ret = app_info_filter_add_bool(filter, PACKAGE_INFO_PROP_APP_TASKMANAGE, true);
+       if (ret != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR(
+               "app_info_filter_add_string failed:%s", get_error_message(ret));
+               app_info_filter_destroy(filter);
+               return false;
+       }
+
+       ret = app_info_filter_foreach_appinfo(filter, _foreach_filtered_appinfo_cb, &is_taskmanage);
+       if (ret != PACKAGE_MANAGER_ERROR_NONE) {
+               SETTING_TRACE_ERROR(
+               "app_info_filter_foreach_appinfo failed:%s", get_error_message(ret));
+               app_info_filter_destroy(filter);
+               return false;
+       }
+
+       app_info_filter_destroy(filter);
+
+       if (taskmanage) *taskmanage = is_taskmanage;
 
        return true;
 }