51c9f38b60b742a3b568ee9d257176059d9e2187
[framework/web/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-rw / global_dao.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file    global_dao.h
18  * @author  Pawel Sikorski (p.sikorski@samsung.com)
19  * @version 1.0
20  * @brief   This file contains the declaration of global dao
21  */
22
23 #ifndef WRT_SRC_CONFIGURATION_GLOBAL_DAO_H_
24 #define WRT_SRC_CONFIGURATION_GLOBAL_DAO_H_
25
26 #include <dpl/wrt-dao-ro/global_dao_read_only.h>
27
28 namespace WrtDB {
29
30 class GlobalDAO : public GlobalDAOReadOnly
31 {
32   public:
33     /**
34      * Set new Parental mode status
35      */
36     static void SetParentalMode(bool parental_status);
37
38     /**
39      * Retrieve Parental mode maximal allowed age
40      *
41      * @return NULL if allowed age not set, else pointer value is allowed age
42      */
43     static void SetParentalAllowedAge(const DPL::OptionalInt& age);
44
45     static void AddCategoryRule(
46             const ChildProtection::PowderRules::CategoryRule& powder);
47
48     static void RemoveCategoryRule(
49             const ChildProtection::PowderRules::CategoryRule& powder);
50
51     static void UpdateCategoryRule(
52             const ChildProtection::PowderRules::CategoryRule& oldRule,
53             const ChildProtection::PowderRules::CategoryRule& newRule);
54
55     static void AddAdultBlackListElement(const DPL::String &url);
56
57     static void RemoveAdultBlackListElement(const DPL::String &url);
58
59     static void UpdateAdultBlackList(const DPL::String &oldUrl,
60                                      const DPL::String &newUrl);
61
62     /**
63      * Add deffered widget packages to be installed
64      */
65     static void AddDefferedWidgetPackageInstallation(const DPL::String &path);
66
67     /**
68      * Remove deffered widget packages to be installed
69      */
70     static void RemoveDefferedWidgetPackageInstallation(const DPL::String &arg);
71
72     static void SetDeveloperMode(bool mode);
73
74     static void SetSecureByDefault(bool secureByDefault);
75
76     static void setComplianceMode(bool mode);
77
78     static void setComplianceFakeImei(const std::string &imei);
79
80     static void setComplianceFakeMeid(const std::string &meid);
81
82     static void AddWhiteURI(const std::string &value, bool subDomain);
83
84     static void RemoveWhiteURI(const std::string &uri);
85
86     /**
87      * This method changes network access mode while roaming is enabled.
88      *
89      */
90     static void SetHomeNetworkDataUsage(NetworkAccessMode newMode);
91
92     /**
93      * This method changes network access mode while roaming is enabled.
94      *
95      */
96     static void SetRoamingDataUsage(NetworkAccessMode newMode);
97
98     /**
99      * This method sets Autofill for Webkit
100      */
101     static void SetAutoSaveIdPasswd(
102             const DPL::String &url, const AutoSaveData &saveData);
103
104
105   private:
106     GlobalDAO()
107     {
108     }
109 };
110
111 } // namespace WrtDB
112
113 #endif /* WRT_SRC_CONFIGURATION_GLOBAL_DAO_H_ */