From 7e90e9c716277c9e3e2333b0ccace52e1bf36ad1 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Wed, 10 Jul 2013 08:47:13 +0200 Subject: [PATCH] WAC code removal [Issue#] LINUXWRT-629 [Bug] Not supported code [Cause] N/A [Solution] Removing: - WrtDB::APP_TYPE_WAC20 app type, - WAC paths, versions, - developer/compliance mode in global dao, [Verification] Build repository [SCMRequest] This change requires: https://review.tizendev.org/#/c/80343/ Change-Id: I62bb55f51da35eb08d39c36de8e7e02889df1f0d --- modules/widget_dao/dao/global_dao.cpp | 57 ------------------- .../widget_dao/dao/global_dao_read_only.cpp | 55 ------------------ .../include/dpl/wrt-dao-ro/common_dao_types.h | 2 - .../include/dpl/wrt-dao-ro/global_config.h | 10 ---- .../dpl/wrt-dao-ro/global_dao_read_only.h | 6 -- .../include/dpl/wrt-dao-rw/global_dao.h | 6 -- modules/widget_dao/orm/wrt_db | 3 - 7 files changed, 139 deletions(-) diff --git a/modules/widget_dao/dao/global_dao.cpp b/modules/widget_dao/dao/global_dao.cpp index 8678c3d..dc543c4 100644 --- a/modules/widget_dao/dao/global_dao.cpp +++ b/modules/widget_dao/dao/global_dao.cpp @@ -47,63 +47,6 @@ void GlobalDAO::SetSecureByDefault(bool secure) } } -void GlobalDAO::setComplianceMode(bool mode) -{ - LogDebug("Updating compliance mode to:" << mode); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - GlobalProperties::Row row; - row.Set_compliance_mode(mode); - - WRT_DB_UPDATE(update, GlobalProperties, &WrtDatabase::interface()) - update->Values(row); - update->Execute(); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAO::Exception::DatabaseError, - "Failed to update compliance mode"); - } -} - -void GlobalDAO::setComplianceFakeImei(const std::string &imei) -{ - LogDebug("Setting compliance fake IMEI: " << imei); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - GlobalProperties::Row row; - row.Set_compliance_fake_imei(DPL::FromASCIIString(imei)); - - WRT_DB_UPDATE(update, GlobalProperties, &WrtDatabase::interface()) - update->Values(row); - update->Execute(); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAO::Exception::DatabaseError, - "Failed to update compliance fake IMEI"); - } -} - -void GlobalDAO::setComplianceFakeMeid(const std::string &meid) -{ - LogDebug("Setting compliance fake MEID: " << meid); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - GlobalProperties::Row row; - row.Set_compliance_fake_meid(DPL::FromASCIIString(meid)); - - WRT_DB_UPDATE(update, GlobalProperties, &WrtDatabase::interface()) - update->Values(row); - update->Execute(); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAO::Exception::DatabaseError, - "Failed to update compliance fake MEID"); - } -} - void GlobalDAO::SetHomeNetworkDataUsage(GlobalDAO::NetworkAccessMode newMode) { LogDebug("updating home network data usage to:" << newMode); diff --git a/modules/widget_dao/dao/global_dao_read_only.cpp b/modules/widget_dao/dao/global_dao_read_only.cpp index 3916e57..06bbb8f 100644 --- a/modules/widget_dao/dao/global_dao_read_only.cpp +++ b/modules/widget_dao/dao/global_dao_read_only.cpp @@ -41,61 +41,6 @@ bool GlobalDAOReadOnly::GetSecureByDefault() return select->GetSingleValue(); } -bool GlobalDAOReadOnly::getComplianceMode() -{ - LogDebug("Getting compliance mode"); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface()) - return select->GetSingleValue(); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAOReadOnly::Exception::DatabaseError, - "Failed to get compliance mode"); - } -} - -std::string GlobalDAOReadOnly::getComplianceFakeImei() -{ - LogDebug("Getting compliance fake IMEI"); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface()) - DPL::Optional result = - select->GetSingleValue(); - if (!result) { - return std::string(); - } - return DPL::ToUTF8String(*result); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAOReadOnly::Exception::DatabaseError, - "Failed to get compliance fake IMEI"); - } -} - -std::string GlobalDAOReadOnly::getComplianceFakeMeid() -{ - LogDebug("Getting compliance fake MEID"); - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface()) - DPL::Optional result = - select->GetSingleValue(); - if (!result) { - return std::string(); - } - return DPL::ToUTF8String(*result); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(GlobalDAOReadOnly::Exception::DatabaseError, - "Failed to get compliance fake MEID"); - } -} - bool GlobalDAOReadOnly::IsValidSubTag(const DPL::String& tag, int type) { using namespace DPL::DB::ORM; diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h index a91b73f..9537ce1 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h @@ -236,7 +236,6 @@ typedef std::list DbWidgetDAOReadOnlyList; enum AppType { APP_TYPE_UNKNOWN = 0, // unknown - APP_TYPE_WAC20, // WAC 2.0 APP_TYPE_TIZENWEBAPP // Tizen webapp }; @@ -262,7 +261,6 @@ class WidgetType switch (appType) { #define X(x) case x: return #x; X(APP_TYPE_UNKNOWN) - X(APP_TYPE_WAC20) X(APP_TYPE_TIZENWEBAPP) #undef X default: diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h index cf5647b..6d193e4 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h @@ -170,11 +170,6 @@ inline const char* GetSignatureXmlSchema() return "/usr/share/wrt-engine/schema.xsd"; } -inline const char* GetWAC20TestRootCAFilePath() -{ - return "/usr/share/wrt-engine/WAC2.0TestRootCA.cert"; -} - /** * Name of the w3c geolocation feature */ @@ -265,11 +260,6 @@ inline const char* GetTmpDirPath() return "/tmp"; } -inline const char* GetWACVersion() -{ - return "2.0"; -} - inline const char* GetTizenVersion() { return "2.2"; diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h index bc805a7..a3560a4 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h @@ -59,12 +59,6 @@ class GlobalDAOReadOnly static bool GetSecureByDefault(); - static bool getComplianceMode(); - - static std::string getComplianceFakeImei(); - - static std::string getComplianceFakeMeid(); - static WidgetAccessInfoList GetWhiteURIList(); static bool GetCookieSharingMode(); diff --git a/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h b/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h index 5522306..9b72a89 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h +++ b/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h @@ -31,12 +31,6 @@ class GlobalDAO : public GlobalDAOReadOnly public: static void SetSecureByDefault(bool secureByDefault); - static void setComplianceMode(bool mode); - - static void setComplianceFakeImei(const std::string &imei); - - static void setComplianceFakeMeid(const std::string &meid); - static void AddWhiteURI(const std::string &value, bool subDomain); static void RemoveWhiteURI(const std::string &uri); diff --git a/modules/widget_dao/orm/wrt_db b/modules/widget_dao/orm/wrt_db index d4c747b..b7bcf76 100644 --- a/modules/widget_dao/orm/wrt_db +++ b/modules/widget_dao/orm/wrt_db @@ -7,9 +7,6 @@ CREATE_TABLE(GlobalProperties) COLUMN_NOT_NULL(secure_by_default, INT, DEFAULT 1) COLUMN_NOT_NULL(home_network_data_usage, TINYINT, DEFAULT 1) COLUMN_NOT_NULL(roaming_data_usage, TINYINT, DEFAULT 1) - COLUMN_NOT_NULL(compliance_mode, TINYINT, DEFAULT 0) - COLUMN_NOT_NULL(compliance_fake_imei, VARCHAR(256), DEFAULT '') - COLUMN_NOT_NULL(compliance_fake_meid, VARCHAR(256), DEFAULT '') COLUMN_NOT_NULL(cookie_sharing_mode, INT, DEFAULT 0) CREATE_TABLE_END() -- 2.34.1