Remove GUID and refactoring update mode
[framework/web/wrt-installer.git] / src / wrt-installer / wrt_installer.h
index d06092a..66fc636 100644 (file)
 #include <string>
 #include <utilX.h>
 #include <wrt_installer_api.h>
-#include <pkgmgr_installer.h>
+
+#include <pkg-manager/pkgmgr_signal_interface.h>
+#include <pkg-manager/pkgmgr_signal_dummy.h>
+#include <pkg-manager/pkgmgr_signal.h>
+#include <memory>
 
 namespace WRTInstallerNS { //anonymous
 DECLARE_GENERIC_EVENT_0(QuitEvent)
@@ -49,35 +53,35 @@ enum ReturnValue
 };
 
 class WrtInstaller :
-        public DPL::Application,
-        private DPL::Event::Controller<DPL::TypeListDecl<
-            WRTInstallerNS::QuitEvent,
-            WRTInstallerNS::NextStepEvent,
-            WRTInstallerNS::InstallPluginEvent>::Type>,
-        public DPL::TaskDecl<WrtInstaller>
+    public DPL::Application,
+    private DPL::Event::Controller<DPL::TypeListDecl<
+                                       WRTInstallerNS::QuitEvent,
+                                       WRTInstallerNS::NextStepEvent,
+                                       WRTInstallerNS::InstallPluginEvent>::
+                                       Type>,
+    public DPL::TaskDecl<WrtInstaller>
 {
   public:
     WrtInstaller(int argc,
-              char **argv);
+                 char **argv);
     virtual ~WrtInstaller();
 
-
     int getReturnStatus() const;
 
     class InstallerPopup
     {
-        public:
-            InstallerPopup();
-            virtual ~InstallerPopup();
-
-            void init();
-            Evas_Object* createWin(const char* name);
-            void showPopup(void* userdata, const DPL::String& pkgMsg,
-                           ShowResultCallback callback);
-
-            Evas_Object* m_win;
-            Evas_Object* m_popup;
-            Evas_Object* m_progressbar;
+      public:
+        InstallerPopup();
+        virtual ~InstallerPopup();
+
+        void init();
+        Evas_Object* createWin(const char* name);
+        void showPopup(void* userdata, const DPL::String& pkgMsg,
+                       ShowResultCallback callback);
+
+        Evas_Object* m_win;
+        Evas_Object* m_popup;
+        Evas_Object* m_progressbar;
     };
 
   protected:
@@ -92,22 +96,20 @@ class WrtInstaller :
     // Events
     virtual void OnEventReceived(const WRTInstallerNS::QuitEvent &event);
     virtual void OnEventReceived(const WRTInstallerNS::NextStepEvent& event);
-    virtual void OnEventReceived(const WRTInstallerNS::InstallPluginEvent& event);
+    virtual void OnEventReceived(
+        const WRTInstallerNS::InstallPluginEvent& event);
 
     // Installation steps
     void initStep();
     void installStep();
     void installNewPlugins();
     void installPluginsStep();
-    void uninstallStep();
     void uninstallPkgNameStep();
-    void uninstallGuidStep();
     void unistallWgtFileStep();
     void shutdownStep();
     void registerCallbackStep();
     void queryListStep();
 
-
     // Static callbacks
     static void staticWrtInitCallback(WrtErrStatus status,
                                       void* userdata);
@@ -120,12 +122,12 @@ class WrtInstaller :
                                                  const char* description,
                                                  void* userdata);
     static void staticWrtInstallProgressCallback(float percent,
-                                                const char* description,
-                                                void* userdata);
+                                                 const char* description,
+                                                 void* userdata);
 
     static void staticWrtUninstallProgressCallback(float percent,
-                                                const char* description,
-                                                void* userdata);
+                                                   const char* description,
+                                                   void* userdata);
 
     static void showResultCallback(void *data, Evas_Object *obj,
                                    void *event_info);
@@ -135,6 +137,7 @@ class WrtInstaller :
     bool popupsEnabled() const;
 
     // Private data
+    std::shared_ptr<PackageManager::IPkgmgrSignal> pkgmgrSignalInterface;
     wrt_widget_install_mode_e m_installPolicy;
     std::string m_bundleValue;
     std::string m_packagePath;
@@ -150,6 +153,7 @@ class WrtInstaller :
     bool m_startupPluginInstallation;
     std::string m_webAppConfig;
     std::string m_webAppIcon;
+    bool m_preloadWidget;
 
     typedef std::list<std::string> PluginPathList;
     DPL::Optional<PluginPathList> m_pluginsPaths;