Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / step.h
index a91480a..9e5b6af 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <pkgmgr_installer_error.h>
 
-#include <boost/signals2.hpp>
 #include <string>
 
 #include "common/installer_context.h"
@@ -80,8 +79,11 @@ class Step {
     RECOVERY_DONE = PKGMGR_INSTALLER_ERRCODE_OK + 1
   };
 
-  using StepErrorSignal =
-    boost::signals2::signal<void(Step::Status result, const std::string&)>;
+  class IStepErrorSignal {
+   public:
+    virtual ~IStepErrorSignal() {}
+    virtual void on_error(Step::Status result, const std::string& error) = 0;
+  };
 
   /** Standard constructor */
   explicit Step(InstallerContext* context) : context_(context) { }
@@ -104,10 +106,13 @@ class Step {
   /** Returns step name */
   virtual const char* name() const = 0;
 
-  StepErrorSignal on_error;
+  void connect(IStepErrorSignal* signal) {
+    on_error_ = signal;
+  }
 
  protected:
   InstallerContext* context_;
+  IStepErrorSignal* on_error_;
 };
 
 }  // namespace common_installer