Remove redundant code 52/53052/5
authorLukasz Wysocki <l.wysocki@samsung.com>
Tue, 1 Dec 2015 09:05:57 +0000 (10:05 +0100)
committerPawel Sikorski <p.sikorski@samsung.com>
Fri, 11 Dec 2015 15:24:02 +0000 (07:24 -0800)
This is due to change made in this following commit
- https://review.tizen.org/gerrit/#/c/52917/

This change depend on following change:
- https://review.tizen.org/gerrit/#/c/53081/

please merge it first.

Change-Id: I8dc188c3af27f42396187b7ef44e2cfe2545857d

82 files changed:
src/common/CMakeLists.txt
src/common/app_installer.cc
src/common/app_installer.h
src/common/pkgmgr_interface.h
src/common/pkgmgr_registration.cc
src/common/pkgmgr_signal.cc
src/common/recovery_file.cc
src/common/security_registration.cc
src/common/step/step_backup_icons.h
src/common/step/step_backup_manifest.cc
src/common/step/step_backup_manifest.h
src/common/step/step_check_background_category.h
src/common/step/step_check_old_certificate.cc
src/common/step/step_check_old_certificate.h
src/common/step/step_check_signature.h
src/common/step/step_configure.h
src/common/step/step_copy.h
src/common/step/step_copy_backup.h
src/common/step/step_copy_storage_directories.h
src/common/step/step_copy_tep.h
src/common/step/step_create_icons.h
src/common/step/step_create_storage_directories.h
src/common/step/step_delta_patch.h
src/common/step/step_fail.h
src/common/step/step_generate_xml.h
src/common/step/step_kill_apps.h
src/common/step/step_old_manifest.cc
src/common/step/step_old_manifest.h
src/common/step/step_open_recovery_file.h
src/common/step/step_parse.h
src/common/step/step_privilege_compatibility.h
src/common/step/step_recover_application.h
src/common/step/step_recover_files.h
src/common/step/step_recover_icons.h
src/common/step/step_recover_manifest.h
src/common/step/step_recover_security.h
src/common/step/step_recover_storage_directories.h
src/common/step/step_recovery.cc
src/common/step/step_register_app.h
src/common/step/step_register_security.h
src/common/step/step_remove_files.h
src/common/step/step_remove_icons.h
src/common/step/step_remove_temporary_directory.h
src/common/step/step_revoke_security.h
src/common/step/step_rollback_deinstallation_security.h
src/common/step/step_rollback_installation_security.h
src/common/step/step_unregister_app.h
src/common/step/step_unzip.h
src/common/step/step_update_app.h
src/common/step/step_update_security.h
src/common/step/step_update_tep.h
src/common/utils/file_util.cc
src/common/utils/logging.h [deleted file]
src/common/utils/string_util.cc [deleted file]
src/common/utils/string_util.h [deleted file]
src/pkgdir_tool/pkgdir_tool.cc
src/tpk/step/step_create_symbolic_link.cc
src/tpk/step/step_create_symbolic_link.h
src/tpk/step/step_parse.h
src/tpk/step/step_parse_recovery.h
src/tpk/tpk_app_query_interface.cc
src/tpk/tpk_backend.cc
src/tpk/tpk_installer.cc
src/tpk/tpk_installer.h
src/wgt/step/step_add_default_privileges.h
src/wgt/step/step_check_settings_level.cc
src/wgt/step/step_check_settings_level.h
src/wgt/step/step_create_symbolic_link.h
src/wgt/step/step_encrypt_resources.cc
src/wgt/step/step_encrypt_resources.h
src/wgt/step/step_parse.h
src/wgt/step/step_parse_recovery.h
src/wgt/step/step_rds_modify.cc
src/wgt/step/step_rds_parse.cc
src/wgt/step/step_remove_encryption_data.cc
src/wgt/step/step_remove_encryption_data.h
src/wgt/step/step_wgt_copy_storage_directories.h
src/wgt/step/step_wgt_create_icons.h
src/wgt/step/step_wgt_create_storage_directories.h
src/wgt/step/step_wgt_resource_directory.cc
src/wgt/step/step_wgt_resource_directory.h
src/wgt/wgt_app_query_interface.cc

