[Release] wrt-installer_0.1.53
[framework/web/wrt-installer.git] / src / wrt-installer / wrt-installer.h
index 890f42d..59bcc90 100644 (file)
@@ -27,7 +27,9 @@
 #include <dpl/task.h>
 #include <dpl/string.h>
 #include <string>
+#include <map>
 #include <wrt_installer_api.h>
+#include <wrt_install_mode.h>
 
 namespace WRTInstallerNS { //anonymous
 DECLARE_GENERIC_EVENT_0(QuitEvent)
@@ -37,6 +39,14 @@ DECLARE_GENERIC_EVENT_0(InstallPluginEvent)
 
 typedef void (*ShowResultCallback)(void *data, Evas_Object *obj,
                                    void *event_info);
+namespace CSCConfiguration {
+typedef std::map<std::string, std::string> dataMap;
+typedef std::pair<std::string, std::string> dataPair;
+const char* const KEY_OP = "op";
+const char* const KEY_PATH = "path";
+const char* const VALUE_INSTALL = "install";
+const char* const VALUE_UNINSTALL = "uninstall";
+}
 
 enum ReturnValue
 {
@@ -60,22 +70,6 @@ class 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;
-    };
-
   protected:
     virtual void OnStop();
     virtual void OnCreate();
@@ -125,10 +119,11 @@ class WrtInstaller :
 
     void installNewPlugins();
     bool popupsEnabled() const;
+    CSCConfiguration::dataMap parseCSCConfiguration(std::string str);
 
     // Private data
     std::shared_ptr<PackageManager::IPkgmgrSignal> pkgmgrSignalInterface;
-    WrtInstallMode m_installMode;
+    InstallMode m_installMode;
     std::string m_packagePath;
     std::string m_name;
     bool m_initialized;
@@ -136,11 +131,10 @@ class WrtInstaller :
     size_t m_totalPlugins;
     int m_returnStatus;
     bool m_installByPkgmgr;
-    bool m_quiet;
-    InstallerPopup *m_popup;
     bool m_startupPluginInstallation;
+    CSCConfiguration::dataMap m_CSCconfigurationMap;
 
     typedef std::list<std::string> PluginPathList;
     DPL::Optional<PluginPathList> m_pluginsPaths;
 };
-#endif // WRT_INSTALLER_H
\ No newline at end of file
+#endif // WRT_INSTALLER_H