From: Wojciech Kosowicz Date: Fri, 21 Aug 2015 07:05:29 +0000 (+0200) Subject: Moving step_generate_xml to wgt directory X-Git-Tag: accepted/tizen/mobile/20150822.064642~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76484b761a14a230cd5d4bb492214fa4d7404efe;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Moving step_generate_xml to wgt directory Change-Id: I07a279f2ca3dc03547808fbfa6d1a96866794b42 --- diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 4d2869c..78eb24e 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -20,7 +20,6 @@ SET(SRCS step/step_copy_storage_directories.cc step/step_create_storage_directories.cc step/step_fail.cc - step/step_generate_xml.cc step/step_recover_application.cc step/step_recover_files.cc step/step_recover_icons.cc diff --git a/src/tpk/tpk_installer.cc b/src/tpk/tpk_installer.cc index d56325a..586290a 100644 --- a/src/tpk/tpk_installer.cc +++ b/src/tpk/tpk_installer.cc @@ -10,7 +10,6 @@ #include "common/step/step_copy_backup.h" #include "common/step/step_check_old_certificate.h" #include "common/step/step_fail.h" -#include "common/step/step_generate_xml.h" #include "common/step/step_old_manifest.h" #include "common/step/step_open_recovery_file.h" #include "common/step/step_parse.h" diff --git a/src/wgt/CMakeLists.txt b/src/wgt/CMakeLists.txt index ec050d8..3b52fdf 100644 --- a/src/wgt/CMakeLists.txt +++ b/src/wgt/CMakeLists.txt @@ -4,6 +4,7 @@ SET(SRCS step/step_check_settings_level.cc step/step_create_symbolic_link.cc step/step_encrypt_resources.cc + step/step_generate_xml.cc step/step_parse.cc step/step_remove_encryption_data.cc step/step_parse_recovery.cc diff --git a/src/common/step/step_generate_xml.cc b/src/wgt/step/step_generate_xml.cc similarity index 97% rename from src/common/step/step_generate_xml.cc rename to src/wgt/step/step_generate_xml.cc index 273dd76..2ea8d66 100755 --- a/src/common/step/step_generate_xml.cc +++ b/src/wgt/step/step_generate_xml.cc @@ -3,7 +3,7 @@ // Use of this source code is governed by a apache 2.0 license that can be // found in the LICENSE file. -#include "common/step/step_generate_xml.h" +#include "wgt/step/step_generate_xml.h" #include #include @@ -24,7 +24,7 @@ namespace bs = boost::system; namespace fs = boost::filesystem; -namespace common_installer { +namespace wgt { namespace pkgmgr { static void _writeUIApplicationAttributes( @@ -44,7 +44,7 @@ static void _writeServiceApplicationAttributes( } template -Step::Status StepGenerateXml::GenerateApplicationCommonXml(T* app, +common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(T* app, xmlTextWriterPtr writer) { // common appributes among uiapplication_x and serviceapplication_x xmlTextWriterWriteAttribute(writer, BAD_CAST "appid", BAD_CAST app->appid); @@ -142,7 +142,7 @@ Step::Status StepGenerateXml::GenerateApplicationCommonXml(T* app, return Step::Status::OK; } -Step::Status StepGenerateXml::precheck() { +common_installer::Step::Status StepGenerateXml::precheck() { if (!context_->manifest_data.get()) { LOG(ERROR) << "manifest_data attribute is empty"; return Step::Status::INVALID_VALUE; @@ -162,7 +162,7 @@ Step::Status StepGenerateXml::precheck() { return Step::Status::OK; } -Step::Status StepGenerateXml::process() { +common_installer::Step::Status StepGenerateXml::process() { fs::path xml_path = fs::path(getUserManifestPath(context_->uid.get())) / fs::path(context_->pkgid.get()); xml_path += ".xml"; @@ -350,7 +350,7 @@ Step::Status StepGenerateXml::process() { return Status::OK; } -Step::Status StepGenerateXml::undo() { +common_installer::Step::Status StepGenerateXml::undo() { bs::error_code error; if (fs::exists(context_->xml_path.get())) fs::remove_all(context_->xml_path.get(), error); @@ -358,4 +358,4 @@ Step::Status StepGenerateXml::undo() { } } // namespace pkgmgr -} // namespace common_installer +} // namespace wgt diff --git a/src/common/step/step_generate_xml.h b/src/wgt/step/step_generate_xml.h similarity index 79% rename from src/common/step/step_generate_xml.h rename to src/wgt/step/step_generate_xml.h index 19b46f0..bb1bd23 100644 --- a/src/common/step/step_generate_xml.h +++ b/src/wgt/step/step_generate_xml.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a apache 2.0 license that can be // found in the LICENSE file. -#ifndef COMMON_STEP_STEP_GENERATE_XML_H_ -#define COMMON_STEP_STEP_GENERATE_XML_H_ +#ifndef WGT_STEP_STEP_GENERATE_XML_H_ +#define WGT_STEP_STEP_GENERATE_XML_H_ #include @@ -12,10 +12,10 @@ #include "common/step/step.h" #include "common/utils/logging.h" -namespace common_installer { +namespace wgt { namespace pkgmgr { -class StepGenerateXml : public Step { +class StepGenerateXml : public common_installer::Step { public: using Step::Step; @@ -35,6 +35,6 @@ class StepGenerateXml : public Step { }; } // namespace pkgmgr -} // namespace common_installer +} // namespace wgt -#endif // COMMON_STEP_STEP_GENERATE_XML_H_ +#endif // WGT_STEP_STEP_GENERATE_XML_H_ diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index c900cad..b56b148 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -14,7 +14,6 @@ #include "common/step/step_copy_backup.h" #include "common/step/step_copy_storage_directories.h" #include "common/step/step_fail.h" -#include "common/step/step_generate_xml.h" #include "common/step/step_open_recovery_file.h" #include "common/step/step_parse.h" #include "common/step/step_register_app.h" @@ -42,6 +41,7 @@ #include "wgt/step/step_create_symbolic_link.h" #include "wgt/step/step_check_settings_level.h" #include "wgt/step/step_encrypt_resources.h" +#include "wgt/step/step_generate_xml.h" #include "wgt/step/step_parse.h" #include "wgt/step/step_parse_recovery.h" #include "wgt/step/step_remove_encryption_data.h" @@ -73,7 +73,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep(); break; @@ -94,7 +94,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); break; }