index 157524e..5e15d15 100644 (file)
@@ -50,7 +50,6 @@ SET(SRCS
   step/step_update_security.cc
   step/step_update_tep.cc
   utils/file_util.cc
-  utils/string_util.cc
 )
 # Target - definition
 ADD_LIBRARY(${TARGET_LIBNAME_COMMON} SHARED ${SRCS})
index 83e8433..9c07a1c 100644 (file)
@@ -9,7 +9,6 @@
 #include "common/installer_context.h"
 #include "common/pkgmgr_interface.h"
 #include "common/pkgmgr_signal.h"
-#include "common/utils/logging.h"
 
 namespace {
 
index 6933fe2..d925df1 100644 (file)
@@ -6,13 +6,14 @@
 #ifndef COMMON_APP_INSTALLER_H_
 #define COMMON_APP_INSTALLER_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include <list>
 #include <memory>
 
 #include "common/pkgmgr_interface.h"
 #include "common/pkgmgr_signal.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 #include "common/utils/macros.h"
 
 namespace common_installer {
index 2e8a1ba..4429a00 100644 (file)
@@ -5,14 +5,15 @@
 #ifndef COMMON_PKGMGR_INTERFACE_H_
 #define COMMON_PKGMGR_INTERFACE_H_
 
+#include <manifest_parser/utils/logging.h>
 #include <pkgmgr_installer.h>
+
 #include <boost/filesystem/path.hpp>
 #include <memory>
 
 #include "common/app_query_interface.h"
 #include "common/request.h"
 #include "common/utils/macros.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 
index 120e03a..b839add 100644 (file)
@@ -4,12 +4,11 @@
 
 #include "common/pkgmgr_registration.h"
 
+#include <manifest_parser/utils/logging.h>
 #include <pkgmgr_installer.h>
 #include <tzplatform_config.h>
 #include <unistd.h>
 
-#include "common/utils/logging.h"
-
 namespace bf = boost::filesystem;
 
 namespace {
index 4253004..26d266c 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "common/pkgmgr_signal.h"
 
+#include <manifest_parser/utils/logging.h>
+
 #include <unistd.h>
 #include <sys/types.h>
 
@@ -12,7 +14,6 @@
 #include <vector>
 
 #include "common/pkgmgr_registration.h"
-#include "common/utils/logging.h"
 
 namespace {
 
index 22f2671..2b9c164 100644 (file)
@@ -7,12 +7,13 @@
 #include <boost/filesystem/operations.hpp>
 #include <boost/system/error_code.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include <array>
 #include <cstring>
 #include <map>
 
 #include "common/installer_context.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;
index 723cd88..b446e13 100644 (file)
@@ -5,6 +5,8 @@
 #include "common/security_registration.h"
 
 #include <boost/filesystem/operations.hpp>
+
+#include <manifest_parser/utils/logging.h>
 #include <security-manager.h>
 
 #include <utility>
@@ -12,7 +14,6 @@
 #include <algorithm>
 
 #include "common/utils/glist_range.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 
index 606fcf3..2c21fda 100644 (file)
@@ -9,9 +9,10 @@
 #include <utility>
 #include <vector>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace backup {
index 51a6012..6b81ef0 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "common/backup_paths.h"
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;
index 0472c79..b06ef7b 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_BACKUP_MANIFEST_H_
 #define COMMON_STEP_STEP_BACKUP_MANIFEST_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace backup {
index dca14e9..9bf3da2 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef COMMON_STEP_STEP_CHECK_BACKGROUND_CATEGORY_H_
 #define COMMON_STEP_STEP_CHECK_BACKGROUND_CATEGORY_H_
 
+#include <manifest_parser/utils/logging.h>
 #include <manifest_parser/utils/version_number.h>
 
 #include <glib.h>
@@ -12,7 +13,6 @@
 #include <string>
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index ef34ab8..8767b47 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "common/step/step_check_old_certificate.h"
 
+#include <manifest_parser/utils/logging.h>
 #include <pkgmgr-info.h>
 #include <unistd.h>
 
@@ -11,7 +12,6 @@
 #include <string>
 
 #include "common/pkgmgr_registration.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 5abf004..8a9ff3c 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_CHECK_OLD_CERTIFICATE_H_
 #define COMMON_STEP_STEP_CHECK_OLD_CERTIFICATE_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 3544692..9f8c2e0 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_CHECK_SIGNATURE_H_
 #define COMMON_STEP_STEP_CHECK_SIGNATURE_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 760d872..96a77d7 100644 (file)
@@ -5,11 +5,12 @@
 #ifndef COMMON_STEP_STEP_CONFIGURE_H_
 #define COMMON_STEP_STEP_CONFIGURE_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/pkgmgr_interface.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace configuration {
index 59e5432..f646dae 100644 (file)
@@ -6,10 +6,11 @@
 #ifndef COMMON_STEP_STEP_COPY_H_
 #define COMMON_STEP_STEP_COPY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 7e77aa7..778efa0 100644 (file)
@@ -7,9 +7,10 @@
 
 #include <boost/filesystem/path.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace backup {
index 3bcd5a5..dcd223d 100644 (file)
@@ -7,8 +7,9 @@
 
 #include <boost/filesystem/path.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 79fbb05..8d16319 100644 (file)
@@ -6,10 +6,11 @@
 #ifndef COMMON_STEP_STEP_COPY_TEP_H_
 #define COMMON_STEP_STEP_COPY_TEP_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index bc8e49a..9a73061 100644 (file)
@@ -6,12 +6,14 @@
 #define COMMON_STEP_STEP_CREATE_ICONS_H_
 
 #include <boost/filesystem/path.hpp>
+
+#include <manifest_parser/utils/logging.h>
+
 #include <utility>
 #include <vector>
 
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 16d0385..072f85c 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_CREATE_STORAGE_DIRECTORIES_H_
 #define COMMON_STEP_STEP_CREATE_STORAGE_DIRECTORIES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index cc9cf78..2e686fd 100644 (file)
@@ -5,11 +5,12 @@
 #ifndef COMMON_STEP_STEP_DELTA_PATCH_H_
 #define COMMON_STEP_STEP_DELTA_PATCH_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include <string>
 
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 82bd573..0619660 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef COMMON_STEP_STEP_FAIL_H_
 #define COMMON_STEP_STEP_FAIL_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace configuration {
index f706b32..2278753 100644 (file)
@@ -6,11 +6,12 @@
 #ifndef  COMMON_STEP_STEP_GENERATE_XML_H_
 #define  COMMON_STEP_STEP_GENERATE_XML_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include <libxml/xmlwriter.h>
 
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index e5d5633..90c9173 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_KILL_APPS_H_
 #define COMMON_STEP_STEP_KILL_APPS_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index 88da33b..a852405 100644 (file)
@@ -5,10 +5,11 @@
 #include "common/step/step_old_manifest.h"
 
 #include <boost/filesystem.hpp>
+
+#include <manifest_parser/utils/logging.h>
 #include <pkgmgr-info.h>
-#include <string>
 
-#include "common/utils/logging.h"
+#include <string>
 
 namespace common_installer {
 namespace backup {
index 35785c3..b7b8f5f 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef COMMON_STEP_STEP_OLD_MANIFEST_H_
 #define COMMON_STEP_STEP_OLD_MANIFEST_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace backup {
index 9afa862..7aa4762 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef COMMON_STEP_STEP_OPEN_RECOVERY_FILE_H_
 #define COMMON_STEP_STEP_OPEN_RECOVERY_FILE_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace recovery {
index e0fe4b7..7376554 100644 (file)
@@ -6,10 +6,11 @@
 #ifndef COMMON_STEP_STEP_PARSE_H_
 #define COMMON_STEP_STEP_PARSE_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace parse {
index d9c7b36..b9982f0 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_PRIVILEGE_COMPATIBILITY_H_
 #define COMMON_STEP_STEP_PRIVILEGE_COMPATIBILITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index b79e08f..fad6dc3 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_RECOVER_APPLICATION_H_
 #define COMMON_STEP_STEP_RECOVER_APPLICATION_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index a1ca73c..cf0a606 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_RECOVER_FILES_H_
 #define COMMON_STEP_STEP_RECOVER_FILES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 16ca97a..ce41987 100644 (file)
@@ -6,12 +6,14 @@
 #define COMMON_STEP_STEP_RECOVER_ICONS_H_
 
 #include <boost/filesystem/path.hpp>
+
+#include <manifest_parser/utils/logging.h>
+
 #include <utility>
 #include <vector>
 
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 4bfb379..d9c34f6 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_RECOVER_MANIFEST_H_
 #define COMMON_STEP_STEP_RECOVER_MANIFEST_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index 38bc2c0..f2850d6 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_RECOVER_SECURITY_H_
 #define COMMON_STEP_STEP_RECOVER_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 9584c3b..4d85e5c 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_RECOVER_STORAGE_DIRECTORIES_H_
 #define COMMON_STEP_STEP_RECOVER_STORAGE_DIRECTORIES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index ad371cd..3517b4f 100644 (file)
@@ -4,8 +4,9 @@
 
 #include "common/step/step_recovery.h"
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/request.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace recovery {
index f7ff7f3..5461eff 100644 (file)
@@ -3,9 +3,10 @@
 #ifndef COMMON_STEP_STEP_REGISTER_APP_H_
 #define COMMON_STEP_STEP_REGISTER_APP_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index 75fabc9..3e7bd70 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_REGISTER_SECURITY_H_
 #define COMMON_STEP_STEP_REGISTER_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 84ffffb..0b6a671 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef COMMON_STEP_STEP_REMOVE_FILES_H_
 #define COMMON_STEP_STEP_REMOVE_FILES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index a582250..1782044 100644 (file)
@@ -7,12 +7,13 @@
 
 #include <boost/filesystem/path.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include <utility>
 #include <vector>
 
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index cb6b6c3..091cf6b 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_REMOVE_TEMPORARY_DIRECTORY_H_
 #define COMMON_STEP_STEP_REMOVE_TEMPORARY_DIRECTORY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step_recovery.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index a652b3d..6b291d6 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_REVOKE_SECURITY_H_
 #define COMMON_STEP_STEP_REVOKE_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 9100d17..412485a 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_ROLLBACK_DEINSTALLATION_SECURITY_H_
 #define COMMON_STEP_STEP_ROLLBACK_DEINSTALLATION_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index afde537..64bc04f 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_ROLLBACK_INSTALLATION_SECURITY_H_
 #define COMMON_STEP_STEP_ROLLBACK_INSTALLATION_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index 876885d..aac1e50 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_UNREGISTER_APP_H_
 #define COMMON_STEP_STEP_UNREGISTER_APP_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index c9658a7..71f359d 100644 (file)
@@ -8,9 +8,10 @@
 
 #include <boost/filesystem/path.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace filesystem {
index ae1da1f..d823cc4 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_UPDATE_APP_H_
 #define COMMON_STEP_STEP_UPDATE_APP_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index 1ffe7b6..d29a765 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef COMMON_STEP_STEP_UPDATE_SECURITY_H_
 #define COMMON_STEP_STEP_UPDATE_SECURITY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace security {
index adf19eb..57b0a97 100644 (file)
@@ -5,9 +5,10 @@
 #ifndef COMMON_STEP_STEP_UPDATE_TEP_H_
 #define COMMON_STEP_STEP_UPDATE_TEP_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace common_installer {
 namespace pkgmgr {
index 1b97475..4924ce6 100644 (file)
 #include <boost/filesystem/path.hpp>
 #include <boost/system/error_code.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include <algorithm>
 #include <string>
 #include <vector>
 
 #include "common/utils/byte_size_literals.h"
-#include "common/utils/logging.h"
 
 namespace ba = boost::algorithm;
 namespace bs = boost::system;
diff --git a/src/common/utils/logging.h b/src/common/utils/logging.h
deleted file mode 100644 (file)
index a70d194..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2014 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.
-
-#ifndef COMMON_UTILS_LOGGING_H_
-#define COMMON_UTILS_LOGGING_H_
-
-#include <cassert>
-#include <iomanip>
-#include <iostream>
-#include <sstream>
-#include <string>
-
-namespace common_installer {
-
-enum class LogLevel {
-  LOG_ERROR,
-  LOG_WARNING,
-  LOG_INFO,
-  LOG_DEBUG,
-};
-
-template<LogLevel> struct LogTag;
-template<> struct LogTag<LogLevel::LOG_ERROR> {
-  static constexpr const char* value = "\033[1;31m| ERROR   |\033[0m";
-};
-template<> struct LogTag<LogLevel::LOG_WARNING> {
-  static constexpr const char* value = "\033[1;33m| WARNING |\033[0m";
-};
-template<> struct LogTag<LogLevel::LOG_INFO>  {
-  static constexpr const char* value = "\033[1;32m| INFO    |\033[0m";
-};
-template<> struct LogTag<LogLevel::LOG_DEBUG> {
-  static constexpr const char* value = "\033[0m| DEBUG   |\033[0m";
-};
-
-class LogCatcher {
- public:
-  LogCatcher() { }
-  void operator&(const std::ostream& str) const {
-    // TODO(tiwanek): this cast is error-prone - fix it
-    std::cerr << static_cast<const std::ostringstream*>(&str)->str()
-              << std::endl;
-  }
-};
-
-}  // namespace common_installer
-
-inline static const constexpr char* __tag_for_logging() {
-  return "";
-}
-
-// To be defined in class namespace if user want different log tag for given
-// scope
-#define SCOPE_LOG_TAG(TAG)                                                     \
-  inline static const constexpr char* __tag_for_logging() {                    \
-    return #TAG;                                                               \
-  }                                                                            \
-
-// Simple logging macro of following usage:
-//   LOG(LEVEL) << object_1 << object_2 << object_n;
-//     where:
-//       LEVEL = ERROR | WARNING | INFO | DEBUG
-#define LOG(LEVEL)                                                             \
-    ::common_installer::LogCatcher() & std::ostringstream()                    \
-      << std::string(::common_installer::LogTag<                               \
-         ::common_installer::LogLevel::LOG_ ## LEVEL>::value)                  \
-      << " " << std::setw(20) << std::left << __tag_for_logging()              \
-      << std::setw(0) << " : "                                                 \
-
-#endif  // COMMON_UTILS_LOGGING_H_
diff --git a/src/common/utils/string_util.cc b/src/common/utils/string_util.cc
deleted file mode 100644 (file)
index d800a17..0000000
+++ /dev/null
@@ -1,41 +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.
-
-// This file was rewritten completely in
-// 7c807fc0d4561d178b7c2d8b8d532f48e78ab1bc so fixing license.
-
-#include "common/utils/string_util.h"
-
-#include <cstdlib>
-#include <string>
-#include <vector>
-
-namespace common_installer {
-
-std::string DecodePercentEscapedCharacter(const std::string& path) {
-  std::vector<int> input(path.begin(), path.end());
-  std::vector<char> output;
-  unsigned i = 0;
-  while (i < input.size()) {
-    if ('%' == input[i]) {
-      if (i + 2 >= input.size())
-        return std::string();
-      char str[3] = {"\0", };
-      str[0] = input[i + 1];
-      str[1] = input[i + 2];
-      int result = strtol(str, nullptr, 16);
-      // RFC 1738 - octets 80 to FF are not allowed
-      if (result >= 128)
-        return std::string();
-      output.push_back(static_cast<char>(result));
-      i += 3;
-    } else {
-      output.push_back(static_cast<char>(input[i]));
-      ++i;
-    }
-  }
-  return std::string(output.begin(), output.end());
-}
-
-}  // namespace common_installer
diff --git a/src/common/utils/string_util.h b/src/common/utils/string_util.h
deleted file mode 100644 (file)
index d1bcba5..0000000
+++ /dev/null
@@ -1,16 +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.
-
-#ifndef COMMON_UTILS_STRING_UTIL_H_
-#define COMMON_UTILS_STRING_UTIL_H_
-
-#include <string>
-
-namespace common_installer {
-
-std::string DecodePercentEscapedCharacter(const std::string& path);
-
-}  // namespace common_installer
-
-#endif  // COMMON_UTILS_STRING_UTIL_H_
index bec8231..6538260 100644 (file)
@@ -7,6 +7,7 @@
 #include <boost/program_options.hpp>
 #include <boost/system/error_code.hpp>
 
+#include <manifest_parser/utils/logging.h>
 #include <pkgmgr-info.h>
 #include <pwd.h>
 #include <sys/types.h>
@@ -26,7 +27,7 @@
 #include "common/pkgmgr_registration.h"
 #include "common/utils/file_util.h"
 #include "common/utils/glist_range.h"
-#include "common/utils/logging.h"
+
 
 namespace bf = boost::filesystem;
 namespace bpo = boost::program_options;
index cb75a75..aab7b0d 100644 (file)
@@ -11,7 +11,6 @@
 #include "common/installer_context.h"
 #include "common/utils/file_util.h"
 #include "common/utils/glist_range.h"
-#include "common/utils/logging.h"
 
 namespace tpk {
 namespace filesystem {
index a763f68..0339cf7 100644 (file)
@@ -2,8 +2,9 @@
 #ifndef TPK_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
 #define TPK_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
-#include "common/utils/logging.h"
 
 namespace tpk {
 namespace filesystem {
index f4dcff5..297e90d 100644 (file)
@@ -6,6 +6,8 @@
 #define TPK_STEP_STEP_PARSE_H_
 
 #include <boost/filesystem.hpp>
+
+#include <manifest_parser/utils/logging.h>
 #include <tpk_manifest_handlers/privileges_handler.h>
 #include <tpk_manifest_handlers/tpk_config_parser.h>
 #include <tpk_manifest_handlers/ui_and_service_application_infos.h>
@@ -17,7 +19,6 @@
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace tpk {
 namespace parse {
index 9047af5..5522ed0 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <boost/filesystem/path.hpp>
 
-#include "common/utils/logging.h"
+#include <manifest_parser/utils/logging.h>
+
 #include "tpk/step/step_parse.h"
 
 namespace tpk {
index ce2f514..228aea7 100644 (file)
@@ -10,6 +10,8 @@
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
 #include <boost/system/error_code.hpp>
+
+#include <manifest_parser/utils/logging.h>
 #include <tpk_manifest_handlers/application_manifest_constants.h>
 #include <tpk_manifest_handlers/package_handler.h>
 #include <tpk_manifest_handlers/tpk_config_parser.h>
@@ -20,7 +22,6 @@
 #include "common/pkgmgr_registration.h"
 #include "common/request.h"
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;
index 09c1270..2df73d0 100644 (file)
@@ -1,9 +1,10 @@
 /* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
 
+#include <manifest_parser/utils/logging.h>
+
 #include <iostream>
 
 #include "common/pkgmgr_interface.h"
-#include "common/utils/logging.h"
 #include "tpk/tpk_app_query_interface.h"
 #include "tpk/tpk_installer.h"
 
index f67d229..2cb4a64 100644 (file)
@@ -38,7 +38,6 @@
 #include "common/step/step_update_app.h"
 #include "common/step/step_update_security.h"
 #include "common/step/step_update_tep.h"
-#include "common/utils/logging.h"
 #include "tpk/step/step_check_tpk_background_category.h"
 #include "tpk/step/step_create_symbolic_link.h"
 #include "tpk/step/step_parse.h"
index 1cfd78a..43acab5 100644 (file)
@@ -3,9 +3,10 @@
 #ifndef TPK_TPK_INSTALLER_H_
 #define TPK_TPK_INSTALLER_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
 #include "common/pkgmgr_interface.h"
-#include "common/utils/logging.h"
 
 namespace tpk {
 
index b9be9f9..1fd1d79 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef WGT_STEP_STEP_ADD_DEFAULT_PRIVILEGES_H_
 #define WGT_STEP_STEP_ADD_DEFAULT_PRIVILEGES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace security {
index 374499b..664e376 100644 (file)
@@ -5,11 +5,10 @@
 #include "wgt/step/step_check_settings_level.h"
 
 #include <manifest_handlers/setting_handler.h>
+#include <manifest_parser/utils/logging.h>
 
 #include <map>
 
-#include "common/utils/logging.h"
-
 #include "wgt/wgt_backend_data.h"
 
 namespace {
index 4267ab5..9e903de 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef WGT_STEP_STEP_CHECK_SETTINGS_LEVEL_H_
 #define WGT_STEP_STEP_CHECK_SETTINGS_LEVEL_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace security {
index 3b03bf7..470c065 100644 (file)
@@ -7,10 +7,11 @@
 
 #include <boost/filesystem.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace filesystem {
index 0f5041d..482b324 100644 (file)
@@ -8,6 +8,9 @@
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/system/error_code.hpp>
+
+#include <manifest_parser/utils/logging.h>
+
 #include <algorithm>
 #include <cstdio>
 #include <cstdlib>
@@ -15,7 +18,6 @@
 #include <string>
 
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace {
 
index 1f3b633..9692c05 100644 (file)
@@ -7,8 +7,9 @@
 
 #include <boost/filesystem/path.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 #include "wgt/wgt_backend_data.h"
 
 namespace wgt {
index 4009e49..69df372 100644 (file)
@@ -6,8 +6,10 @@
 #define WGT_STEP_STEP_PARSE_H_
 
 #include <boost/filesystem.hpp>
+
 #include <manifest_handlers/permissions_handler.h>
 #include <manifest_handlers/widget_config_parser.h>
+#include <manifest_parser/utils/logging.h>
 
 #include <memory>
 #include <set>
@@ -16,7 +18,6 @@
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace parse {
index e3e3c86..b5ed147 100644 (file)
@@ -5,7 +5,8 @@
 #ifndef WGT_STEP_STEP_PARSE_RECOVERY_H_
 #define WGT_STEP_STEP_PARSE_RECOVERY_H_
 
-#include "common/utils/logging.h"
+#include <manifest_parser/utils/logging.h>
+
 #include "wgt/step/step_parse.h"
 
 namespace wgt {
index 9400bd6..2bf3ef2 100644 (file)
@@ -6,8 +6,9 @@
 
 #include <boost/system/error_code.hpp>
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace rds {
index b7243cc..b98900e 100644 (file)
@@ -4,9 +4,10 @@
 
 #include "wgt/step/step_rds_parse.h"
 
+#include <manifest_parser/utils/logging.h>
+
 #include <memory>
 
-#include "common/utils/logging.h"
 #include "wgt/rds_parser.h"
 #include "wgt/wgt_backend_data.h"
 
index 6281d42..452f32b 100644 (file)
@@ -6,8 +6,7 @@
 
 #include <web_app_enc.h>
 
-#include "common/utils/logging.h"
-
+#include <manifest_parser/utils/logging.h>
 
 namespace wgt {
 namespace encrypt {
index 63068ca..16f1086 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef WGT_STEP_STEP_REMOVE_ENCRYPTION_DATA_H_
 #define WGT_STEP_STEP_REMOVE_ENCRYPTION_DATA_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace encrypt {
index 43764df..3977a33 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef WGT_STEP_STEP_WGT_COPY_STORAGE_DIRECTORIES_H_
 #define WGT_STEP_STEP_WGT_COPY_STORAGE_DIRECTORIES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step_copy_storage_directories.h"
-#include "utils/logging.h"
 
 namespace wgt {
 namespace filesystem {
index b29f7cf..d8fe7a5 100644 (file)
@@ -5,7 +5,8 @@
 #ifndef WGT_STEP_STEP_WGT_CREATE_ICONS_H_
 #define WGT_STEP_STEP_WGT_CREATE_ICONS_H_
 
-#include "common/utils/logging.h"
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step_create_icons.h"
 
 namespace wgt {
index e48be3a..44015c1 100644 (file)
@@ -5,8 +5,9 @@
 #ifndef WGT_STEP_STEP_WGT_CREATE_STORAGE_DIRECTORIES_H_
 #define WGT_STEP_STEP_WGT_CREATE_STORAGE_DIRECTORIES_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/step/step_create_storage_directories.h"
-#include "utils/logging.h"
 
 namespace wgt {
 namespace filesystem {
index 617fc46..26332e4 100644 (file)
@@ -7,7 +7,6 @@
 #include <boost/filesystem/path.hpp>
 
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;
index 9689dce..3ff8289 100644 (file)
@@ -5,10 +5,11 @@
 #ifndef WGT_STEP_STEP_WGT_RESOURCE_DIRECTORY_H_
 #define WGT_STEP_STEP_WGT_RESOURCE_DIRECTORY_H_
 
+#include <manifest_parser/utils/logging.h>
+
 #include "common/app_installer.h"
 #include "common/installer_context.h"
 #include "common/step/step.h"
-#include "common/utils/logging.h"
 
 namespace wgt {
 namespace filesystem {
index 4631d7c..cbd921a 100644 (file)
@@ -15,6 +15,7 @@
 #include <manifest_handlers/tizen_application_handler.h>
 #include <manifest_handlers/widget_handler.h>
 #include <manifest_parser/manifest_parser.h>
+#include <manifest_parser/utils/logging.h>
 
 #include <memory>
 #include <string>
@@ -23,7 +24,6 @@
 #include "common/pkgmgr_registration.h"
 #include "common/request.h"
 #include "common/utils/file_util.h"
-#include "common/utils/logging.h"
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;