Change prefix rsc to res 20/262720/3
authorJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 18 Aug 2021 10:21:51 +0000 (19:21 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 20 Aug 2021 03:19:19 +0000 (12:19 +0900)
"res" is more common word for representing "resource" than "rsc".

Change-Id: I32c71d86a056a1c5127282e9fe0d69db8bc6e627
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
39 files changed:
CMakeLists.txt
packaging/pkgmgr-tool.spec
src/CMakeLists.txt
src/res-copy/CMakeLists.txt [moved from src/rsc-copy/CMakeLists.txt with 66% similarity]
src/res-copy/include/abstract_request_handler.hh [moved from src/rsc-copy/include/abstract_request_handler.hh with 83% similarity]
src/res-copy/include/condition_validator.hh [moved from src/rsc-copy/include/condition_validator.hh with 80% similarity]
src/res-copy/include/copy_request_handler.hh [moved from src/rsc-copy/include/copy_request_handler.hh with 89% similarity]
src/res-copy/include/error_type.hh [moved from src/rsc-copy/include/error_type.hh with 94% similarity]
src/res-copy/include/event_signal_sender.hh [moved from src/rsc-copy/include/event_signal_sender.hh with 96% similarity]
src/res-copy/include/file_util.hh [moved from src/rsc-copy/include/file_util.hh with 96% similarity]
src/res-copy/include/logging.hh [moved from src/rsc-copy/include/logging.hh with 100% similarity]
src/res-copy/include/param_checker.hh [moved from src/rsc-copy/include/param_checker.hh with 86% similarity]
src/res-copy/include/remove_request_handler.hh [moved from src/rsc-copy/include/remove_request_handler.hh with 89% similarity]
src/res-copy/include/request_handler_invoker.hh [moved from src/rsc-copy/include/request_handler_invoker.hh with 95% similarity]
src/res-copy/include/request_type.hh [moved from src/rsc-copy/include/request_type.hh with 94% similarity]
src/res-copy/include/res_handler.hh [moved from src/rsc-copy/include/rsc_handler.hh with 76% similarity]
src/res-copy/include/res_path_info.hh [moved from src/rsc-copy/include/rsc_path_info.hh with 79% similarity]
src/res-copy/include/uninstall_request_handler.hh [moved from src/rsc-copy/include/uninstall_request_handler.hh with 87% similarity]
src/res-copy/src/abstract_request_handler.cc [moved from src/rsc-copy/src/abstract_request_handler.cc with 85% similarity]
src/res-copy/src/condition_validator.cc [moved from src/rsc-copy/src/condition_validator.cc with 85% similarity]
src/res-copy/src/copy_request_handler.cc [moved from src/rsc-copy/src/copy_request_handler.cc with 95% similarity]
src/res-copy/src/event_signal_sender.cc [moved from src/rsc-copy/src/event_signal_sender.cc with 96% similarity]
src/res-copy/src/file_util.cc [moved from src/rsc-copy/src/file_util.cc with 99% similarity]
src/res-copy/src/logging.cc [moved from src/rsc-copy/src/logging.cc with 95% similarity]
src/res-copy/src/param_checker.cc [moved from src/rsc-copy/src/param_checker.cc with 96% similarity]
src/res-copy/src/remove_request_handler.cc [moved from src/rsc-copy/src/remove_request_handler.cc with 93% similarity]
src/res-copy/src/request_handler_invoker.cc [moved from src/rsc-copy/src/request_handler_invoker.cc with 98% similarity]
src/res-copy/src/res_copy_main.cc [moved from src/rsc-copy/src/rsc_copy_main.cc with 93% similarity]
src/res-copy/src/res_handler.cc [moved from src/rsc-copy/src/rsc_handler.cc with 78% similarity]
src/res-copy/src/res_path_info.cc [moved from src/rsc-copy/src/rsc_path_info.cc with 73% similarity]
src/res-copy/src/uninstall_request_handler.cc [moved from src/rsc-copy/src/uninstall_request_handler.cc with 93% similarity]
tests/unit_tests/CMakeLists.txt
tests/unit_tests/res-copy/data/apps_rw/test_pkg/data/resource_dir1/resource_dir2/resource_file2.txt [moved from tests/unit_tests/rsc-copy/data/apps_rw/test_pkg/data/resource_dir1/resource_dir2/resource_file2.txt with 100% similarity]
tests/unit_tests/res-copy/data/apps_rw/test_pkg/data/resource_dir1/resource_file3.txt [moved from tests/unit_tests/rsc-copy/data/apps_rw/test_pkg/data/resource_dir1/resource_file3.txt with 100% similarity]
tests/unit_tests/res-copy/data/apps_rw/test_pkg/data/resource_file.txt [moved from tests/unit_tests/rsc-copy/data/apps_rw/test_pkg/data/resource_file.txt with 100% similarity]
tests/unit_tests/res-copy/src/test_condition_validator.cc [moved from tests/unit_tests/rsc-copy/src/test_condition_validator.cc with 76% similarity]
tests/unit_tests/res-copy/src/test_param_checker.cc [moved from tests/unit_tests/rsc-copy/src/test_param_checker.cc with 80% similarity]
tests/unit_tests/res-copy/src/test_request_handler.cc [moved from tests/unit_tests/rsc-copy/src/test_request_handler.cc with 78% similarity]
tests/unit_tests/res-copy/src/test_request_handler_invoker.cc [moved from tests/unit_tests/rsc-copy/src/test_request_handler_invoker.cc with 85% similarity]

index 6579898..adb4e43 100644 (file)
@@ -16,7 +16,7 @@ SET(TARGET_PKG_GETSIZE "pkg_getsize")
 SET(TARGET_PKG_CLEARDATA "pkg_cleardata")
 SET(TARGET_INSTALL_PRELOAD_PKG "install_preload_pkg")
 SET(TARGET_PKG_UPGRADE "pkg_upgrade")
-SET(TARGET_RSC_COPY "rsc-copy")
+SET(TARGET_RES_COPY "res-copy")
 SET(TARGET_RSC_SLICE "rsc-slice")
 
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
index a15b27b..2562d5a 100644 (file)
@@ -111,7 +111,7 @@ update-mime-database %{_datadir}/mime
 %{_bindir}/pkg_cleardata
 %{_bindir}/pkginfo
 %{_bindir}/rsc-slice
-%{_bindir}/rsc-copy
+%{_bindir}/res-copy
 %{_bindir}/pkg_upgrade
 %attr(0755,root,root) %{_bindir}/install_preload_pkg
 %{_datadir}/mime/packages/mime.wac.xml
index 3812999..26e73c4 100644 (file)
@@ -4,5 +4,5 @@ ADD_SUBDIRECTORY(pkg_getsize)
 ADD_SUBDIRECTORY(pkg_upgrade)
 ADD_SUBDIRECTORY(pkgcmd)
 ADD_SUBDIRECTORY(pkginfo)
-ADD_SUBDIRECTORY(rsc-copy)
+ADD_SUBDIRECTORY(res-copy)
 ADD_SUBDIRECTORY(rsc-slice)
similarity index 66%
rename from src/rsc-copy/CMakeLists.txt
rename to src/res-copy/CMakeLists.txt
index 56bc952..1e960e1 100644 (file)
@@ -3,10 +3,10 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src SRCS)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
 # Target - definition
