Remove unused source
authorJihoon Chung <jihoon.chung@samsung.com>
Fri, 2 Nov 2012 11:57:57 +0000 (20:57 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Fri, 2 Nov 2012 12:20:42 +0000 (21:20 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Remove unused source
[SCMRequest] N/A

Change-Id: If992d86ee2a39f732c433176016b9e22e1069082

packaging/wrt-installer.spec
src/CMakeLists.txt [changed mode: 0755->0644]
src/jobs/widget_install/job_widget_install.cpp [changed mode: 0755->0644]
src/jobs/widget_install/manifest.cpp
src/jobs/widget_install/manifest.h
src/jobs/widget_install/task_livebox_conf.cpp [deleted file]
src/jobs/widget_install/task_livebox_conf.h [deleted file]

index f79e248..068d546 100644 (file)
@@ -49,7 +49,6 @@ LDFLAGS="$LDFLAGS"
 
 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
         -DDPL_LOG=ON \
-        -DLB_SUPPORT=ON \
         -DCMAKE_PACKAGE_VERSION=%{version} \
         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}
 make %{?jobs:-j%jobs}
old mode 100755 (executable)
new mode 100644 (file)
index 0f235dd..929571e
@@ -98,14 +98,6 @@ SET(INSTALLER_SOURCES
     ${INSTALLER_SRC_DIR}/pkg-manager/pkgmgr_signal.cpp
     )
 
-IF(LB_SUPPORT)
-    SET(INSTALLER_SOURCES
-        ${INSTALLER_SOURCES}
-        ${INSTALLER_JOBS}/widget_install/task_livebox_conf.cpp)
-    MESSAGE(STATUS "adding definition -DLB_SUPPORT")
-    ADD_DEFINITIONS("-DLB_SUPPORT")
-ENDIF(LB_SUPPORT)
-
 MESSAGE(STATUS "add -DSEP_INSTALLER")
 ADD_DEFINITIONS("-DSEP_INSTALLER")
 
old mode 100755 (executable)
new mode 100644 (file)
index 8f9df0c..7ffa615
 #include <widget_install/task_remove_backup.h>
 #include <widget_install/task_encrypt_resource.h>
 #include <widget_install/task_certificates.h>
-
-#ifdef LB_SUPPORT
-#include <widget_install/task_livebox_conf.h>
-#endif
 #include <widget_install/task_plugins_copy.h>
 
 #include <widget_install/widget_install_errors.h>
@@ -199,11 +195,7 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath,
                 PKG_TYPE_TIZEN_WITHSVCAPP) {
             AddTask(new TaskInstallOspsvc(m_installerContext));
         }
-#ifdef LB_SUPPORT
-        AddTask(new TaskLiveboxConf(m_installerContext));
-#endif
         AddTask(new TaskPluginsCopy(m_installerContext));
-
         AddTask(new TaskDatabase(m_installerContext));
         AddTask(new TaskAceCheck(m_installerContext));
     } else if (result == ConfigureResult::Updated) {
@@ -230,13 +222,8 @@ JobWidgetInstall::JobWidgetInstall(std::string const &widgetPath,
             AddTask(new TaskInstallOspsvc(m_installerContext));
         }
         AddTask(new TaskRemoveBackupFiles(m_installerContext));
-#ifdef LB_SUPPORT
-        AddTask(new TaskLiveboxConf(m_installerContext));
-#endif
         AddTask(new TaskPluginsCopy(m_installerContext));
-
         AddTask(new TaskDatabase(m_installerContext));
-
         AddTask(new TaskAceCheck(m_installerContext));
         //TODO: remove widgetHandle from this task and move before database task
         // by now widget handle is needed in ace check
index 4c068cf..f231d02 100644 (file)
@@ -176,7 +176,6 @@ void Manifest::serialize(xmlTextWriterPtr writer)
         FOREACH(u, this->uiApplication) { u->serialize(writer); }
         FOREACH(i, this->imeApplication) { i->serialize(writer); }
         //FOREACH(f, this->font) { f->serialize(writer); }
-        //FOREACH(l, this->livebox) { l->serialize(writer); }
     }
     endElement(writer);
 }
index 2f8f881..84894dd 100644 (file)
@@ -256,7 +256,6 @@ public:
         this->imeApplication.push_back(x);
     }
 //    void addFont(const FontType &x) { this->font.push_back(x); }
