Split API in pkgmgr_registration.h 07/75107/5 accepted/tizen/common/20160624.133942 accepted/tizen/ivi/20160624.064700 accepted/tizen/mobile/20160624.064601 accepted/tizen/tv/20160624.064519 accepted/tizen/wearable/20160624.064720 submit/tizen/20160624.022316
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 16 Jun 2016 12:57:58 +0000 (14:57 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Thu, 23 Jun 2016 11:49:12 +0000 (04:49 -0700)
Submit together:
 - https://review.tizen.org/gerrit/75107
 - https://review.tizen.org/gerrit/75108
 - https://review.tizen.org/gerrit/75109

Change-Id: I259d3aac621443e7985fc2d5aa87e99d5a7bd959

src/unit_tests/smoke_test.cc
src/wgt/wgt_app_query_interface.cc

index f150590..56dfb15 100644 (file)
@@ -8,7 +8,7 @@
 #include <boost/system/error_code.hpp>
 #include <common/paths.h>
 #include <common/pkgmgr_interface.h>
-#include <common/pkgmgr_registration.h>
+#include <common/pkgmgr_query.h>
 #include <common/request.h>
 #include <common/step/configuration/step_fail.h>
 #include <common/tzip_interface.h>
@@ -217,13 +217,13 @@ void PackageCheckCleanup(const std::string& pkgid,
 
 void ValidatePackage(const std::string& pkgid,
                      const std::vector<std::string>& appids) {
-  ASSERT_TRUE(ci::IsPackageInstalled(pkgid, ci::GetRequestMode()));
+  ASSERT_TRUE(ci::QueryIsPackageInstalled(pkgid, ci::GetRequestMode()));
   ValidatePackageFS(pkgid, appids);
 }
 
 void CheckPackageNonExistance(const std::string& pkgid,
                               const std::vector<std::string>& appids) {
-  ASSERT_FALSE(ci::IsPackageInstalled(pkgid, ci::GetRequestMode()));
+  ASSERT_FALSE(ci::QueryIsPackageInstalled(pkgid, ci::GetRequestMode()));
   PackageCheckCleanup(pkgid, appids);
 }
 
index e4245cc..912c861 100644 (file)
@@ -11,7 +11,7 @@
 #include <boost/filesystem/path.hpp>
 #include <boost/system/error_code.hpp>
 
-#include <common/pkgmgr_registration.h>
+#include <common/pkgmgr_query.h>
 #include <common/recovery_file.h>
 #include <common/request.h>
 #include <common/utils/file_util.h>
@@ -107,21 +107,21 @@ bool WgtAppQueryInterface::IsAppInstalledByArgv(int argc, char** argv) {
     return false;
 
   // argument from commandline is package id
-  if (ci::IsPackageInstalled(arg, ci::GetRequestMode()))
+  if (ci::QueryIsPackageInstalled(arg, ci::GetRequestMode()))
     return true;
 
   // argument from commandline is path to file
   std::string pkg_id = GetPkgIdFromPath(arg);
   if (pkg_id.empty())
     return false;
-  return ci::IsPackageInstalled(pkg_id, ci::GetRequestMode());
+  return ci::QueryIsPackageInstalled(pkg_id, ci::GetRequestMode());
 }
 
 bool WgtAppQueryInterface::IsHybridApplication(int argc, char** argv) {
   std::string arg = GetInstallationRequestInfo(argc, argv);
   if (arg.find("apps_rw/recovery-") != std::string::npos)
     arg = ReadPkgidFromRecovery(arg);
-  if (ci::IsPackageInstalled(arg, ci::GetRequestMode())) {
+  if (ci::QueryIsPackageInstalled(arg, ci::GetRequestMode())) {
     bf::path package_directory(ci::GetRootAppPath(false));
     if (bf::exists(package_directory / arg / kTizenManifestLocation) &&
         bf::exists(package_directory / arg / kHybridConfigLocation))