Change-Id: I44b063885698d6fc5db9d76e3e29f40080b94eac
#MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
INCLUDE(FindPkgConfig)
#MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs_common REQUIRED dlog glib-2.0 aul libssl pkgmgr)
+pkg_check_modules(pkgs_common REQUIRED dlog glib-2.0 aul libssl pkgmgr pkgmgr-info)
MESSAGE("${LIB_NAME} ld flag : ${pkgs_common_LDFLAGS}")
MESSAGE("${LIB_NAME} ld flag : ${pkgs_common_LDFLAGS}")
/* SLP library header */
#include "package-manager.h"
/* SLP library header */
#include "package-manager.h"
+#include "pkgmgr-info.h"
#include "aul.h"
/* local header */
#include "aul.h"
/* local header */
ByteArray result;
int ret = 0;
pkgmgr_certinfo_h handle = NULL;
ByteArray result;
int ret = 0;
pkgmgr_certinfo_h handle = NULL;
+ pkgmgrinfo_appinfo_h handle_appinfo;
+ char *pkgid = NULL;
+ if(pkgmgrinfo_appinfo_get_appinfo(packageName, &handle_appinfo) != PMINFO_R_OK)
+ {
+ SCARD_DEBUG_ERR("pkgmgrinfo_appinfo_get_appinfo fail");
+ return result;
+ }
+
+ if(pkgmgrinfo_appinfo_get_pkgid(handle_appinfo, &pkgid) != PMINFO_R_OK)
+ {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle_appinfo);
+ SCARD_DEBUG_ERR("pkgmgrinfo_appinfo_get_pkgid fail");
+ return result;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle_appinfo);
- SCARD_DEBUG("package name : %s", packageName);
+ SCARD_DEBUG("package name : %s", pkgid);
if ((ret = pkgmgr_pkginfo_create_certinfo(&handle)) == 0)
{
if ((ret = pkgmgr_pkginfo_create_certinfo(&handle)) == 0)
{
- if ((ret = pkgmgr_pkginfo_load_certinfo(packageName, handle)) == 0)
+ if ((ret = pkgmgr_pkginfo_load_certinfo(pkgid, handle)) == 0)
bool result = false;
int ret = 0;
pkgmgr_certinfo_h handle = NULL;
bool result = false;
int ret = 0;
pkgmgr_certinfo_h handle = NULL;
+ pkgmgrinfo_appinfo_h handle_appinfo;
+ char *pkgid = NULL;
+
+ if(pkgmgrinfo_appinfo_get_appinfo(packageName, &handle_appinfo) != PMINFO_R_OK)
+ {
+ SCARD_DEBUG_ERR("pkgmgrinfo_appinfo_get_appinfo fail");
+ return result;
+ }
+
+ if(pkgmgrinfo_appinfo_get_pkgid(handle_appinfo, &pkgid) != PMINFO_R_OK)
+ {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle_appinfo);
+ SCARD_DEBUG_ERR("pkgmgrinfo_appinfo_get_pkgid fail");
+ return result;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle_appinfo);
- SCARD_DEBUG("package name : %s", packageName);
+ SCARD_DEBUG("package name : %s", pkgid);
if ((ret = pkgmgr_pkginfo_create_certinfo(&handle)) == 0)
{
if ((ret = pkgmgr_pkginfo_create_certinfo(&handle)) == 0)
{
- if ((ret = pkgmgr_pkginfo_load_certinfo(packageName, handle)) == 0)
+ if ((ret = pkgmgr_pkginfo_load_certinfo(pkgid, handle)) == 0)
Name: smartcard-service
Summary: Smartcard Service FW
Name: smartcard-service
Summary: Smartcard Service FW
Release: 0
Group: libs
License: Apache License, Version 2.0
Release: 0
Group: libs
License: Apache License, Version 2.0
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(pkgmgr)
+BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(aul)
BuildRequires: cmake
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(aul)
BuildRequires: cmake