Add GetArchiveInfo 87/229987/3
authorIlho Kim <ilho159.kim@samsung.com>
Tue, 7 Apr 2020 04:53:57 +0000 (13:53 +0900)
committerilho kim <ilho159.kim@samsung.com>
Thu, 16 Apr 2020 08:06:34 +0000 (08:06 +0000)
Requires :
- [app-installers]https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/228145/

Change-Id: If8ccd2c9b92ab5232c62e6cf4237fbebdc649b6f
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/hybrid/hybrid_installer.cc
src/hybrid/hybrid_installer.h
src/wgt/CMakeLists.txt
src/wgt/wgt_installer.cc
src/wgt/wgt_installer.h

index d3accd7..c1c4326 100644 (file)
@@ -26,6 +26,7 @@
 #include "hybrid/step/configuration/step_stash_tpk_config.h"
 #include "hybrid/step/encryption/step_encrypt_hybrid_resources.h"
 #include "hybrid/step/pkgmgr/step_merge_xml.h"
+#include "lib/wgt_archive_info.h"
 #include "wgt/step/configuration/step_parse.h"
 #include "wgt/step/configuration/step_set_old_signature_files_location.h"
 #include "wgt/step/encryption/step_remove_encryption_data.h"
@@ -50,6 +51,12 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
   context_->backend_data.set(new HybridBackendData());
 }
 
+std::unique_ptr<ci::ArchiveInfo> HybridInstaller::GetArchiveInfo() {
+  std::unique_ptr<WgtArchiveInfo> archive_info;
+  archive_info.reset(new WgtArchiveInfo(pkgmgr_->GetRequestInfo(GetIndex())));
+  return archive_info;
+}
+
 void HybridInstaller::InstallSteps() {
   AppInstaller::InstallSteps();
   AddStepAfter<hybrid::configuration::StepStashTpkConfig>("CheckInstallable");
index 2102a55..c595153 100644 (file)
@@ -24,6 +24,7 @@ namespace hybrid {
 class HybridInstaller : public common_installer::AppInstaller {
  public:
   explicit HybridInstaller(common_installer::PkgMgrPtr pkgmgr);
+  std::unique_ptr<common_installer::ArchiveInfo> GetArchiveInfo() override;
 
   SCOPE_LOG_TAG(HybridInstaller)
 
index 9aa1b7b..4a98bc4 100755 (executable)
@@ -6,6 +6,7 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/filesystem WGT_STEP_FILESY
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/pkgmgr WGT_STEP_PKGMGR_SRCS)
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/security WGT_STEP_SECURITY_SRCS)
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/utils WGT_UTILS_SRCS)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../lib LIB_SRCS)
 
 # Target - definition
 ADD_LIBRARY(${TARGET_LIBNAME_WGT} SHARED
@@ -15,7 +16,8 @@ ADD_LIBRARY(${TARGET_LIBNAME_WGT} SHARED
   ${WGT_STEP_FILESYSTEM_SRCS}
   ${WGT_STEP_PKGMGR_SRCS}
   ${WGT_STEP_SECURITY_SRCS}
-  ${WGT_UTILS_SRCS})
+  ${WGT_UTILS_SRCS}
+  ${LIB_SRCS})
 # Target - includes
 TARGET_INCLUDE_DIRECTORIES(${TARGET_LIBNAME_WGT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../")
 # Target - deps
@@ -26,6 +28,7 @@ APPLY_PKG_CONFIG(${TARGET_LIBNAME_WGT} PUBLIC
   PKGMGR_INSTALLER_DEPS
   ENCRYPTION_DEPS
   Boost
+  VCONF_DEPS
 )
 SET_TARGET_PROPERTIES(${TARGET_LIBNAME_WGT} PROPERTIES COMPILE_FLAGS "-fPIC")
 
index f064f30..87ff292 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <wgt_manifest_handlers/widget_config_parser.h>
 
+#include "lib/wgt_archive_info.h"
 #include "wgt/utils/shared_dirs.h"
 #include "wgt/step/configuration/step_check_rds_manifest.h"
 #include "wgt/step/configuration/step_check_start_files.h"
@@ -49,6 +50,12 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
   context_->backend_data.set(new WgtBackendData());
 }
 
+std::unique_ptr<ci::ArchiveInfo> WgtInstaller::GetArchiveInfo() {
+  std::unique_ptr<WgtArchiveInfo> archive_info;
+  archive_info.reset(new WgtArchiveInfo(pkgmgr_->GetRequestInfo(GetIndex())));
+  return archive_info;
+}
+
 void WgtInstaller::InstallSteps() {
   AppInstaller::InstallSteps();
   ReplaceStep<wgt::configuration::StepParse>("ParseManifest",
index d0a4c2b..e210622 100644 (file)
@@ -24,6 +24,7 @@ class WgtInstaller : public common_installer::AppInstaller {
    * \param pkgmgr pointer to pkgmgr
    */
   explicit WgtInstaller(common_installer::PkgMgrPtr pkgrmgr);
+  std::unique_ptr<common_installer::ArchiveInfo> GetArchiveInfo() override;
 
  protected:
   void InstallSteps() override;