Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / security / step_recover_security.cc
index a7a62fc..950bc3b 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "common/step/security/step_recover_security.h"
 
-#include <boost/filesystem.hpp>
+#include <filesystem>
 #include <string>
 
 #include "common/security_registration.h"
@@ -15,7 +15,7 @@ namespace security {
 bool StepRecoverSecurity::Check(bool is_update) {
   if (context_->GetPkgPath().empty())
     return false;
-  if (!boost::filesystem::exists(context_->GetPkgPath()) && is_update)
+  if (!std::filesystem::exists(context_->GetPkgPath()) && is_update)
     return false;
   if (context_->pkgid.get().empty())
     return false;
@@ -38,7 +38,7 @@ Step::Status StepRecoverSecurity::RecoveryNew() {
       LOG(ERROR) << "Unsuccessful install";
       if (!error_message.empty()) {
         LOG(ERROR) << "error_message: " << error_message;
-        on_error(Status::RECOVERY_ERROR, error_message);
+        on_error_->on_error(Status::RECOVERY_ERROR, error_message);
       }
       return Status::RECOVERY_ERROR;
     }
@@ -48,7 +48,7 @@ Step::Status StepRecoverSecurity::RecoveryNew() {
     LOG(ERROR) << "Unsuccessful install";
     if (!error_message.empty()) {
       LOG(ERROR) << "error_message: " << error_message;
-      on_error(Status::RECOVERY_ERROR, error_message);
+      on_error_->on_error(Status::RECOVERY_ERROR, error_message);
     }
     return Status::RECOVERY_ERROR;
   }
@@ -71,7 +71,7 @@ Step::Status StepRecoverSecurity::RecoveryUpdate() {
     LOG(ERROR) << "Unsuccessful update";
     if (!error_message.empty()) {
       LOG(ERROR) << "error_message: " << error_message;
-      on_error(Status::RECOVERY_ERROR, error_message);
+      on_error_->on_error(Status::RECOVERY_ERROR, error_message);
     }
     return Status::RECOVERY_ERROR;
   }
@@ -84,7 +84,7 @@ Step::Status StepRecoverSecurity::RecoveryUpdate() {
       context_->is_readonly_package.get(), &error_message)) {
     if (!error_message.empty()) {
       LOG(ERROR) << "error_message: " << error_message;
-      on_error(Status::RECOVERY_ERROR, error_message);
+      on_error_->on_error(Status::RECOVERY_ERROR, error_message);
     }
     return Status::RECOVERY_ERROR;
   }
@@ -107,7 +107,7 @@ Step::Status StepRecoverSecurity::RecoveryReadonlyUpdateInstall() {
     LOG(ERROR) << "Unsuccessful update";
     if (!error_message.empty()) {
       LOG(ERROR) << "error_message: " << error_message;
-      on_error(Status::RECOVERY_ERROR, error_message);
+      on_error_->on_error(Status::RECOVERY_ERROR, error_message);
     }
     return Status::RECOVERY_ERROR;
   }