-//    void addLivebox(const LiveboxType &x) { this->livebox.push_back(x); }
 
     void setInstallLocation(const InstallLocationType &x)
     {
@@ -276,7 +275,6 @@ private:
     std::list<UiApplicationType> uiApplication;
     std::list<ImeApplicationType> imeApplication;
 //    std::list<FontType> font;
-//    std::list<LiveboxType> livebox;
     InstallLocationType installLocation;
     NcnameType package;
     PackageType type;
diff --git a/src/jobs/widget_install/task_livebox_conf.cpp b/src/jobs/widget_install/task_livebox_conf.cpp
deleted file mode 100644 (file)
index cc20d76..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2012 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_livebox_conf.cpp
- * @author  Tomasz Iwanek (t.iwanek@samsung.com)
- * @version 1.0
- * @brief   Livebox support task
- */
-
-#include "task_livebox_conf.h"
-
-#include <dpl/log/log.h>
-#include <dpl/string.h>
-#include <dpl/utils/wrt_utility.h>
-#include <dpl/wrt-dao-rw/widget_dao.h>
-#include <dpl/file_input.h>
-#include <dpl/file_output.h>
-#include <dpl/copy.h>
-#include <dpl/utils/wrt_utility.h>
-
-#include <widget_install_context.h>
-
-TaskLiveboxConf::TaskLiveboxConf(InstallerContext &inCont) :
-    DPL::TaskDecl<TaskLiveboxConf>(this),
-    m_context(inCont)
-{
-    AddStep(&TaskLiveboxConf::StepConfigureLivebox);
-}
-
-void TaskLiveboxConf::StepConfigureLivebox()
-{
-    const std::string confFile = getLiveboxConfiguration();
-    const std::string liveboxDir = std::string("/opt/live/")
-            + DPL::ToUTF8String(*m_context.widgetConfig.pkgname);
-    const std::string destination = liveboxDir + "/etc/";
-    const std::string targetFile = destination + getLiveboxConfigurationFile();
-
-    if(WrtUtilFileExists(confFile))
-    {
-        WrtUtilMakeDir(destination);
-
-        LogDebug("Registering widget's livebox directory under /opt/live/");
-        m_context.locations->registerExternalLocation(liveboxDir);
-
-        LogInfo("Coping livebox configuration file: " << confFile << " -> " << targetFile);
-        DPL::FileInput input(confFile);
-        DPL::FileOutput output(targetFile);
-        DPL::Copy(&input, &output);
-    }
-    else
-    {
-        LogInfo("No livebox configuration file: " << confFile);
-    }
-}
-
-std::string TaskLiveboxConf::getLiveboxConfigurationDirectory() const
-{
-    return m_context.locations->getSourceDir() + "/livebox/";
-}
-
-std::string TaskLiveboxConf::getLiveboxConfigurationFile() const
-{
-    return DPL::ToUTF8String(*m_context.widgetConfig.pkgname) + ".conf";
-}
-
-std::string TaskLiveboxConf::getLiveboxConfiguration() const
-{
-    return getLiveboxConfigurationDirectory() + getLiveboxConfigurationFile();
-}
diff --git a/src/jobs/widget_install/task_livebox_conf.h b/src/jobs/widget_install/task_livebox_conf.h
deleted file mode 100644 (file)
index 26085a0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2012 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_livebox_conf.h
- * @author  Tomasz Iwanek (t.iwanek@samsung.com)
- * @version 1.0
- * @brief   Livebox support task
- */
-
-#ifndef WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_LIVEBOX_CONF_H
-#define WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_LIVEBOX_CONF_H
-
-//forward declaration
-class InstallerContext;
-
-#include <string>
-
-#include <dpl/task.h>
-
-class TaskLiveboxConf : public DPL::TaskDecl<TaskLiveboxConf>
-{
-public:
-    TaskLiveboxConf(InstallerContext &inCont);
-private:
-
-    void StepConfigureLivebox();
-
-    /**
-     * @brief getLiveboxConfiguration returns value of configuration path
-     *                                        pointing at .conf file
-     * @return path
-     */
-    std::string getLiveboxConfiguration() const;
-    /**
-     * @brief getLiveboxConfiguration returns value of configuration directory
-     * @return path
-     */
-    std::string getLiveboxConfigurationDirectory() const;
-    std::string getLiveboxConfigurationFile() const;
-
-    //context data
-    InstallerContext &m_context;
-};
-
-#endif // WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_LIVEBOX_CONF_H