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.
20 * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
32 #include <dpl/optional_typedefs.h>
33 #include <dpl/string.h>
34 #include <ace-dao-ro/AceDAOReadOnly.h>
35 #include <ace-dao-ro/ValidityTypes.h>
36 #include <ace-dao-ro/AppTypes.h>
42 class AceDAO : public AceDAOReadOnly
49 static void setPolicyResult(
50 const BaseAttributeSet &attributes,
51 const ExtendedPolicyResult &policyResult);
53 static void removePolicyResult(
54 const BaseAttributeSet &attributes);
57 static void setPromptDecision(
58 WidgetHandle widgetHandle,
60 const boost::optional<DPL::String> &session,
61 PromptDecision decision);
63 static void clearPromptDecisions(void);
66 static void clearWidgetDevCapSettings(void);
67 static void clearDevCapSettings(void);
68 static void clearAllSettings(void);
69 static void resetDatabase(void);
70 // clears all databse information relevant to policy cache
71 static void clearPolicyCache(void);
74 static void setDevCapSetting(const std::string &resource,
75 PreferenceTypes preference);
76 static void removeDevCapSetting(const std::string &resource);
79 static void setWidgetDevCapSetting(
80 const std::string &resource,
83 static void removeWidgetDevCapSetting(
84 const std::string &resource,
85 WidgetHandle handler);
87 // resource and subject management
88 static int addResource(const std::string &request);
91 static void addAttributes(const BaseAttributeSet &attributes);
93 // Setter for device capabilities that are requested in widgets config.
95 // Additional boolean flag means whether widget will always get
96 // (at launch) the SMACK permissions needed to use the device cap).
98 // 'permissions' is the map of device cap names and smack status for
99 // given widget handle.
100 static void setRequestedDevCaps(
101 WidgetHandle widgetHandle,
102 const RequestedDevCapsMap &permissions);
104 static void removeRequestedDevCaps(
105 WidgetHandle widgetHandle);
107 static void setAcceptedFeature(
108 WidgetHandle widgetHandle,
109 const FeatureNameVector &vector);
111 static void removeAcceptedFeature(WidgetHandle widgetHandle);
113 static void registerWidgetInfo(WidgetHandle handle,
114 const WidgetRegisterInfo& info,
115 const WidgetCertificateDataList& dataList);
116 static void unregisterWidgetInfo(WidgetHandle handle);
120 #endif /* ACEDAO_H_ */