Removing unused merged code
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 21 Nov 2012 14:03:34 +0000 (15:03 +0100)
committerGerrit Code Review <gerrit2@kim11>
Tue, 27 Nov 2012 15:19:57 +0000 (00:19 +0900)
[Issue#]       LINUXNGWAP-428
[Bug]          Code that was removed is merged back somehow
[Cause]        N/A
[Solution]     Removing that code and widgetHandle uses
[Verification] Build or check buildbot status

Change-Id: I058cbc0705699392b15d5e894c7d1e7288940a01

src/jobs/widget_install/task_db_update.cpp [deleted file]
src/jobs/widget_install/task_db_update.h [deleted file]
src/jobs/widget_install/task_new_db_insert.cpp [deleted file]
src/jobs/widget_install/task_new_db_insert.h [deleted file]
src/logic/installer_controller.h

diff --git a/src/jobs/widget_install/task_db_update.cpp b/src/jobs/widget_install/task_db_update.cpp
deleted file mode 100644 (file)
index 5b02a95..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/**
- * @file    task_db_update.cpp
- * @author  Lukasz Wrzosek(l.wrzosek@samsung.com)
- * @version 1.0
- * @brief   Implementation file for installer task database updating
- */
-//#include <time.h>
-#include <widget_install/task_db_update.h>
-#include <widget_install/job_widget_install.h>
-#include <widget_install/widget_install_errors.h>
-#include <widget_install/widget_install_context.h>
-#include <dpl/wrt-dao-ro/config_parser_data.h>
-#include <dpl/utils/wrt_utility.h>
-#include <dpl/wrt-dao-rw/widget_dao.h>
-#include <dpl/foreach.h>
-#include <dpl/log/log.h>
-#include <dpl/assert.h>
-#include <dpl/wrt-dao-ro/global_config.h>
-#include <string>
-#include <Ecore_File.h>
-#include <sstream>
-
-using namespace WrtDB;
-
-namespace Jobs {
-namespace WidgetInstall {
-TaskDbUpdate::TaskDbUpdate(InstallerContext& context) :
-    DPL::TaskDecl<TaskDbUpdate>(this),
-    m_context(context)
-{
-    AddStep(&TaskDbUpdate::StepDbUpdate);
-
-    AddAbortStep(&TaskDbUpdate::StepAbortDBUpdate);
-}
-
-void TaskDbUpdate::StepDbUpdate()
-{
-    Try
-    {
-        // If there is existing model, remove its database data
-        if (true == m_context.existingWidgetInfo.isExist) {
-            WidgetHandle old = m_context.existingWidgetInfo.existingHandle;
-            LogInfo("Unregistering widget...: " << old);
-            WidgetDAO::unregisterWidget(old);
-            LogInfo("Widget unregistered");
-        }
-
-        /* Set install Time */
-        time(&m_context.widgetConfig.installedTime);
-
-        LogInfo("Registering widget...");
-
-        WidgetDAO::registerWidget(
-                *(m_context.widgetHandle),
-                m_context.widgetConfig,
-                m_context.wacSecurity);
-
-        FOREACH (cap, m_context.staticPermittedDevCaps) {
-            LogInfo("staticPermittedDevCaps : " << cap->first
-                    << " smack status: " << cap->second);
-        }
-
-        Assert(!!m_context.widgetConfig.pkgname
-               && "pkgName should be initialized");
-
-        WrtDB::WidgetDAO widgetDao(*m_context.widgetHandle);
-        widgetDao.setPkgName(m_context.widgetConfig.pkgname);
-
-        LogInfo("Widget registered");
-    }
-    Catch(WidgetDAO::Exception::DatabaseError)
-    {
-        LogWarning("Database failure!");
-        ReThrowMsg(Exceptions::DatabaseFailure, "Database failure!");
-    }
-    Catch(DPL::DB::SqlConnection::Exception::Base)
-    {
-        LogDebug("Database failure!");
-        ReThrowMsg(Exceptions::DatabaseFailure, "Database failure!");
-    }
-
-    m_context.job->UpdateProgress(
-        InstallerContext::INSTALL_DB_UPDATE,
-        "Widget DB UPDATE Finished");
-}
-
-void TaskDbUpdate::StepAbortDBUpdate()
-{
-    LogWarning("[DB Update Task] Aborting... (DB Clean)");
-    Assert(!!m_context.widgetHandle);
-    Try
-    {
-        WidgetDAO::unregisterWidget(*m_context.widgetHandle);
-
-        LogDebug("Cleaning DB successful!");
-    }
-    Catch(DPL::DB::SqlConnection::Exception::Base)
-    {
-        //TODO What should happen here?
-        LogError("Failed to handle StepAbortDBClean!");
-        //        ReThrowMsg(Exceptions::DbStepFailed, "Failed to handle StepAbortDBClean!");
-    }
-}
-
-} //namespace WidgetInstall
-} //namespace Jobs
diff --git a/src/jobs/widget_install/task_db_update.h b/src/jobs/widget_install/task_db_update.h
deleted file mode 100644 (file)
index 3f76680..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @file    task_db_update.h
- * @author  Lukasz Wrzosek(l.wrzosek@samsung.com)
- * @version 1.0
- * @brief   Header file for installer task database updating
- */
-#ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DB_UPDATE_H
-#define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DB_UPDATE_H
-
-#include <dpl/task.h>
-
-class InstallerContext;
-
-namespace Jobs {
-namespace WidgetInstall {
-class TaskDbUpdate :
-    public DPL::TaskDecl<TaskDbUpdate>
-{
-  private:
-    InstallerContext& m_context;
-
-    void StepDbUpdate();
-
-    void StepAbortDBUpdate();
-
-  public:
-    TaskDbUpdate(InstallerContext& context);
-};
-} //namespace WidgetInstall
-} //namespace Jobs
-
-#endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DB_UPDATE_H
diff --git a/src/jobs/widget_install/task_new_db_insert.cpp b/src/jobs/widget_install/task_new_db_insert.cpp
deleted file mode 100644 (file)
index 38e9d92..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/**
- * @file    task_new_db_insert.cpp
- * @author  Lukasz Wrzosek(l.wrzosek@samsung.com)
- * @author  Soyoung kim(sy037.kim@samsung.com)
- * @version 1.0
- * @brief   Implementation file for installer task database updating for widget update
- */
-#include <time.h>
-#include <sys/stat.h>
-#include <widget_install/task_new_db_insert.h>
-#include <widget_install/job_widget_install.h>
-#include <widget_install/widget_install_errors.h>
-#include <widget_install/widget_install_context.h>
-//#include <dpl/wrt-dao-ro/config_parser_data.h>
-#include <dpl/wrt-dao-rw/widget_dao.h>
-#include <dpl/foreach.h>
-#include <dpl/log/log.h>
-#include <dpl/assert.h>
-//#include <dpl/wrt-dao-ro/global_config.h>
-#include <string>
-#include <sstream>
-
-using namespace WrtDB;
-
-namespace Jobs {
-namespace WidgetInstall {
-TaskNewDbInsert::TaskNewDbInsert(InstallerContext& context) :
-    DPL::TaskDecl<TaskNewDbInsert>(this),
-    m_context(context)
-{
-    AddStep(&TaskNewDbInsert::StepDBInsert);
-
-    AddAbortStep(&TaskNewDbInsert::StepAbortDBInsert);
-}
-
-void TaskNewDbInsert::StepDBInsert()
-{
-    Try
-    {
-        /* Set install Time */
-        time(&m_context.widgetConfig.installedTime);
-
-        LogInfo("Registering widget...");
-
-        WidgetDAO::registerWidget(
-                *(m_context.widgetHandle),
-                m_context.widgetConfig,
-                m_context.wacSecurity);
-
-        FOREACH (cap, m_context.staticPermittedDevCaps) {
-            LogInfo("staticPermittedDevCaps : " << cap->first
-                    << " smack status: " << cap->second);
-        }
-
-        Assert(!!m_context.widgetConfig.pkgname
-               && "pkgName should be initialized");
-
-        WrtDB::WidgetDAO widgetDao(*m_context.widgetHandle);
-        widgetDao.setPkgName(m_context.widgetConfig.pkgname);
-
-        LogInfo("Widget registered");
-    }
-    Catch(WidgetDAO::Exception::DatabaseError)
-    {
-        LogWarning("Database failure!");
-        ReThrowMsg(Exceptions::InsertNewWidgetFailed, "Database failure!");
-    }
-    Catch(DPL::DB::SqlConnection::Exception::Base)
-    {
-        LogDebug("Database failure!");
-        ReThrowMsg(Exceptions::InsertNewWidgetFailed, "Database failure!");
-    }
-
-    m_context.job->UpdateProgress(
-        InstallerContext::INSTALL_NEW_DB_INSERT,
-        "New Widget DB UPDATE Finished");
-}
-
-void TaskNewDbInsert::StepAbortDBInsert()
-{
-    LogWarning("[DB Update Task] Aborting... (DB Clean)");
-    Assert(!!m_context.widgetHandle);
-    Try
-    {
-        WidgetDAO::unregisterWidget(*m_context.widgetHandle);
-
-        LogDebug("Cleaning DB successful!");
-    }
-    Catch(DPL::DB::SqlConnection::Exception::Base)
-    {
-        LogError("Failed to handle StepAbortDBClean!");
-    }
-}
-
-} //namespace WidgetInstall
-} //namespace Jobs
diff --git a/src/jobs/widget_install/task_new_db_insert.h b/src/jobs/widget_install/task_new_db_insert.h
deleted file mode 100644 (file)
index 13290d4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @file    task_new_db_insert.h
- * @author  Lukasz Wrzosek(l.wrzosek@samsung.com)
- * @author  Soyoung kim(sy037.kim@samsung.com)
- * @version 1.0
- * @brief   Header file for installer task database updating for widget update
- */
-#ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_NEW_DB_INSERT_H
-#define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_NEW_DB_INSERT_H
-
-#include <dpl/task.h>
-
-class InstallerContext;
-
-namespace Jobs {
-namespace WidgetInstall {
-class TaskNewDbInsert:
-    public DPL::TaskDecl<TaskNewDbInsert>
-{
-  private:
-    InstallerContext& m_context;
-
-    void StepDBInsert();
-
-    void StepAbortDBInsert();
-
-  public:
-    TaskNewDbInsert(InstallerContext& context);
-};
-} //namespace WidgetInstall
-} //namespace Jobs
-
-#endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_NEW_DB_INSERT_H
index 938e7ee..55c68fe 100644 (file)
@@ -52,7 +52,7 @@ DECLARE_GENERIC_EVENT_2(InstallPluginEvent, std::string, PluginInstallerStruct)
 /**
  * @brief Event for inicietig widget uninstallation.
  *
- * WidgetHandler is used to point witch widget shuld be uninstalled
+ * tizen id is used to point witch widget shuld be uninstalled
  */
 DECLARE_GENERIC_EVENT_2(UninstallWidgetEvent,
                         std::string,