Standardize use of STEP_NAME() 16/206316/1
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 16 May 2019 03:01:04 +0000 (12:01 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Thu, 16 May 2019 08:33:53 +0000 (17:33 +0900)
In case class name is StepExampleClass, Pass "ExampleClass" to STEP_NAME()

Change-Id: I94effc1c0d26e1498483bf941d2bf0d0af6f84ba
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/hybrid/hybrid_installer.cc
src/hybrid/step/pkgmgr/step_merge_xml.cc [moved from src/hybrid/step/pkgmgr/step_generate_xml.cc with 93% similarity]
src/hybrid/step/pkgmgr/step_merge_xml.h [moved from src/hybrid/step/pkgmgr/step_generate_xml.h with 79% similarity]
src/wgt/step/filesystem/step_create_symbolic_link.h
src/wgt/step/filesystem/step_wgt_patch_storage_directories.h
src/wgt/step/filesystem/step_wgt_resource_directory.h
src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h
src/wgt/step/security/step_direct_manifest_signature.h

index 424b3cb..520fada 100644 (file)
@@ -97,7 +97,7 @@
 #include "hybrid/step/configuration/step_merge_tpk_privileges.h"
 #include "hybrid/step/configuration/step_stash_tpk_config.h"
 #include "hybrid/step/encryption/step_encrypt_resources.h"
-#include "hybrid/step/pkgmgr/step_generate_xml.h"
+#include "hybrid/step/pkgmgr/step_merge_xml.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"
@@ -157,7 +157,7 @@ void HybridInstaller::InstallSteps() {
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<ci::filesystem::StepCreateStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
@@ -219,7 +219,7 @@ void HybridInstaller::UpdateSteps() {
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<ci::filesystem::StepCopyStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
@@ -318,7 +318,7 @@ void HybridInstaller::DeltaSteps() {
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<ci::filesystem::StepCopyStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
@@ -395,7 +395,7 @@ void HybridInstaller::MountInstallSteps() {
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<ci::filesystem::StepCreateStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
@@ -456,7 +456,7 @@ void HybridInstaller::MountUpdateSteps() {
   AddStep<wgt::filesystem::StepCopyPreviewIcons>();
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
@@ -498,7 +498,7 @@ void HybridInstaller::ManifestDirectInstallSteps() {
   AddStep<tpk::filesystem::StepTpkPatchIcons>();
   AddStep<wgt::filesystem::StepWgtPatchIcons>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE);
@@ -542,7 +542,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() {
   AddStep<tpk::filesystem::StepTpkPatchIcons>();
   AddStep<wgt::filesystem::StepWgtPatchIcons>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE);
@@ -676,7 +676,7 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() {
   AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
   AddStep<ci::filesystem::StepCreateStorageDirectories>();
   AddStep<wgt::pkgmgr::StepGenerateXml>();
-  AddStep<hybrid::pkgmgr::StepGenerateXml>();
+  AddStep<hybrid::pkgmgr::StepMergeXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<hybrid::configuration::StepMergeTpkConfig>(
       hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT);
similarity index 93%
rename from src/hybrid/step/pkgmgr/step_generate_xml.cc
rename to src/hybrid/step/pkgmgr/step_merge_xml.cc
index 10246e9..0c87c0d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#include "hybrid/step/pkgmgr/step_generate_xml.h"
+#include "hybrid/step/pkgmgr/step_merge_xml.h"
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
@@ -51,7 +51,7 @@ const std::vector<std::pair<std::string, std::string>> kApplicationNodeNames = {
 namespace hybrid {
 namespace pkgmgr {
 
-bool StepGenerateXml::LoadXmlDocument(const bf::path& wgt_xml_path,
+bool StepMergeXml::LoadXmlDocument(const bf::path& wgt_xml_path,
     const bf::path& tpk_xml_path) {
   // trim blanks
   int keep_blanks = xmlKeepBlanksDefault(0);
@@ -71,7 +71,7 @@ bool StepGenerateXml::LoadXmlDocument(const bf::path& wgt_xml_path,
   return true;
 }
 
-xmlNodePtr StepGenerateXml::GetXmlNode(const xmlDocPtr doc,
+xmlNodePtr StepMergeXml::GetXmlNode(const xmlDocPtr doc,
     const std::string& name, const std::string& attr,
     const std::string& attr_val) {
   xmlXPathContextPtr ctxt = xmlXPathNewContext(doc);
@@ -98,7 +98,7 @@ xmlNodePtr StepGenerateXml::GetXmlNode(const xmlDocPtr doc,
   return node;
 }
 
-void StepGenerateXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) {
+void StepMergeXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) {
   xmlNodePtr last = xmlGetLastChild(node1);
   xmlNodePtr next;
   // merge node2's child into node1
@@ -116,13 +116,13 @@ void StepGenerateXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) {
   }
 }
 
-void StepGenerateXml::SetXmlNodeAttribute(xmlNodePtr node,
+void StepMergeXml::SetXmlNodeAttribute(xmlNodePtr node,
     const std::string& attr, const std::string& attr_val) {
   xmlSetProp(node, reinterpret_cast<const xmlChar*>(attr.c_str()),
       reinterpret_cast<const xmlChar*>(attr_val.c_str()));
 }
 
-ci::Step::Status StepGenerateXml::process() {
+ci::Step::Status StepMergeXml::process() {
   bf::path wgt_xml_path = context_->xml_path.get();
   bf::path tpk_xml_path = context_->GetPkgPath() / "tizen-manifest.xml";
 
@@ -172,7 +172,7 @@ ci::Step::Status StepGenerateXml::process() {
   return Status::OK;
 }
 
-ci::Step::Status StepGenerateXml::precheck() {
+ci::Step::Status StepMergeXml::precheck() {
   bf::path wgt_xml_path = context_->xml_path.get();
   if (!bf::exists(wgt_xml_path)) {
     LOG(ERROR) << "Converted config file not found: " << wgt_xml_path;
similarity index 79%
rename from src/hybrid/step/pkgmgr/step_generate_xml.h
rename to src/hybrid/step/pkgmgr/step_merge_xml.h
index 8fce64d..7f75295 100644 (file)
@@ -2,8 +2,8 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#ifndef HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_
-#define HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_
+#ifndef HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_
+#define HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_
 
 #include <boost/filesystem.hpp>
 
 namespace hybrid {
 namespace pkgmgr {
 
-class StepGenerateXml : public common_installer::Step {
+class StepMergeXml : public common_installer::Step {
  public:
   using Step::Step;
-  explicit StepGenerateXml(common_installer::InstallerContext* context)
+  explicit StepMergeXml(common_installer::InstallerContext* context)
       : Step(context), wgt_doc_(nullptr), tpk_doc_(nullptr) {}
   Status process() override;
   Status clean() override { return Status::OK; }
@@ -38,10 +38,10 @@ class StepGenerateXml : public common_installer::Step {
   xmlDocPtr wgt_doc_;
   xmlDocPtr tpk_doc_;
 
-  STEP_NAME(GenerateXml2);
+  STEP_NAME(MergeXml);
 };
 
 }  // namespace pkgmgr
 }  // namespace hybrid
 
-#endif  // HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_
+#endif  // HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_
index 048c759..c1129e7 100644 (file)
@@ -55,7 +55,7 @@ class StepCreateSymbolicLink : public common_installer::Step {
  private:
   bool CreateSymlinksForApps();
 
-  STEP_NAME(SymbolicLink)
+  STEP_NAME(CreateSymbolicLink)
 };
 
 }  // namespace filesystem
index 96c5da6..f6692c6 100644 (file)
@@ -31,7 +31,7 @@ class StepWgtPatchStorageDirectories :
   bool ShareDirFor3x();
   bool CreatePrivateTmpDir();
 
-  STEP_NAME(PatchWgtStorageDirectories)
+  STEP_NAME(WgtPatchStorageDirectories)
 };
 
 }  // namespace filesystem
index f5437fd..f81ebd5 100644 (file)
@@ -53,7 +53,7 @@ class StepWgtResourceDirectory : public common_installer::Step {
    */
   Status precheck() override { return Status::OK; }
 
-  STEP_NAME(CreateWgtResourceDirectory)
+  STEP_NAME(WgtResourceDirectory)
 };
 
 }  // namespace filesystem
index e8494ad..00c1dcd 100644 (file)
@@ -31,7 +31,7 @@ class StepWgtUndoPatchStorageDirectories :
   bool UndoShareDirFor3x();
   boost::filesystem::path backup_dir_;
 
-  STEP_NAME(UndoPatchWgtStorageDirectories)
+  STEP_NAME(WgtUndoPatchStorageDirectories)
 };
 
 }  // namespace filesystem
index d7910f2..df8c7e8 100644 (file)
@@ -25,7 +25,7 @@ class StepDirectManifestSignature
  private:
   boost::filesystem::path GetSignatureRoot() const override;
 
-  STEP_NAME(StepDirectManifestSignature)
+  STEP_NAME(DirectManifestSignature)
 };
 
 }  // namespace security