From fd0d702e912fb81e31e5dd46655e1c51bd4e3a83 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 16 May 2019 12:01:04 +0900 Subject: [PATCH] Standardize use of STEP_NAME() In case class name is StepExampleClass, Pass "ExampleClass" to STEP_NAME() Change-Id: I94effc1c0d26e1498483bf941d2bf0d0af6f84ba Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 18 +++++++++--------- .../pkgmgr/{step_generate_xml.cc => step_merge_xml.cc} | 14 +++++++------- .../pkgmgr/{step_generate_xml.h => step_merge_xml.h} | 12 ++++++------ src/wgt/step/filesystem/step_create_symbolic_link.h | 2 +- .../filesystem/step_wgt_patch_storage_directories.h | 2 +- src/wgt/step/filesystem/step_wgt_resource_directory.h | 2 +- .../step_wgt_undo_patch_storage_directories.h | 2 +- src/wgt/step/security/step_direct_manifest_signature.h | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) rename src/hybrid/step/pkgmgr/{step_generate_xml.cc => step_merge_xml.cc} (93%) rename src/hybrid/step/pkgmgr/{step_generate_xml.h => step_merge_xml.h} (79%) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 424b3cb..520fada 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -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(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -219,7 +219,7 @@ void HybridInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -318,7 +318,7 @@ void HybridInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -395,7 +395,7 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -456,7 +456,7 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -498,7 +498,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); @@ -542,7 +542,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); @@ -676,7 +676,7 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.cc b/src/hybrid/step/pkgmgr/step_merge_xml.cc 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 --- a/src/hybrid/step/pkgmgr/step_generate_xml.cc +++ b/src/hybrid/step/pkgmgr/step_merge_xml.cc @@ -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 #include @@ -51,7 +51,7 @@ const std::vector> 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(attr.c_str()), reinterpret_cast(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; diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.h b/src/hybrid/step/pkgmgr/step_merge_xml.h 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 --- a/src/hybrid/step/pkgmgr/step_generate_xml.h +++ b/src/hybrid/step/pkgmgr/step_merge_xml.h @@ -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 @@ -16,10 +16,10 @@ 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_ diff --git a/src/wgt/step/filesystem/step_create_symbolic_link.h b/src/wgt/step/filesystem/step_create_symbolic_link.h index 048c759..c1129e7 100644 --- a/src/wgt/step/filesystem/step_create_symbolic_link.h +++ b/src/wgt/step/filesystem/step_create_symbolic_link.h @@ -55,7 +55,7 @@ class StepCreateSymbolicLink : public common_installer::Step { private: bool CreateSymlinksForApps(); - STEP_NAME(SymbolicLink) + STEP_NAME(CreateSymbolicLink) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h index 96c5da6..f6692c6 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h +++ b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h @@ -31,7 +31,7 @@ class StepWgtPatchStorageDirectories : bool ShareDirFor3x(); bool CreatePrivateTmpDir(); - STEP_NAME(PatchWgtStorageDirectories) + STEP_NAME(WgtPatchStorageDirectories) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_resource_directory.h b/src/wgt/step/filesystem/step_wgt_resource_directory.h index f5437fd..f81ebd5 100644 --- a/src/wgt/step/filesystem/step_wgt_resource_directory.h +++ b/src/wgt/step/filesystem/step_wgt_resource_directory.h @@ -53,7 +53,7 @@ class StepWgtResourceDirectory : public common_installer::Step { */ Status precheck() override { return Status::OK; } - STEP_NAME(CreateWgtResourceDirectory) + STEP_NAME(WgtResourceDirectory) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h b/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h index e8494ad..00c1dcd 100644 --- a/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h +++ b/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h @@ -31,7 +31,7 @@ class StepWgtUndoPatchStorageDirectories : bool UndoShareDirFor3x(); boost::filesystem::path backup_dir_; - STEP_NAME(UndoPatchWgtStorageDirectories) + STEP_NAME(WgtUndoPatchStorageDirectories) }; } // namespace filesystem diff --git a/src/wgt/step/security/step_direct_manifest_signature.h b/src/wgt/step/security/step_direct_manifest_signature.h index d7910f2..df8c7e8 100644 --- a/src/wgt/step/security/step_direct_manifest_signature.h +++ b/src/wgt/step/security/step_direct_manifest_signature.h @@ -25,7 +25,7 @@ class StepDirectManifestSignature private: boost::filesystem::path GetSignatureRoot() const override; - STEP_NAME(StepDirectManifestSignature) + STEP_NAME(DirectManifestSignature) }; } // namespace security -- 2.7.4