From a590d247f7c58846b6e7c3ae15719bd479bfb34e Mon Sep 17 00:00:00 2001
From: Pawel Sikorski
Date: Wed, 15 Jul 2015 14:35:11 +0200
Subject: [PATCH] Cleanup
* Inline clean/undo/precheck/process if empty
* wgt_backend_data.cc removal as it is empty
Change-Id: Ifd4136230b08225fce4da9eef5415f001763b211
---
src/common/step/step_copy.cc | 4 ----
src/common/step/step_copy.h | 2 +-
src/common/step/step_generate_xml.cc | 4 ----
src/common/step/step_generate_xml.h | 2 +-
src/common/step/step_parse.cc | 8 --------
src/common/step/step_parse.h | 4 ++--
src/common/step/step_register_app.cc | 4 ----
src/common/step/step_register_app.h | 2 +-
src/common/step/step_unzip.cc | 3 ---
src/common/step/step_unzip.h | 3 +--
src/common/step/step_update_app.cc | 4 ----
src/common/step/step_update_app.h | 2 +-
src/tpk/step/step_create_symbolic_link.cc | 5 -----
src/tpk/step/step_create_symbolic_link.h | 2 +-
src/wgt/CMakeLists.txt | 1 -
src/wgt/step/step_create_symbolic_link.cc | 4 ----
src/wgt/step/step_create_symbolic_link.h | 2 +-
src/wgt/wgt_backend_data.cc | 12 ------------
src/wgt/wgt_backend_data.h | 2 --
19 files changed, 9 insertions(+), 61 deletions(-)
delete mode 100644 src/wgt/wgt_backend_data.cc
diff --git a/src/common/step/step_copy.cc b/src/common/step/step_copy.cc
index 05593dc..3bd888f 100644
--- a/src/common/step/step_copy.cc
+++ b/src/common/step/step_copy.cc
@@ -91,10 +91,6 @@ Step::Status StepCopy::process() {
return Status::OK;
}
-Step::Status StepCopy::clean() {
- return Status::OK;
-}
-
Step::Status StepCopy::undo() {
if (bf::exists(context_->pkg_path.get()))
bf::remove_all(context_->pkg_path.get());
diff --git a/src/common/step/step_copy.h b/src/common/step/step_copy.h
index 4d36837..5d2bf08 100644
--- a/src/common/step/step_copy.h
+++ b/src/common/step/step_copy.h
@@ -19,7 +19,7 @@ class StepCopy : public Step {
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override;
diff --git a/src/common/step/step_generate_xml.cc b/src/common/step/step_generate_xml.cc
index 6e5df8b..0e773d2 100755
--- a/src/common/step/step_generate_xml.cc
+++ b/src/common/step/step_generate_xml.cc
@@ -304,10 +304,6 @@ Step::Status StepGenerateXml::process() {
return Status::OK;
}
-Step::Status StepGenerateXml::clean() {
- return Status::OK;
-}
-
Step::Status StepGenerateXml::undo() {
if (fs::exists(icon_path_))
fs::remove_all(icon_path_);
diff --git a/src/common/step/step_generate_xml.h b/src/common/step/step_generate_xml.h
index baedcf3..dd1cf29 100644
--- a/src/common/step/step_generate_xml.h
+++ b/src/common/step/step_generate_xml.h
@@ -22,7 +22,7 @@ class StepGenerateXml : public Step {
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override;
diff --git a/src/common/step/step_parse.cc b/src/common/step/step_parse.cc
index a377a16..97034f2 100644
--- a/src/common/step/step_parse.cc
+++ b/src/common/step/step_parse.cc
@@ -46,13 +46,5 @@ Step::Status StepParse::process() {
return Status::OK;
}
-Step::Status StepParse::clean() {
- return Status::OK;
-}
-
-Step::Status StepParse::undo() {
- return Status::OK;
-}
-
} // namespace parse
} // namespace common_installer
diff --git a/src/common/step/step_parse.h b/src/common/step/step_parse.h
index 11bc94d..5ba83ff 100644
--- a/src/common/step/step_parse.h
+++ b/src/common/step/step_parse.h
@@ -19,8 +19,8 @@ class StepParse : public Step {
using Step::Step;
Status process() override;
- Status clean() override;
- Status undo() override;
+ Status clean() override { return Status::OK; }
+ Status undo() override { return Status::OK; }
Status precheck() override { return Status::OK; }
SCOPE_LOG_TAG(Parse)
diff --git a/src/common/step/step_register_app.cc b/src/common/step/step_register_app.cc
index 2a47c31..c62b50b 100644
--- a/src/common/step/step_register_app.cc
+++ b/src/common/step/step_register_app.cc
@@ -45,10 +45,6 @@ Step::Status StepRegisterApplication::process() {
return Status::OK;
}
-Step::Status StepRegisterApplication::clean() {
- return Status::OK;
-}
-
Step::Status StepRegisterApplication::undo() {
UnregisterAppInPkgmgr(context_->xml_path.get(), context_->pkgid.get(),
context_->uid.get());
diff --git a/src/common/step/step_register_app.h b/src/common/step/step_register_app.h
index 13a655c..fe83611 100644
--- a/src/common/step/step_register_app.h
+++ b/src/common/step/step_register_app.h
@@ -15,7 +15,7 @@ class StepRegisterApplication : public Step {
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override;
diff --git a/src/common/step/step_unzip.cc b/src/common/step/step_unzip.cc
index cdc638f..cc10a0d 100644
--- a/src/common/step/step_unzip.cc
+++ b/src/common/step/step_unzip.cc
@@ -49,9 +49,6 @@ bool CheckFreeSpaceAtPath(int64_t required_size,
namespace common_installer {
namespace unzip {
-StepUnzip::StepUnzip(ContextInstaller* context)
- : Step(context) {}
-
Step::Status StepUnzip::precheck() {
if (context_->file_path.get().empty()) {
LOG(ERROR) << "file_path attribute is empty";
diff --git a/src/common/step/step_unzip.h b/src/common/step/step_unzip.h
index a123a0b..8fbcac1 100644
--- a/src/common/step/step_unzip.h
+++ b/src/common/step/step_unzip.h
@@ -17,8 +17,7 @@ namespace unzip {
class StepUnzip : public Step {
public:
- explicit StepUnzip(ContextInstaller* context);
-
+ using Step::Step;
Status process() override;
Status clean() override { return Status::OK; }
Status undo() override;
diff --git a/src/common/step/step_update_app.cc b/src/common/step/step_update_app.cc
index 3101213..2978106 100644
--- a/src/common/step/step_update_app.cc
+++ b/src/common/step/step_update_app.cc
@@ -45,10 +45,6 @@ Step::Status StepUpdateApplication::process() {
return Status::OK;
}
-Step::Status StepUpdateApplication::clean() {
- return Status::OK;
-}
-
Step::Status StepUpdateApplication::undo() {
// Prepare certification info for revert
ValidationCore::Base64Decoder decoder;
diff --git a/src/common/step/step_update_app.h b/src/common/step/step_update_app.h
index fd97471..5d146d2 100644
--- a/src/common/step/step_update_app.h
+++ b/src/common/step/step_update_app.h
@@ -17,7 +17,7 @@ class StepUpdateApplication : public Step {
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override;
diff --git a/src/tpk/step/step_create_symbolic_link.cc b/src/tpk/step/step_create_symbolic_link.cc
index 7ec0cee..309b2c5 100644
--- a/src/tpk/step/step_create_symbolic_link.cc
+++ b/src/tpk/step/step_create_symbolic_link.cc
@@ -131,11 +131,6 @@ Status StepCreateSymbolicLink::process() {
}
-Status StepCreateSymbolicLink::clean() {
- return Status::OK;
-}
-
-
Status StepCreateSymbolicLink::undo() {
manifest_x* m = context_->manifest_data.get();
uiapplication_x *uiapp = m->uiapplication;
diff --git a/src/tpk/step/step_create_symbolic_link.h b/src/tpk/step/step_create_symbolic_link.h
index 8bd93e3..83e30e7 100644
--- a/src/tpk/step/step_create_symbolic_link.h
+++ b/src/tpk/step/step_create_symbolic_link.h
@@ -11,7 +11,7 @@ class StepCreateSymbolicLink : public common_installer::Step {
public:
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override { return Status::OK; }
};
diff --git a/src/wgt/CMakeLists.txt b/src/wgt/CMakeLists.txt
index c9fc768..6254ac1 100644
--- a/src/wgt/CMakeLists.txt
+++ b/src/wgt/CMakeLists.txt
@@ -8,7 +8,6 @@ SET(SRCS
step/step_rds_modify.cc
wgt_app_query_interface.cc
wgt_backend.cc
- wgt_backend_data.cc
)
IF(WRT_LAUNCHER)
diff --git a/src/wgt/step/step_create_symbolic_link.cc b/src/wgt/step/step_create_symbolic_link.cc
index 0cab72f..1144899 100644
--- a/src/wgt/step/step_create_symbolic_link.cc
+++ b/src/wgt/step/step_create_symbolic_link.cc
@@ -70,10 +70,6 @@ common_installer::Step::Status StepCreateSymbolicLink::process() {
return Status::OK;
}
-common_installer::Step::Status StepCreateSymbolicLink::clean() {
- return Status::OK;
-}
-
common_installer::Step::Status StepCreateSymbolicLink::undo() {
uiapplication_x* ui = context_->manifest_data.get()->uiapplication;
serviceapplication_x* svc = context_->manifest_data.get()->serviceapplication;
diff --git a/src/wgt/step/step_create_symbolic_link.h b/src/wgt/step/step_create_symbolic_link.h
index 893483b..ba88c4f 100644
--- a/src/wgt/step/step_create_symbolic_link.h
+++ b/src/wgt/step/step_create_symbolic_link.h
@@ -20,7 +20,7 @@ class StepCreateSymbolicLink : public common_installer::Step {
using Step::Step;
Status process() override;
- Status clean() override;
+ Status clean() override { return Status::OK; }
Status undo() override;
Status precheck() override { return Status::OK; }
diff --git a/src/wgt/wgt_backend_data.cc b/src/wgt/wgt_backend_data.cc
deleted file mode 100644
index 85930e6..0000000
--- a/src/wgt/wgt_backend_data.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by a apache 2.0 license that can be
-// found in the LICENSE file.
-
-#include "wgt/wgt_backend_data.h"
-
-namespace wgt {
-
-WgtBackendData::WgtBackendData() {
-}
-
-} // namespace wgt
diff --git a/src/wgt/wgt_backend_data.h b/src/wgt/wgt_backend_data.h
index 5df0839..c8049c7 100644
--- a/src/wgt/wgt_backend_data.h
+++ b/src/wgt/wgt_backend_data.h
@@ -17,8 +17,6 @@ namespace wgt {
class WgtBackendData : public common_installer::BackendData {
public:
- WgtBackendData();
-
Property> files_to_add;
Property> files_to_modify;
Property> files_to_delete;
--
2.7.4