2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file SettingsLogic.h
20 * @author Tomasz Swierczek (t.swierczek@samsung.com)
22 * @brief Header file for class getting/setting user/global ACE settings
25 #ifndef WRT_SRC_ACCESS_CONTROL_LOGIC_SETTINGS_LOGIC_H_
26 #define WRT_SRC_ACCESS_CONTROL_LOGIC_SETTINGS_LOGIC_H_
32 #include <ace-dao-ro/PreferenceTypes.h>
33 #include <ace/Request.h>
34 #include <ace/PermissionTriple.h>
35 #include <ace-dao-rw/AceDAO.h>
36 #include <ace-dao-ro/common_dao_types.h>
44 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
45 DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
49 static AceDB::PreferenceTypes findGlobalUserSettings(
50 const std::string &resource,
51 WidgetHandle handler);
53 static AceDB::PreferenceTypes findGlobalUserSettings(
54 const Request &request);
57 static AceDB::PreferenceTypes getDevCapSetting(
58 const std::string &request);
59 static void getDevCapSettings(AceDB::PreferenceTypesMap *preferences);
60 static void setDevCapSetting(const std::string &resource,
61 AceDB::PreferenceTypes preference);
62 static void setAllDevCapSettings(
63 const std::list<std::pair<const std::string *,
64 AceDB::PreferenceTypes> > &resourcesList);
65 static void removeDevCapSetting(const std::string &resource);
66 static void updateDevCapSetting(const std::string &resource,
67 AceDB::PreferenceTypes p);
70 static AceDB::PreferenceTypes getWidgetDevCapSetting(
71 const std::string &resource,
72 WidgetHandle handler);
73 static void getWidgetDevCapSettings(PermissionList *permissions);
74 static void setWidgetDevCapSetting(const std::string &resource,
76 AceDB::PreferenceTypes preference);
77 static void setWidgetDevCapSettings(const PermissionList &tripleList);
78 static void removeWidgetDevCapSetting(const std::string &resource,
79 WidgetHandle handler);
88 #endif /* WRT_SRC_ACCESS_CONTROL_LOGIC_SETTINGS_LOGIC_H_ */