tizen beta release
[framework/web/wrt-installer.git] / src / security / i_ace_permissions.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  *
18  * @file        i_ace_settings.h
19  * @author      Jaroslaw Osmanski (j.osmanski@samsung.com)
20  * @version     1.0
21  * @brief       This is header file for preference settings interface between
22  *              security controller and clients
23  */
24
25 #ifndef WRT_SRC_ACCESS_CONTROL_I_ACE_PERMISSSIONS_H_
26 #define WRT_SRC_ACCESS_CONTROL_I_ACE_PERMISSSIONS_H_
27
28 #include <vector>
29 #include <dpl/ace-dao-ro/PreferenceTypes.h>
30
31 namespace AceSettings {
32
33 struct ResourcePreference
34 {
35     std::string resource;
36     AceDB::PreferenceTypes preference;
37
38     ResourcePreference()
39     {
40     }
41
42     ResourcePreference(const std::string &resourceArg,
43                        const AceDB::PreferenceTypes &preferenceArg) :
44         resource(resourceArg),
45         preference(preferenceArg)
46     {
47     }
48 };
49
50 struct SubjectResourcePreferences
51 {
52     std::string subject;
53     std::vector<ResourcePreference> resourcesPreference;
54
55     SubjectResourcePreferences()
56     {
57     }
58
59     SubjectResourcePreferences(
60             const std::string &subjectArg,
61             const std::vector<ResourcePreference> &resourcesPreferenceArg) :
62         subject(subjectArg),
63         resourcesPreference(resourcesPreferenceArg)
64     {
65     }
66 };
67
68 struct WidgetsPreferences
69 {
70     std::vector<SubjectResourcePreferences> subjectsResourcePreferences;
71 };
72
73 struct ResourcesPreferences
74 {
75     std::vector<ResourcePreference> resourcesPreference;
76 };
77
78 } // end of namespace AceSettings
79
80 #endif /* WRT_SRC_ACCESS_CONTROL_I_ACE_PERMISSSIONS_H_ */