From ed9d957c749c15fbbec86f092b8a0350d2d418bf Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Fri, 10 May 2013 14:23:04 +0900 Subject: [PATCH] Remove vconf creation code [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 | 1 - modules/widget_dao/dao/widget_dao.cpp | 27 ------- modules/widget_dao/dao/widget_dao_read_only.cpp | 8 -- .../include/dpl/wrt-dao-ro/vconf_config.h | 88 ---------------------- .../include/dpl/wrt-dao-ro/widget_dao_read_only.h | 1 - .../widget_dao/include/dpl/wrt-dao-rw/widget_dao.h | 1 - modules/widget_dao/orm/wrt_db | 1 - 7 files changed, 127 deletions(-) delete mode 100644 modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h diff --git a/modules/widget_dao/CMakeLists.txt b/modules/widget_dao/CMakeLists.txt index 1c58aa9..d62ee17 100755 --- a/modules/widget_dao/CMakeLists.txt +++ b/modules/widget_dao/CMakeLists.txt @@ -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 diff --git a/modules/widget_dao/dao/widget_dao.cpp b/modules/widget_dao/dao/widget_dao.cpp index 250e8f5..47b19aa 100644 --- a/modules/widget_dao/dao/widget_dao.cpp +++ b/modules/widget_dao/dao/widget_dao.cpp @@ -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(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) } diff --git a/modules/widget_dao/dao/widget_dao_read_only.cpp b/modules/widget_dao/dao/widget_dao_read_only.cpp index 87815fc..846b32a 100644 --- a/modules/widget_dao/dao/widget_dao_read_only.cpp +++ b/modules/widget_dao/dao/widget_dao_read_only.cpp @@ -1221,14 +1221,6 @@ SettingsType WidgetDAOReadOnly::getWebDatabaseUsage(void) const return static_cast(*result); } -SettingsType WidgetDAOReadOnly::getFileSystemUsage(void) const -{ - WidgetSecuritySettingsRow row = - getWidgetSecuritySettingsRow(m_widgetHandle); - DPL::OptionalInt result = row.Get_file_system_usage(); - return static_cast(*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 index c84e866..0000000 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/vconf_config.h +++ /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 -#include - -#include -#include - -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 diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h index 3f9870c..f265281 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h @@ -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 diff --git a/modules/widget_dao/include/dpl/wrt-dao-rw/widget_dao.h b/modules/widget_dao/include/dpl/wrt-dao-rw/widget_dao.h index c7d8e94..9830f68 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-rw/widget_dao.h +++ b/modules/widget_dao/include/dpl/wrt-dao-rw/widget_dao.h @@ -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 diff --git a/modules/widget_dao/orm/wrt_db b/modules/widget_dao/orm/wrt_db index 607ec23..2bd3a73 100644 --- a/modules/widget_dao/orm/wrt_db +++ b/modules/widget_dao/orm/wrt_db @@ -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 ) -- 2.7.4