[Release] wrt-installer_0.1.53
[framework/web/wrt-installer.git] / src / jobs / widget_install / widget_installer_struct.h
index 0ebe48a..6f0c176 100644 (file)
@@ -30,6 +30,7 @@
 #include <job_base.h>
 #include <job.h>
 #include <widget_install/widget_install_errors.h>
+#include <wrt_install_mode.h>
 #include <wrt_common_types.h>
 #include <pkgmgr_signal_interface.h>
 #include <memory>
@@ -45,17 +46,6 @@ typedef void (*InstallerProgressCallback)(void *userParam,
                                           ProgressPercent percent,
                                           const ProgressDescription &);
 
-namespace InstallMode {
-enum Type
-{
-    WRONG_INSTALL_MODE = -1,
-    INSTALL_MODE_WGT,
-    INSTALL_MODE_DIRECTORY,
-    INSTALL_MODE_PRELOAD,
-    REINSTALL_MODE_DIRECTORY
-};
-}
-
 //TODO into namespace
 //InstallationStruct
 typedef Jobs::JobCallbacksBase<InstallerFinishedCallback,
@@ -65,19 +55,16 @@ WidgetInstallCallbackBase;
 //Widget Installation Struct
 struct WidgetInstallationStruct : public WidgetInstallCallbackBase
 {
-    InstallMode::Type m_installMode;
+    InstallMode m_installMode;
     std::shared_ptr<PackageManager::IPkgmgrSignal> pkgmgrInterface;
 
     // It must be empty-constructible as a parameter of generic event
-    WidgetInstallationStruct() :
-        m_installMode(InstallMode::Type::INSTALL_MODE_WGT)
-    {}
-
+    WidgetInstallationStruct() {};
     WidgetInstallationStruct(
         InstallerFinishedCallback finished,
         InstallerProgressCallback progress,
         void *param,
-        InstallMode::Type mode,
+        InstallMode mode,
         std::shared_ptr<PackageManager::IPkgmgrSignal>
         _pkgmgrInterface
         ) :