[Developer mode] Removal from wrt-commons repository
authorKamil Nowac <k.nowac@partner.samsung.com>
Thu, 2 May 2013 12:27:30 +0000 (14:27 +0200)
committerGerrit Code Review <gerrit2@kim11>
Tue, 28 May 2013 08:06:38 +0000 (17:06 +0900)
[Issue#] LINUXWRT-282
[Problem] Unsupported feature
[Cause] N/A
[Solution] Removing it
[Verification]
1. Check if there are any 'D(/d)eveloper' words remains in source code.
2. Build wrt repository.

Change-Id: I8e324391cb9a99377806852e35590f9229e987f3

modules/widget_dao/dao/global_dao.cpp
modules/widget_dao/dao/global_dao_read_only.cpp
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
tests/dao/TestCases_GlobalDAO.cpp

index 0c22d909e221abee30d0fd1334f9d5ac95e52071..8678c3d172e5d2df863f5bdf54e60ce9e2c5fa1e 100644 (file)
 #include <dpl/wrt-dao-ro/WrtDatabase.h>
 
 namespace WrtDB {
-void GlobalDAO::SetDeveloperMode(bool mode)
-{
-    LogDebug("updating Developer mode to:" << mode);
-    Try {
-        using namespace DPL::DB::ORM;
-        using namespace DPL::DB::ORM::wrt;
-        GlobalProperties::Row row;
-        row.Set_developer_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 Developer Mode");
-    }
-}
-
 void GlobalDAO::SetSecureByDefault(bool secure)
 {
     //If secure == true -> widget does not need to be signed
index d634523973f431b8c72a92c1f453836c2214b5a5..3916e5765fe62e136f9853bed4cecf5ca903931b 100644 (file)
 #include <dpl/wrt-dao-ro/common_dao_types.h>
 
 namespace WrtDB {
-bool GlobalDAOReadOnly::GetDeveloperMode()
-{
-    LogDebug("Getting Developer mode");
-    Try {
-        using namespace DPL::DB::ORM;
-        using namespace DPL::DB::ORM::wrt;
-        WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface())
-        return select->GetSingleValue<GlobalProperties::developer_mode>();
-    }
-    Catch(DPL::DB::SqlConnection::Exception::Base){
-        ReThrowMsg(GlobalDAOReadOnly::Exception::DatabaseError,
-                   "Failed to get developer mode");
-    }
-}
 
 bool GlobalDAOReadOnly::GetSecureByDefault()
 {
index f5eab4e136eaedf390897291ce0543adc3715dc9..bc805a73ca1362ae13806932bef5e076a8aec49e 100644 (file)
@@ -57,8 +57,6 @@ class GlobalDAOReadOnly
 
     static bool IsValidSubTag(const DPL::String& tag, int type);
 
-    static bool GetDeveloperMode();
-
     static bool GetSecureByDefault();
 
     static bool getComplianceMode();
index 21b66fec4a7ff85aed8f36cdae77a0102806543d..55223066fe4d7382df127468b6f3a6070a34d220 100644 (file)
@@ -29,8 +29,6 @@ namespace WrtDB {
 class GlobalDAO : public GlobalDAOReadOnly
 {
   public:
-    static void SetDeveloperMode(bool mode);
-
     static void SetSecureByDefault(bool secureByDefault);
 
     static void setComplianceMode(bool mode);
index 86103e4b991ed0d870108e33fa829cdb694df0ca..d4c747b4b8627750fc4524d7ec1cb490e1ee53cb 100644 (file)
@@ -4,7 +4,6 @@ SQL(
 )
 /*TODO: secure_by_default should be 0 by default*/
 CREATE_TABLE(GlobalProperties)
-    COLUMN_NOT_NULL(developer_mode,          INT,          DEFAULT 0)
     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)
index 65cb9e092af2314487ca7aa1df3a13bce69502ee..ff182afd7bfd78cb323b5f09a548f5c739f1e725 100644 (file)
@@ -38,22 +38,6 @@ const DPL::String widgetPackage5(L"widgetpackage5");
 
 RUNNER_TEST_GROUP_INIT(DAO)
 
-/*
- * Name: global_dao_developer_mode
- * Description: tests if developer mode is correctly set and get
- * Expected: received developer shoudl match the one was set
- */
-RUNNER_TEST(global_dao_developer_mode)
-{
-    bool prev_mode = GlobalDAO::GetDeveloperMode();
-    GlobalDAO::SetDeveloperMode(false);
-    RUNNER_ASSERT_MSG(!GlobalDAO::GetDeveloperMode(), "set false failed");
-
-    GlobalDAO::SetDeveloperMode(true);
-    RUNNER_ASSERT_MSG(GlobalDAO::GetDeveloperMode(), "set true failed");
-    GlobalDAO::SetDeveloperMode(prev_mode);
-}
-
 /*
  * Name: home_network_data_usage
  * Description: tests if HomeNetworkDataUsage is correctly set and get