Config parser - access tag - fix for app:// scheme implementation
[framework/web/wrt-installer.git] / src / logic / installer_controller.cpp
index 8009b98..5e65517 100644 (file)
 #include "installer_controller.h"
 #include <dpl/log/log.h>
 #include <dpl/singleton_impl.h>
-IMPLEMENT_SINGLETON(InstallerController)
 
+IMPLEMENT_SINGLETON(Logic::InstallerController)
+
+namespace Logic {
 InstallerController::InstallerController()
-{
-}
+{}
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::InstallWidgetEvent &event)
+    const InstallerControllerEvents::InstallWidgetEvent &event)
 {
-    std::string zipFileName = event.GetArg0();
+    std::string fileName = event.GetArg0();
     WidgetInstallationStruct installerStruct = event.GetArg1();
-    Jobs::JobHandle handle =
-        m_installerLogic.InstallWidget(zipFileName, installerStruct);
-
-    //TODO return handle to API
-    (void)handle;
+    m_installerLogic.InstallWidget(fileName, installerStruct);
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::InstallPluginEvent &event)
+    const InstallerControllerEvents::InstallPluginEvent &event)
 {
     std::string dirName = event.GetArg0();
     PluginInstallerStruct installerStruct = event.GetArg1();
-
-    Jobs::JobHandle handle =
-        m_installerLogic.InstallPlugin(dirName, installerStruct);
-
-    //TODO return handle to API
-    (void)handle;
-}
-
-void InstallerController::OnEventReceived(const InstallerControllerEvents::
-            InstallPluginGeolocationEvent &event)
-{
-    PluginInstallerStruct installerStruct = event.GetArg0();
-
-    InstallerLogic::InstallPluginGeolocation(installerStruct);
+    m_installerLogic.InstallPlugin(dirName, installerStruct);
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::UninstallWidgetEvent &event)
+    const InstallerControllerEvents::UninstallWidgetEvent &event)
 {
-    WidgetHandle widgetHandle = event.GetArg0();
+    std::string widgetPkgName = event.GetArg0();
     WidgetUninstallationStruct uninstallerStruct = event.GetArg1();
-    Jobs::JobHandle handle =
-        m_installerLogic.UninstallWidget(widgetHandle, uninstallerStruct);
-
-    //TODO return handle to API
-    (void)handle;
+    m_installerLogic.UninstallWidget(widgetPkgName, uninstallerStruct);
 }
 
 Eina_Bool InstallerController::AddNextStep(void *data)
 {
     Jobs::Job* model = static_cast<Jobs::Job *>(data);
     CONTROLLER_POST_EVENT(InstallerController,
-            InstallerControllerEvents::NextStepEvent(model));
+                          InstallerControllerEvents::NextStepEvent(model));
 
     return ECORE_CALLBACK_CANCEL;
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::NextStepEvent &event)
+    const InstallerControllerEvents::NextStepEvent &event)
 {
     Jobs::Job* model = event.GetArg0();
     Assert(model != NULL);
@@ -88,21 +68,23 @@ void InstallerController::OnEventReceived(
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::InstallDeferredWidgetPackagesEvent &
-        event)
+    const InstallerControllerEvents::InstallDeferredWidgetPackagesEvent &
+    event)
 {
     (void)event;
     m_installerLogic.InstallDeferredWidgetPackages();
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::InitializeEvent & /*event*/)
+    const InstallerControllerEvents::InitializeEvent & /*event*/)
 {
     m_installerLogic.Initialize();
 }
 
 void InstallerController::OnEventReceived(
-        const InstallerControllerEvents::TerminateEvent & /*event*/)
+    const InstallerControllerEvents::TerminateEvent & /*event*/)
 {
     m_installerLogic.Terminate();
 }
+} //Logic
+