-ADD_EXECUTABLE(${TARGET_RSC_COPY} ${SRCS})
+ADD_EXECUTABLE(${TARGET_RES_COPY} ${SRCS})
 
 # Dependency
-APPLY_PKG_CONFIG(${TARGET_RSC_COPY} PUBLIC
+APPLY_PKG_CONFIG(${TARGET_RES_COPY} PUBLIC
   AUL_DEPS
   GLIB_DEPS
   BUNDLE_DEPS
@@ -16,4 +16,4 @@ APPLY_PKG_CONFIG(${TARGET_RSC_COPY} PUBLIC
 )
 
 # Install
-INSTALL(TARGETS ${TARGET_RSC_COPY} DESTINATION bin)
\ No newline at end of file
+INSTALL(TARGETS ${TARGET_RES_COPY} DESTINATION bin)
\ No newline at end of file
 #include <string>
 
 #include "include/error_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class AbstractRequestHandler {
  public:
   AbstractRequestHandler(
-      std::string pkgid, std::string root_path, std::list<RscPathInfo> path_list) :
+      std::string pkgid, std::string root_path, std::list<ResPathInfo> path_list) :
       pkgid_(pkgid), root_path_(root_path), path_list_(path_list) {};
 
   virtual ErrorType Execute() = 0;
@@ -37,14 +37,14 @@ class AbstractRequestHandler {
  protected:
   std::string GetRootPath();
   const std::string GetPkgID() const;
-  const std::list<RscPathInfo> GetPathList() const;
+  const std::list<ResPathInfo> GetPathList() const;
 
  private:
   std::string pkgid_;
   std::string root_path_;
-  std::list<RscPathInfo> path_list_;
+  std::list<ResPathInfo> path_list_;
 };
 
-}  // rsc_handler
+}  // namespace res_handler
 
 #endif  // ABSTRACT_REQUEST_HANDLER_HH_
similarity index 80%
rename from src/rsc-copy/include/condition_validator.hh
rename to src/res-copy/include/condition_validator.hh
index 6a1d451..ca10a5a 100644 (file)
 #include <string>
 
 #include "include/error_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 #include "include/request_type.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class ConditionValidator {
  public:
   ConditionValidator(std::string pkgid, uid_t uid);
   ErrorType ValidateCondition(ReqType req_type,
-      std::list<RscPathInfo> path_list);
+      std::list<ResPathInfo> path_list);
 
  private:
   std::string pkgid_;
   std::string root_path_;
   uid_t uid_;
 
-  ErrorType CheckCopyRequest(std::list<RscPathInfo> path_list);
-  ErrorType CheckRemoveRequest(std::list<RscPathInfo> path_list);
+  ErrorType CheckCopyRequest(std::list<ResPathInfo> path_list);
+  ErrorType CheckRemoveRequest(std::list<ResPathInfo> path_list);
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // CONDITION_VALIDATOR_HH_
similarity index 89%
rename from src/rsc-copy/include/copy_request_handler.hh
rename to src/res-copy/include/copy_request_handler.hh
index c723929..66bb747 100644 (file)
 
 #include "include/abstract_request_handler.hh"
 #include "include/error_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class CopyRequestHandler : public AbstractRequestHandler {
  public:
   CopyRequestHandler(std::string pkgid, std::string root_path,
-      std::list<RscPathInfo> path_list);
+      std::list<ResPathInfo> path_list);
 
   ErrorType Execute() override;
   const std::string GetRequestHandlerType() const override;
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // COPY_REQUEST_HANDLER_HH_
similarity index 94%
rename from src/rsc-copy/include/error_type.hh
rename to src/res-copy/include/error_type.hh
index df9701d..3d25689 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef ERROR_TYPE_HH_
 #define ERROR_TYPE_HH_
 
