WAC code removal
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 10 Jul 2013 06:47:13 +0000 (08:47 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Wed, 10 Jul 2013 11:05:50 +0000 (13:05 +0200)
[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
modules/widget_dao/dao/global_dao_read_only.cpp
modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h
modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h
modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h
modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h
modules/widget_dao/orm/wrt_db

index 8678c3d..dc543c4 100644 (file)
@@ -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);
index 3916e57..06bbb8f 100644 (file)
@@ -41,61 +41,6 @@ bool GlobalDAOReadOnly::GetSecureByDefault()
     return select->GetSingleValue<GlobalProperties::secure_by_default>();
 }
 
-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<GlobalProperties::compliance_mode>();
-    }
-    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<DPL::String> result =
-            select->GetSingleValue<GlobalProperties::compliance_fake_imei>();
-        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<DPL::String> result =
-            select->GetSingleValue<GlobalProperties::compliance_fake_meid>();
-        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;
index a91b73f..9537ce1 100644 (file)
@@ -236,7 +236,6 @@ typedef std::list<WidgetDAOReadOnlyPtr> 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:
index cf5647b..6d193e4 100644 (file)
@@ -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";
index bc805a7..a3560a4 100644 (file)
@@ -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();
index 5522306..9b72a89 100644 (file)
@@ -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);
index d4c747b..b7bcf76 100644 (file)
@@ -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()