Remove vconf creation code
authorJihoon Chung <jihoon.chung@samsung.com>
Fri, 10 May 2013 05:23:04 +0000 (14:23 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Fri, 10 May 2013 05:59:02 +0000 (14:59 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Remove vconf creation code
[SCMRequest] N/A

Change-Id: I7257193fd9b2a8fb4d6b937d3313ea3cce95e345

modules/widget_dao/CMakeLists.txt
modules/widget_dao/dao/widget_dao.cpp
modules/widget_dao/dao/widget_dao_read_only.cpp
modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h [deleted file]
modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h
modules/widget_dao/include/dpl/wrt-dao-rw/widget_dao.h
modules/widget_dao/orm/wrt_db

index 1c58aa9..d62ee17 100755 (executable)
@@ -127,7 +127,6 @@ INSTALL(FILES
     include/dpl/wrt-dao-ro/plugin_dao_read_only.h
     include/dpl/wrt-dao-ro/property_dao_read_only.h
     include/dpl/wrt-dao-ro/widget_config.h
-    include/dpl/wrt-dao-ro/vconf_config.h
     include/dpl/wrt-dao-ro/widget_dao_read_only.h
     include/dpl/wrt-dao-ro/wrt_db_types.h
     include/dpl/wrt-dao-ro/WrtDatabase.h
index 250e8f5..47b19aa 100644 (file)
@@ -195,32 +195,6 @@ void WidgetDAO::setWebDatabaseUsage(const SettingsType value)
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to set web database usage")
 }
 
-void WidgetDAO::setFileSystemUsage(const SettingsType value)
-{
-    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
-    {
-        using namespace DPL::DB::ORM;
-        using namespace DPL::DB::ORM::wrt;
-
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        if (!isWidgetInstalled(getHandle())) {
-            ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,
-                     "Cannot find widget. Handle: " << getHandle());
-        }
-
-        WidgetSecuritySettings::Row row;
-        row.Set_file_system_usage(value);
-
-        WRT_DB_UPDATE(update, WidgetSecuritySettings, &WrtDatabase::interface())
-        update->Where(Equals<WidgetSecuritySettings::app_id>(getHandle()));
-        update->Values(row);
-        update->Execute();
-
-        transaction.Commit();
-    }
-    SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to set filesystem usage")
-}
-
 void WidgetDAO::registerWidget(
     const TizenAppId & tzAppId,
     const WidgetRegisterInfo &widgetRegInfo,
@@ -869,7 +843,6 @@ void WidgetDAO::registerWidgetSecuritySettings(DbWidgetHandle widgetHandle)
     row.Set_geolocation_usage(SETTINGS_TYPE_ON);
     row.Set_web_notification_usage(SETTINGS_TYPE_ON);
     row.Set_web_database_usage(SETTINGS_TYPE_ON);
-    row.Set_file_system_usage(SETTINGS_TYPE_ON);
 
     DO_INSERT(row, WidgetSecuritySettings)
 }
index 87815fc..846b32a 100644 (file)
@@ -1221,14 +1221,6 @@ SettingsType WidgetDAOReadOnly::getWebDatabaseUsage(void) const
     return static_cast<SettingsType>(*result);
 }
 
-SettingsType WidgetDAOReadOnly::getFileSystemUsage(void) const
-{
-    WidgetSecuritySettingsRow row =
-        getWidgetSecuritySettingsRow(m_widgetHandle);
-    DPL::OptionalInt result = row.Get_file_system_usage();
-    return static_cast<SettingsType>(*result);
-}
-
 DPL::OptionalString WidgetDAOReadOnly::getWidgetInstalledPath() const
 {
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h
deleted file mode 100644 (file)
index c84e866..0000000
+++ /dev/null
@@ -1,88 +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    vconf_config.h
- * @author  Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief   Implementation file for vconf key config.
- */
-#ifndef SRC_DOMAIN_VCONF_CONFIG_H
-#define SRC_DOMAIN_VCONF_CONFIG_H
-
-#include <string>
-#include <dpl/string.h>
-
-#include <dpl/wrt-dao-ro/global_config.h>
-#include <dpl/wrt-dao-ro/path_builder.h>
-
-namespace WrtDB {
-namespace VconfConfig {
-inline std::string GetVconfKeyRootPath(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .GetFullPath();
-}
-
-inline std::string GetVconfKeyPopupUsage(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .Concat(GlobalConfig::GetVconfKeyPopupUsagePath())
-               .GetFullPath();
-}
-
-inline std::string GetVconfKeyGeolocationUsage(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .Concat(GlobalConfig::GetVconfKeyGeolocationUsagePath())
-               .GetFullPath();
-}
-
-inline std::string GetVconfKeyWebNotificationUsage(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .Concat(GlobalConfig::GetVconfKeyWebNotificationUsagePath())
-               .GetFullPath();
-}
-
-inline std::string GetVconfKeyMemorySavingMode(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .Concat(GlobalConfig::GetVconfKeyMemorySavingModePath())
-               .GetFullPath();
-}
-
-inline std::string GetVconfKeyWebDatabaseUsage(DPL::String tzPkgId)
-{
-    return PathBuilder()
-               .Append(GlobalConfig::GetVconfKeyPrefixPath())
-               .Append(DPL::ToUTF8String(tzPkgId))
-               .Concat(GlobalConfig::GetVconfKeyWebDatabaseUsagePath())
-               .GetFullPath();
-}
-} // namespace VconfConfig
-} // namespace WrtDB
-
-#endif
index 3f9870c..f265281 100644 (file)
@@ -811,7 +811,6 @@ class WidgetDAOReadOnly
     SettingsType getGeolocationUsage() const;
     SettingsType getWebNotificationUsage() const;
     SettingsType getWebDatabaseUsage() const;
-    SettingsType getFileSystemUsage() const;
 
     /**
      * This method returns widget's installed path
index c7d8e94..9830f68 100644 (file)
@@ -162,7 +162,6 @@ class WidgetDAO : public WidgetDAOReadOnly
     void setGeolocationUsage(const SettingsType value);
     void setWebNotificationUsage(const SettingsType value);
     void setWebDatabaseUsage(const SettingsType value);
-    void setFileSystemUsage(const SettingsType value);
 
   private:
     //Methods used during widget registering
index 607ec23..2bd3a73 100644 (file)
@@ -235,7 +235,6 @@ CREATE_TABLE(WidgetSecuritySettings)
     COLUMN_NOT_NULL(geolocation_usage,      INT, DEFAULT 1)
     COLUMN_NOT_NULL(web_notification_usage, INT, DEFAULT 1)
     COLUMN_NOT_NULL(web_database_usage,     INT, DEFAULT 1)
-    COLUMN_NOT_NULL(file_system_usage,      INT, DEFAULT 1)
     TABLE_CONSTRAINTS(
         FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
     )