-namespace rsc_handler {
+namespace res_handler {
 
 enum ErrorType {
   ERROR_NONE = 0,
@@ -30,6 +30,6 @@ enum ErrorType {
   ERROR_OUT_OF_MEMORY
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // ERROR_TYPE_HH_
similarity index 96%
rename from src/rsc-copy/include/event_signal_sender.hh
rename to src/res-copy/include/event_signal_sender.hh
index 3e42451..9bb5fb3 100644 (file)
@@ -22,7 +22,7 @@
 #include "include/error_type.hh"
 #include "include/request_type.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class EventSignalSender {
  public:
@@ -38,6 +38,6 @@ class EventSignalSender {
   ReqType req_type_;
 };
 
-}  // rsc_handler
+}  // res_handler
 
 #endif  // PARAM_CHECKER_HH_
similarity index 96%
rename from src/rsc-copy/include/file_util.hh
rename to src/res-copy/include/file_util.hh
index 0e6d431..bcb786e 100644 (file)
@@ -21,7 +21,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/path.hpp>
 
-namespace rsc_handler {
+namespace res_handler {
 
 // TODO(jungh.yeon) : is this necessary?
 enum FSFlag : int {
@@ -45,6 +45,6 @@ bool CopyFile(const boost::filesystem::path& src,
 
 bool RemoveAll(const boost::filesystem::path& path);
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // FILE_UTIL_HH_
similarity index 86%
rename from src/rsc-copy/include/param_checker.hh
rename to src/res-copy/include/param_checker.hh
index 4e66107..437a0e2 100644 (file)
@@ -21,9 +21,9 @@
 #include <string>
 
 #include "include/request_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class ParamChecker {
  public:
@@ -31,11 +31,11 @@ class ParamChecker {
   ReqType GetRequestType();
   std::string GetPkgID() const;
   uid_t GetUID() const;
-  const std::list<RscPathInfo>& GetPathList() const;
+  const std::list<ResPathInfo>& GetPathList() const;
   bool Validate();
 
  private:
-  std::list<RscPathInfo> path_info_list_;
+  std::list<ResPathInfo> path_info_list_;
   std::string pkgid_;
   std::string session_id_;
   uid_t uid_ = 0;
@@ -45,6 +45,6 @@ class ParamChecker {
   bool ValidatePkgID();
 };
 
-}  // rsc_handler
+}  // res_handler
 
 #endif  // PARAM_CHECKER_HH_
 
 #include "include/abstract_request_handler.hh"
 #include "include/error_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class RemoveRequestHandler : public AbstractRequestHandler {
  public:
   RemoveRequestHandler(
       std::string pkgid, std::string root_path,
-      std::list<RscPathInfo> path_list);
+      std::list<ResPathInfo> path_list);
 
   ErrorType Execute() override;
   const std::string GetRequestHandlerType() const override;
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // REMOVE_REQUEST_HANDLER_HH_
@@ -24,7 +24,7 @@
 #include "include/event_signal_sender.hh"
 #include "include/param_checker.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class RequestHandlerInvoker {
  public:
@@ -42,6 +42,6 @@ class RequestHandlerInvoker {
   void SetReqHandler();
 };
 
-}  // rsc_handler
+}  // namespace res_handler
 
 #endif  // REQUEST_HANDLER_INVOKER_HH_
similarity index 94%
rename from src/rsc-copy/include/request_type.hh
rename to src/res-copy/include/request_type.hh
index dbd5022..7cf97b7 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef REQUEST_TYPE_HH_
 #define REQUEST_TYPE_HH_
 
-namespace rsc_handler {
+namespace res_handler {
 
 enum ReqType {
   REQ_TYPE_NEW = 0,
@@ -26,6 +26,6 @@ enum ReqType {
   REQ_TYPE_UNKNOWN
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // REQUEST_TYPE_HH_
similarity index 76%
rename from src/rsc-copy/include/rsc_handler.hh
rename to src/res-copy/include/res_handler.hh
index 9eeb314..c0bff45 100644 (file)
  * limitations under the License.
  */
 
-#ifndef RSC_HANDLER_HH_
-#define RSC_HANDLER_HH_
+#ifndef RES_HANDLER_HH_
+#define RES_HANDLER_HH_
 
 #include <memory>
 
 #include "include/request_handler_invoker.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
-class RscHandler {
+class ResHandler {
  public:
-  RscHandler() {};
-  //~RscHandler();
+  ResHandler() {};
   bool Init(int argc, char* argv[]);
   bool Run();
 
  private:
-  std::unique_ptr<rsc_handler::RequestHandlerInvoker> handler_;
+  std::unique_ptr<res_handler::RequestHandlerInvoker> handler_;
 };
 
-}  // rsc_handler
+}  // namespace res_handler
 
-#endif  // RSC_HANDLER_HH_
+#endif  // RES_HANDLER_HH_
similarity index 79%
rename from src/rsc-copy/include/rsc_path_info.hh
rename to src/res-copy/include/res_path_info.hh
index 089bb84..d85fb57 100644 (file)
  * limitations under the License.
  */
 
-#ifndef RSC_PATH_INFO_HH_
-#define RSC_PATH_INFO_HH_
+#ifndef RES_PATH_INFO_HH_
+#define RES_PATH_INFO_HH_
 
 #include <string>
 
-namespace rsc_handler {
+namespace res_handler {
 
-class RscPathInfo {
+class ResPathInfo {
  public:
-  RscPathInfo(std::string src, std::string dst);
+  ResPathInfo(std::string src, std::string dst);
 
   const std::string& GetSrcPath() const;
   const std::string& GetDstPath() const;
@@ -33,6 +33,6 @@ class RscPathInfo {
   std::string dst_;
 };
 
-}  // rsc_handler
+}  // namespace res_handler
 
-#endif  // RSC_PATH_INFO_HH_
+#endif  // RES_PATH_INFO_HH_
 
 #include "include/abstract_request_handler.hh"
 #include "include/error_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 class UninstallRequestHandler : public AbstractRequestHandler {
  public:
   UninstallRequestHandler(
-      std::string pkgid, std::string root_path, std::list<RscPathInfo> path_list);
+      std::string pkgid, std::string root_path, std::list<ResPathInfo> path_list);
 
   ErrorType Execute() override;
   const std::string GetRequestHandlerType() const override;
 };
 
-}  // namespace rsc_handler
+}  // namespace res_handler
 
 #endif  // UNINSTALL_REQUEST_HANDLER_HH_
similarity index 85%
rename from src/rsc-copy/src/abstract_request_handler.cc
rename to src/res-copy/src/abstract_request_handler.cc
index d35bea0..24f34f7 100644 (file)
@@ -20,9 +20,9 @@
 #include <iostream>
 
 #include "include/request_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 std::string AbstractRequestHandler::GetRootPath() {
   return root_path_;
@@ -32,8 +32,8 @@ const std::string AbstractRequestHandler::GetPkgID() const {
   return pkgid_;
 }
 
-const std::list<RscPathInfo> AbstractRequestHandler::GetPathList() const {
+const std::list<ResPathInfo> AbstractRequestHandler::GetPathList() const {
   return path_list_;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 85%
rename from src/rsc-copy/src/condition_validator.cc
rename to src/res-copy/src/condition_validator.cc
index 46b2315..095cb6e 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "include/logging.hh"
 #include "include/request_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 #include <pkgmgr-info.h>
 
@@ -115,7 +115,7 @@ int64_t GetDirectorySize(const bf::path& path) {
 
 }  // namespace
 
-namespace rsc_handler {
+namespace res_handler {
 
 ConditionValidator::ConditionValidator(std::string pkgid, uid_t uid) :
     pkgid_(pkgid), uid_(uid) {
@@ -123,7 +123,7 @@ ConditionValidator::ConditionValidator(std::string pkgid, uid_t uid) :
 }
 
 ErrorType ConditionValidator::ValidateCondition(ReqType req_type,
-      std::list<RscPathInfo> path_list) {
+      std::list<ResPathInfo> path_list) {
   if (!IsPackageExists(pkgid_, uid_))
     return ErrorType::ERROR_PKG_NOT_FOUND;
 
@@ -136,27 +136,28 @@ ErrorType ConditionValidator::ValidateCondition(ReqType req_type,
 }
 
 ErrorType ConditionValidator::CheckCopyRequest(
-    std::list<RscPathInfo> path_list) {
+    std::list<ResPathInfo> path_list) {
   boost::filesystem::path src_root_path(root_path_);
-  uintmax_t rsc_size = 0;
+  uintmax_t res_size = 0;
 
   src_root_path = src_root_path / "apps_rw" / pkgid_;
   for (auto& path_info : path_list) {
-    boost::filesystem::path rsc_path(src_root_path);
-    rsc_path = rsc_path  / path_info.GetSrcPath();
-    if (!boost::filesystem::exists(rsc_path)) {
-      LOG(ERROR) << "Resource not exists : " << rsc_path;
+    boost::filesystem::path res_path(src_root_path);
+    res_path = res_path  / path_info.GetSrcPath();
+    if (!boost::filesystem::exists(res_path)) {
+      LOG(ERROR) << "Resource not exists : " << res_path;
       return ErrorType::ERROR_RES_NOT_FOUND;
     }
 
-    if (boost::filesystem::is_directory(rsc_path))
-      rsc_size += GetDirectorySize(rsc_path);
+    if (boost::filesystem::is_directory(res_path))
+      res_size += GetDirectorySize(res_path);
     else
-      rsc_size += boost::filesystem::file_size(rsc_path);
+      res_size += boost::filesystem::file_size(res_path);
+
   }
-  LOG(INFO) << "Required size for resource: " << rsc_size;
+  LOG(INFO) << "Required size for resource: " << res_size;
 
-  if (!CheckFreeSpaceAtPath(static_cast<int64_t>(rsc_size), root_path_)) {
+  if (!CheckFreeSpaceAtPath(static_cast<int64_t>(res_size), root_path_)) {
     LOG(ERROR) << "Not enough space for resource";
     return ErrorType::ERROR_OUT_OF_SPACE;
   }
@@ -165,7 +166,7 @@ ErrorType ConditionValidator::CheckCopyRequest(
 }
 
 ErrorType ConditionValidator::CheckRemoveRequest(
-    std::list<RscPathInfo> path_list) {
+    std::list<ResPathInfo> path_list) {
   for (auto& path_info : path_list) {
     boost::filesystem::path dst_path(root_path_);
     dst_path = dst_path / "shared_res"/ pkgid_ / path_info.GetDstPath();
@@ -178,4 +179,4 @@ ErrorType ConditionValidator::CheckRemoveRequest(
   return ErrorType::ERROR_NONE;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 95%
rename from src/rsc-copy/src/copy_request_handler.cc
rename to src/res-copy/src/copy_request_handler.cc
index b4ce458..ff76159 100644 (file)
@@ -27,7 +27,7 @@
 #include "include/error_type.hh"
 #include "include/file_util.hh"
 #include "include/logging.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 namespace bf = boost::filesystem;
 
@@ -37,11 +37,11 @@ constexpr char kCopyReqHandlerType[] = "copy";
 
 }  // namespace
 
-namespace rsc_handler {
+namespace res_handler {
 
 CopyRequestHandler::CopyRequestHandler(
     std::string pkgid, std::string root_path,
-    std::list<RscPathInfo> path_list) :
+    std::list<ResPathInfo> path_list) :
   AbstractRequestHandler(pkgid, root_path, path_list) {}
 
 ErrorType CopyRequestHandler::Execute() {
@@ -85,4 +85,4 @@ const std::string CopyRequestHandler::GetRequestHandlerType() const {
   return kCopyReqHandlerType;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 96%
rename from src/rsc-copy/src/event_signal_sender.cc
rename to src/res-copy/src/event_signal_sender.cc
index 81fbafe..332ca27 100644 (file)
@@ -23,7 +23,7 @@
 #include "include/error_type.hh"
 #include "include/request_type.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
 bool EventSignalSender::SendStart() {
   std::cout << "EventSignalSender::SendStart" << std::endl;
@@ -51,4 +51,4 @@ void EventSignalSender::SetReqType(ReqType req_type) {
   req_type_ = req_type;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 99%
rename from src/rsc-copy/src/file_util.cc
rename to src/res-copy/src/file_util.cc
index 322d034..87cf65d 100644 (file)
@@ -29,7 +29,7 @@
 namespace bs = boost::system;
 namespace bf = boost::filesystem;
 
-namespace rsc_handler {
+namespace res_handler {
 
 FSFlag operator|(FSFlag a, FSFlag b) {
   return static_cast<FSFlag>(static_cast<int>(a) | static_cast<int>(b));
@@ -226,4 +226,4 @@ bool CopyFile(const bf::path& src, const bf::path& dst) {
   return true;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 95%
rename from src/rsc-copy/src/logging.cc
rename to src/res-copy/src/logging.cc
index 5e2a5d6..39bb6bc 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a apache 2.0 license that can be
 // found in the LICENSE file.
 
-#include "logging.hh"
+#include "include/logging.hh"
 
 namespace utils {
 
similarity index 96%
rename from src/rsc-copy/src/param_checker.cc
rename to src/res-copy/src/param_checker.cc
index f319715..259974a 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "include/logging.hh"
 #include "include/request_type.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 #include <pkgmgr-info.h>
 
@@ -35,7 +35,7 @@
 namespace bs = boost::system;
 namespace bpo = boost::program_options;
 
-namespace rsc_handler {
+namespace res_handler {
 
 ParamChecker::ParamChecker(int argc, char* argv[]) {
   bpo::options_description options;
@@ -90,7 +90,7 @@ ReqType ParamChecker::GetRequestType() {
   return req_type_;
 }
 
-const std::list<RscPathInfo>& ParamChecker::GetPathList() const {
+const std::list<ResPathInfo>& ParamChecker::GetPathList() const {
   return path_info_list_;
 }
 
@@ -136,4 +136,4 @@ bool ParamChecker::ValidatePkgID() {
   return true;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 93%
rename from src/rsc-copy/src/remove_request_handler.cc
rename to src/res-copy/src/remove_request_handler.cc
index af7581b..b6fdb74 100644 (file)
@@ -27,7 +27,7 @@
 #include "include/error_type.hh"
 #include "include/file_util.hh"
 #include "include/logging.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 namespace bf = boost::filesystem;
 
@@ -37,11 +37,11 @@ constexpr char kRemoveReqHandlerType[] = "remove";
 
 }  // namespace
 
-namespace rsc_handler {
+namespace res_handler {
 
 RemoveRequestHandler::RemoveRequestHandler(
     std::string pkgid, std::string root_path,
-    std::list<RscPathInfo> path_list) :
+    std::list<ResPathInfo> path_list) :
   AbstractRequestHandler(pkgid, root_path, path_list) {}
 
 ErrorType RemoveRequestHandler::Execute() {
@@ -71,4 +71,4 @@ const std::string RemoveRequestHandler::GetRequestHandlerType() const {
   return kRemoveReqHandlerType;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 98%
rename from src/rsc-copy/src/request_handler_invoker.cc
rename to src/res-copy/src/request_handler_invoker.cc
index 2b95f57..c8415a9 100644 (file)
@@ -42,7 +42,7 @@ std::string GetRootPathForUid(uid_t uid) {
 
 }  // namespace
 
-namespace rsc_handler {
+namespace res_handler {
 
 RequestHandlerInvoker::RequestHandlerInvoker(
     ParamChecker option, EventSignalSender signal) :
@@ -116,4 +116,4 @@ void RequestHandlerInvoker::SetReqHandler() {
   }
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 93%
rename from src/rsc-copy/src/rsc_copy_main.cc
rename to src/res-copy/src/res_copy_main.cc
index 445baf3..e2f084d 100644 (file)
 
 #include <iostream>
 
-#include "include/rsc_handler.hh"
+#include "include/res_handler.hh"
 #include "include/logging.hh"
 
 int main(int argc, char *argv[]) {
   try {
-    rsc_handler::RscHandler handler;
+    res_handler::ResHandler handler;
     if (!handler.Init(argc, argv)) {
       LOG(ERROR) << "Failed to initliaze handler";
       return -1;
similarity index 78%
rename from src/rsc-copy/src/rsc_handler.cc
rename to src/res-copy/src/res_handler.cc
index b954e50..b15b030 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "include/rsc_handler.hh"
+#include "include/res_handler.hh"
 
 #include <iostream>
 
 #include "include/param_checker.hh"
 #include "include/request_handler_invoker.hh"
 
-namespace rsc_handler {
+namespace res_handler {
 
-bool RscHandler::Init(int argc, char* argv[]) {
-  rsc_handler::ParamChecker option(argc, argv);
+bool ResHandler::Init(int argc, char* argv[]) {
+  res_handler::ParamChecker option(argc, argv);
   if (!option.Validate()) {
     LOG(ERROR) << "Invalid argument has given";
     return false;
   }
 
-  rsc_handler::EventSignalSender signal;
+  res_handler::EventSignalSender signal;
   signal.SetPkgID(option.GetPkgID());
   signal.SetReqType(option.GetRequestType());
 
-  handler_.reset(new rsc_handler::RequestHandlerInvoker(option, signal));
+  handler_.reset(new res_handler::RequestHandlerInvoker(option, signal));
   if (!handler_->Validate()) {
     LOG(ERROR) << "Failed to initialize request handler";
     return false;
@@ -45,8 +45,8 @@ bool RscHandler::Init(int argc, char* argv[]) {
   return true;
 }
 
-bool RscHandler::Run() {
+bool ResHandler::Run() {
   return handler_->Execute();
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
similarity index 73%
rename from src/rsc-copy/src/rsc_path_info.cc
rename to src/res-copy/src/res_path_info.cc
index 8e4e37f..56e07df 100644 (file)
  * limitations under the License.
  */
 
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 #include <iostream>
 #include <string>
 
-namespace rsc_handler {
+namespace res_handler {
 
-RscPathInfo::RscPathInfo(std::string src, std::string dst) :
+ResPathInfo::ResPathInfo(std::string src, std::string dst) :
   src_(src), dst_(dst) {}
 
-const std::string& RscPathInfo::GetSrcPath() const {
+const std::string& ResPathInfo::GetSrcPath() const {
   return src_;
 }
 
-const std::string& RscPathInfo::GetDstPath() const {
+const std::string& ResPathInfo::GetDstPath() const {
   return dst_;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
@@ -24,7 +24,7 @@
 #include "include/error_type.hh"
 #include "include/file_util.hh"
 #include "include/logging.hh"
-#include "include/rsc_path_info.hh"
+#include "include/res_path_info.hh"
 
 namespace bf = boost::filesystem;
 
@@ -34,11 +34,11 @@ constexpr char kUninstallReqHandlerType[] = "delete";
 
 }  // namespace
 
-namespace rsc_handler {
+namespace res_handler {
 
 UninstallRequestHandler::UninstallRequestHandler(
     std::string pkgid, std::string root_path,
-    std::list<RscPathInfo> path_list) :
+    std::list<ResPathInfo> path_list) :
   AbstractRequestHandler(pkgid, root_path, path_list) {}
 
 ErrorType UninstallRequestHandler::Execute() {
@@ -65,4 +65,4 @@ const std::string UninstallRequestHandler::GetRequestHandlerType() const {
   return kUninstallReqHandlerType;
 }
 
-}  // namespace rsc_handler
+}  // namespace res_handler
index 37bfcb4..7591000 100644 (file)
@@ -25,7 +25,7 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DDB_PATH=\"${DB_PATH}\"")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/pkg_upgrade/include)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/rsc-copy/)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/res-copy/)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
 
 #pkg_upgrade
@@ -33,20 +33,20 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/pkg_upgrade/src PKG_UPGRADE_SRC
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../src/pkg_upgrade/src PKG_UPGRADE_LIB_SOURCES)
 LIST(REMOVE_ITEM PKG_UPGRADE_LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/pkg_upgrade/src/main.cc)
 
-#rsc-copy
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/rsc-copy/src RSC_COPY_SRCS)
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../src/rsc-copy/src RSC_COPY_LIB_SOURCES)
-LIST(REMOVE_ITEM RSC_COPY_LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/rsc-copy/src/rsc_copy_main.cc)
-LIST(REMOVE_ITEM RSC_COPY_LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/rsc-copy/src/logging.cc)
+#res-copy
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/res-copy/src RES_COPY_SRCS)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../src/res-copy/src RES_COPY_LIB_SOURCES)
+LIST(REMOVE_ITEM RES_COPY_LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/res-copy/src/res_copy_main.cc)
+LIST(REMOVE_ITEM RES_COPY_LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/res-copy/src/logging.cc)
 
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../mock MOCK_SOURCES)
 
 ADD_EXECUTABLE(${PROJECT_NAME}
        ${PKG_UPGRADE_SRCS}
-    ${RSC_COPY_SRCS}
+    ${RES_COPY_SRCS}
        ${MOCK_SOURCES}
        ${PKG_UPGRADE_LIB_SOURCES}
-    ${RSC_COPY_LIB_SOURCES}
+    ${RES_COPY_LIB_SOURCES}
     test_main.cc
 )
 
@@ -35,8 +35,8 @@ using ::testing::SetArgPointee;
 using ::testing::InvokeArgument;
 using ::testing::SaveArg;
 
-using rsc_handler::ConditionValidator;
-using rsc_handler::ParamChecker;
+using res_handler::ConditionValidator;
+using res_handler::ParamChecker;
 
 class Mocks : public ::testing::NiceMock<PkgMgrInfoMock>,
     public ::testing::NiceMock<OsMock> {};
@@ -59,77 +59,77 @@ TEST_F(ConditionValidatorTest, PkgNotExist) {
   EXPECT_CALL(GetMock<PkgMgrInfoMock>(), pkgmgrinfo_pkginfo_get_usr_pkginfo(_, _, _))
             .WillRepeatedly(Return(-1));
 
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--copy",
       "org.test.targetpkgid", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_PKG_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_PKG_NOT_FOUND);
 }
 
 TEST_F(ConditionValidatorTest, CopyPkgNotExist) {
   EXPECT_CALL(GetMock<PkgMgrInfoMock>(), pkgmgrinfo_pkginfo_get_usr_pkginfo(_, _, _))
             .WillRepeatedly(Return(-1));
 
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--copy",
       "org.test.targetpkgid", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_PKG_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_PKG_NOT_FOUND);
 }
 
 TEST_F(ConditionValidatorTest, CopySrcNotExist) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--copy",
       "org.test.targetpkgid", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_RES_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_RES_NOT_FOUND);
 }
 
 TEST_F(ConditionValidatorTest, RemovePkgNotExist) {
   EXPECT_CALL(GetMock<PkgMgrInfoMock>(), pkgmgrinfo_pkginfo_get_usr_pkginfo(_, _, _))
             .WillRepeatedly(Return(-1));
 
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--remove",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--remove",
       "org.test.targetpkgid", "-p", "", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_PKG_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_PKG_NOT_FOUND);
 }
 
 TEST_F(ConditionValidatorTest, RemoveSrcNotExist) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--remove",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--remove",
       "org.test.targetpkgid", "-p", "", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_RES_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_RES_NOT_FOUND);
 }
 
 TEST_F(ConditionValidatorTest, DeletePkgNotExist) {
   EXPECT_CALL(GetMock<PkgMgrInfoMock>(), pkgmgrinfo_pkginfo_get_usr_pkginfo(_, _, _))
             .WillRepeatedly(Return(-1));
 
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--delete",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--delete",
       "org.test.targetpkgid", nullptr};
   ParamChecker checker(5, (char**)argv);
   ConditionValidator validator(checker.GetPkgID(), checker.GetUID());
-  rsc_handler::ErrorType ret = validator.ValidateCondition(
+  res_handler::ErrorType ret = validator.ValidateCondition(
       checker.GetRequestType(), checker.GetPathList());
 
-  EXPECT_EQ(ret, rsc_handler::ErrorType::ERROR_PKG_NOT_FOUND);
+  EXPECT_EQ(ret, res_handler::ErrorType::ERROR_PKG_NOT_FOUND);
 }
 
@@ -34,7 +34,7 @@ using ::testing::SetArgPointee;
 using ::testing::InvokeArgument;
 using ::testing::SaveArg;
 
-using rsc_handler::ParamChecker;
+using res_handler::ParamChecker;
 
 class Mocks : public ::testing::NiceMock<PkgMgrInfoMock>,
     public ::testing::NiceMock<OsMock> {};
@@ -54,7 +54,7 @@ class ParamCheckerTest : public TestFixture {
 };
 
 TEST_F(ParamCheckerTest, InvalidUIDTest) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "0", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "0", "--copy",
       "org.test.targetpkgid", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
 
@@ -62,54 +62,54 @@ TEST_F(ParamCheckerTest, InvalidUIDTest) {
 }
 
 TEST_F(ParamCheckerTest, PkgIDNotGiven) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001",
       "-p", "srcpath", "dstpath", "--copy", "", nullptr};
   ParamChecker checker(8, (char**)argv);
 
   EXPECT_EQ(checker.Validate(), false);
 }
 
-TEST_F(ParamCheckerTest, CopyRsc) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "-p", "srcpath", "dstpath",
+TEST_F(ParamCheckerTest, CopyRes) {
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "-p", "srcpath", "dstpath",
       "--copy", "org.test.targetpkgid", nullptr};
 
   ParamChecker checker(8, (char**)argv);
 
   EXPECT_EQ(checker.Validate(), true);
-  EXPECT_EQ(checker.GetRequestType(), rsc_handler::ReqType::REQ_TYPE_NEW);
+  EXPECT_EQ(checker.GetRequestType(), res_handler::ReqType::REQ_TYPE_NEW);
   EXPECT_EQ(checker.GetPkgID(), "org.test.targetpkgid");
   EXPECT_EQ(checker.GetPathList().size(), 1);
   EXPECT_EQ(checker.GetUID(), 5001);
 }
 
-TEST_F(ParamCheckerTest, RemoveRsc) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--remove",
+TEST_F(ParamCheckerTest, RemoveRes) {
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--remove",
       "org.test.targetpkgid", "-p", "dstpath", nullptr};
 
   ParamChecker checker(7, (char**)argv);
 
   EXPECT_EQ(checker.Validate(), true);
-  EXPECT_EQ(checker.GetRequestType(), rsc_handler::ReqType::REQ_TYPE_REMOVE);
+  EXPECT_EQ(checker.GetRequestType(), res_handler::ReqType::REQ_TYPE_REMOVE);
   EXPECT_EQ(checker.GetPkgID(), "org.test.targetpkgid");
   EXPECT_EQ(checker.GetPathList().size(), 1);
   EXPECT_EQ(checker.GetUID(), 5001);
 }
 
-TEST_F(ParamCheckerTest, DeleteRsc) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--delete",
+TEST_F(ParamCheckerTest, DeleteRes) {
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--delete",
       "org.test.targetpkgid", nullptr};
 
   ParamChecker checker(5, (char**)argv);
 
   EXPECT_EQ(checker.Validate(), true);
-  EXPECT_EQ(checker.GetRequestType(), rsc_handler::ReqType::REQ_TYPE_UNINSTALL);
+  EXPECT_EQ(checker.GetRequestType(), res_handler::ReqType::REQ_TYPE_UNINSTALL);
   EXPECT_EQ(checker.GetPkgID(), "org.test.targetpkgid");
   EXPECT_EQ(checker.GetPathList().size(), 0);
   EXPECT_EQ(checker.GetUID(), 5001);
 }
 
 TEST_F(ParamCheckerTest, EmptyPkgID) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--copy",
       "", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8,(char**)argv);
 
@@ -117,7 +117,7 @@ TEST_F(ParamCheckerTest, EmptyPkgID) {
 }
 
 TEST_F(ParamCheckerTest, UnknownReqType) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "-p",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "-p",
       "srcpath", "dstpath", nullptr};
   ParamChecker checker(6, (char**)argv);
 
@@ -125,7 +125,7 @@ TEST_F(ParamCheckerTest, UnknownReqType) {
 }
 
 TEST_F(ParamCheckerTest, PathNotGiven) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001",
       "-c", "org.tizen.pathnotgiven", nullptr};
   ParamChecker checker(5, (char**)argv);
 
@@ -46,10 +46,10 @@ using ::testing::SetArgPointee;
 using ::testing::InvokeArgument;
 using ::testing::SaveArg;
 
-using rsc_handler::CopyRequestHandler;
-using rsc_handler::RemoveRequestHandler;
-using rsc_handler::RscPathInfo;
-using rsc_handler::UninstallRequestHandler;
+using res_handler::CopyRequestHandler;
+using res_handler::RemoveRequestHandler;
+using res_handler::ResPathInfo;
+using res_handler::UninstallRequestHandler;
 
 namespace bf = boost::filesystem;
 namespace bs = boost::system;
@@ -68,10 +68,10 @@ class CopyRequestHandlerTest : public TestFixture {
         rootpath / "shared_res/test_pkg/dest_dir");
   }
   virtual void TearDown() {
-    bf::remove_all("./tests/unit_tests/rsc-copy/data/shared_res/test_pkg");
+    bf::remove_all("./tests/unit_tests/res-copy/data/shared_res/test_pkg");
   }
 
-  std::string root_path = "./tests/unit_tests/rsc-copy/data";
+  std::string root_path = "./tests/unit_tests/res-copy/data";
 };
 
 class RemoveRequestHandlerTest : public TestFixture {
@@ -94,10 +94,10 @@ class RemoveRequestHandlerTest : public TestFixture {
         rootpath / "shared_res/test_pkg/new_dir/new_dir2/resource_file.txt");
   }
   virtual void TearDown() {
-    bf::remove_all("./tests/unit_tests/rsc-copy/data/shared_res/test_pkg");
+    bf::remove_all("./tests/unit_tests/res-copy/data/shared_res/test_pkg");
   }
 
-  std::string root_path = "./tests/unit_tests/rsc-copy/data";
+  std::string root_path = "./tests/unit_tests/res-copy/data";
 };
 
 class UninstallRequestHandlerTest : public TestFixture {
@@ -111,18 +111,18 @@ class UninstallRequestHandlerTest : public TestFixture {
         rootpath / "shared_res/test_pkg");
   }
   virtual void TearDown() {
-    bf::remove_all("./tests/unit_tests/rsc-copy/data/shared_res/test_pkg");
+    bf::remove_all("./tests/unit_tests/res-copy/data/shared_res/test_pkg");
   }
 
-  std::string root_path = "./tests/unit_tests/rsc-copy/data";
+  std::string root_path = "./tests/unit_tests/res-copy/data";
 };
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtRootToRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_file.txt", "");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -132,11 +132,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtRootToRoot) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtRootToRoot_ChangeFileName) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_file.txt", "another_name.txt");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -146,11 +146,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtRootToRoot_ChangeFileName) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtRootToDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_file.txt", "dest_dir");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -163,11 +163,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtRootToDirectory) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtRootToDirectory_ChangeFileName) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_file.txt", "dest_dir/newname.txt");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -180,11 +180,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtRootToDirectory_ChangeFileName) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1/resource_file3.txt", "");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -194,12 +194,12 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToRoot) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToRoot_ChangeFileName) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back(
       "data/resource_dir1/resource_file3.txt", "newname.txt");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -209,11 +209,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToRoot_ChangeFileName) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1/resource_file3.txt", "dest_dir");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -225,13 +225,13 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToDirectory) {
   EXPECT_TRUE(bf::exists(check_path));
 }
 
-TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToDirectory_ChangeFileName) {
-  std::list<RscPathInfo> path_list;
+TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToRoot_ChangeFileName) {
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back(
-      "data/resource_dir1/resource_file3.txt", "dest_dir/newname.txt");
+    "data/resource_dir1/resource_file3.txt", "dest_dir/newname.txt");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -244,11 +244,11 @@ TEST_F(CopyRequestHandlerTest, CopyFileAtDirectoryToDirectory_ChangeFileName) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1", "");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -265,11 +265,11 @@ TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToRoot) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1", "dest_dir");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -289,11 +289,11 @@ TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToDirectory) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToDirectory2) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1", "resource_dir1");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -313,11 +313,11 @@ TEST_F(CopyRequestHandlerTest, CopyDirectoryAtRootToDirectory2) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyDirectoryAtDirectoryToRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1/resource_dir2", "");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -327,11 +327,11 @@ TEST_F(CopyRequestHandlerTest, CopyDirectoryAtDirectoryToRoot) {
 }
 
 TEST_F(CopyRequestHandlerTest, CopyDirectoryAtDirectoryToDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_dir1/resource_dir2", "dest_dir");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg");
   EXPECT_TRUE(bf::exists(check_path));
@@ -343,42 +343,42 @@ TEST_F(CopyRequestHandlerTest, CopyDirectoryAtDirectoryToDirectory) {
   EXPECT_TRUE(bf::exists(check_path));
 }
 
-TEST_F(CopyRequestHandlerTest, RscNotexists) {
-  std::list<RscPathInfo> path_list;
-  path_list.emplace_back("data/not_existed_rsc", "new_dir");
+TEST_F(CopyRequestHandlerTest, ResNotexists) {
+  std::list<ResPathInfo> path_list;
+  path_list.emplace_back("data/not_existed_res", "new_dir");
   CopyRequestHandler handler("test_pkg", root_path, path_list);
 
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_RES_NOT_FOUND);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_RES_NOT_FOUND);
 }
 
-TEST_F(CopyRequestHandlerTest, ReplaceRsc) {
-  std::list<RscPathInfo> path_list;
+TEST_F(CopyRequestHandlerTest, ReplaceRes) {
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("data/resource_file.txt", "new_dir");
 
   CopyRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   CopyRequestHandler replace_handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 }
 
 TEST_F(RemoveRequestHandlerTest, RemoveFileAtRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("resource_file.txt", "");
 
   RemoveRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg/resource_file.txt");
   EXPECT_FALSE(bf::exists(check_path));
 }
 
 TEST_F(RemoveRequestHandlerTest, RemoveFileAtDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("new_dir/resource_file.txt", "");
 
   RemoveRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(
       root_path + "/shared_res/test_pkg/new_dir/resource_file.txt");
@@ -386,50 +386,50 @@ TEST_F(RemoveRequestHandlerTest, RemoveFileAtDirectory) {
 }
 
 TEST_F(RemoveRequestHandlerTest, RemoveDirectoryAtRoot) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("new_dir", "");
 
   RemoveRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg/new_dir");
   EXPECT_FALSE(bf::exists(check_path));
 }
 
 TEST_F(RemoveRequestHandlerTest, RemoveDirectoryAtDirectory) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   path_list.emplace_back("new_dir/new_dir2", "");
 
   RemoveRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg/new_dir/new_dir2");
   EXPECT_FALSE(bf::exists(check_path));
 }
 
 TEST_F(UninstallRequestHandlerTest, RemoveRootPath) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
 
   UninstallRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 
   bf::path check_path(root_path + "/shared_res/test_pkg/");
   EXPECT_FALSE(bf::exists(check_path));
 }
 
 TEST_F(UninstallRequestHandlerTest, RootNotExists) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
   bf::path check_path(root_path + "/shared_res/test_pkg/");
   bf::remove_all(check_path);
 
   UninstallRequestHandler handler("test_pkg", root_path, path_list);
-  EXPECT_EQ(handler.Execute(), rsc_handler::ErrorType::ERROR_NONE);
+  EXPECT_EQ(handler.Execute(), res_handler::ErrorType::ERROR_NONE);
 }
 
 TEST_F(UninstallRequestHandlerTest, EmptyPkgID) {
-  std::list<RscPathInfo> path_list;
+  std::list<ResPathInfo> path_list;
 
   UninstallRequestHandler handler("", root_path, path_list);
   EXPECT_EQ(handler.Execute(),
-      rsc_handler::ErrorType::ERROR_INVALID_PARAMETER);
+      res_handler::ErrorType::ERROR_INVALID_PARAMETER);
 }
@@ -36,8 +36,8 @@ using ::testing::SetArgPointee;
 using ::testing::InvokeArgument;
 using ::testing::SaveArg;
 
-using rsc_handler::ParamChecker;
-using rsc_handler::RequestHandlerInvoker;
+using res_handler::ParamChecker;
+using res_handler::RequestHandlerInvoker;
 
 class Mocks : public ::testing::NiceMock<PkgMgrInfoMock>,
     public ::testing::NiceMock<OsMock> {};
@@ -46,18 +46,18 @@ class RequestHandlerInvokerTest : public TestFixture {
  public:
   RequestHandlerInvokerTest() : TestFixture(std::make_unique<Mocks>()) {
     signal_sender_.SetPkgID("org.tizen.targepkgid");
-    signal_sender_.SetReqType(rsc_handler::ReqType::REQ_TYPE_UNKNOWN);
+    signal_sender_.SetReqType(res_handler::ReqType::REQ_TYPE_UNKNOWN);
   }
   virtual ~RequestHandlerInvokerTest() {}
 
   virtual void SetUp() {}
   virtual void TearDown() {}
 
-  rsc_handler::EventSignalSender signal_sender_;
+  res_handler::EventSignalSender signal_sender_;
 };
 
 TEST_F(RequestHandlerInvokerTest, CopyType) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--copy",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--copy",
         "org.test.targetpkgid", "-p", "srcpath", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
 
@@ -67,7 +67,7 @@ TEST_F(RequestHandlerInvokerTest, CopyType) {
 }
 
 TEST_F(RequestHandlerInvokerTest, RemoveType) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--remove",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--remove",
         "org.test.targetpkgid", "-p", "", "dstpath", nullptr};
   ParamChecker checker(8, (char**)argv);
 
@@ -76,7 +76,7 @@ TEST_F(RequestHandlerInvokerTest, RemoveType) {
 }
 
 TEST_F(RequestHandlerInvokerTest, UninstallType) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", "--delete",
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", "--delete",
         "org.test.targetpkgid", nullptr};
   ParamChecker checker(5, (char**)argv);
 
@@ -85,7 +85,7 @@ TEST_F(RequestHandlerInvokerTest, UninstallType) {
 }
 
 TEST_F(RequestHandlerInvokerTest, InvalidType) {
-  const char *argv[] = { "/bin/rsc-copy", "--uid", "5001", nullptr};
+  const char *argv[] = { "/bin/res-copy", "--uid", "5001", nullptr};
   ParamChecker checker(3, (char**)argv);
 
   RequestHandlerInvoker request_handler_invoker(checker, signal_sender_);