All Classes Files Functions Variables Enumerations Enumerator Groups Pages
AccessPolicy.idl
Go to the documentation of this file.
1 /**
2  * @file AccessPolicy.idl
3  * @brief Work with user access rules for client protocols.
4  *
5  * @author Frantisek Boranek
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 
12 
13 module kerio {
14 module jsonapi {
15 module admin {
16 
17 enum ServiceType {
18  ServiceActiveSync, ///< ActiveSync
19  ServiceEWS, ///< EWS
20  ServiceIMAP, ///< IMAP, Kerio Outlook Connector
21  ServiceKoff, ///< Kerio Outlook Connector (Offline Edition)
22  ServicePOP3, ///< POP3
23  ServiceWebDAV, ///< WebDAV, CalDAV, CardDAV
24  ServiceWebMail, ///< WebMail
25  ServiceXMPP ///< XMPP
26 };
27 
28 enum AccessPolicyConnectionRuleType {
29  ServiceAllowed, ///< service is allowed
30  ServiceDenied, ///< service is forbidden
31  ServiceIpAllowed, ///< service is allowed for specific IP group
32  ServiceIpDenied ///< service is forbidden for specific IP group
33 };
34 
36  AccessPolicyConnectionRuleType type; ///< type of rule
37  kerio::web::KId groupId; ///< if type of rule is 'ServiceIpAllowed/Denied' there is ID of IP Group
38 };
39 
40 /**
41  * Access policy rule details.
42  */
44  kerio::web::KId id; ///< [READ-ONLY] [REQUIRED FOR SET] global identification
45  kerio::web::KId groupId; ///< [REQUIRED FOR CREATE] global identification of AccessPolicyGroup
46  ServiceType service; ///< type of service
47  AccessPolicyConnectionRule rule; ///< rule for connections
48 };
49 
50 /**
51  * List of AccessPolicyRule.
52  */
53 typedef sequence<AccessPolicyRule> AccessPolicyRuleList;
54 
56  ServiceType service; ///< type of service
57  string description; ///< description of service enum
58 };
59 
60 typedef sequence<ServiceTypeInfo> ServiceTypeInfoList;
61 
62 
63 /**
64  * Access policy group details.
65  */
67  kerio::web::KId id; ///< [READ-ONLY] [REQUIRED FOR SET] global identification
68  string name; ///< name of policy
69  boolean isDefault; ///< [READ-ONLY]
70 };
71 
72 /**
73  * List of AccessPolicy.
74  */
75 typedef sequence<AccessPolicyGroup> AccessPolicyGroupList;
76 
77 
78 /**
79  * Access policies management.
80  */
81 interface AccessPolicy {
82 
83  /**
84  * Add new policies.
85  *
86  * @param errors - error message list
87  * @param result - list of IDs of created rules
88  * @param rules - new policies rules
89  */
90  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in AccessPolicyRuleList rules);
91 
92  /**
93  * Create the list of groups.
94  *
95  * @param errors - error message list
96  * @param result - list of IDs of created groups
97  * @param groups - list of groups to create
98  */
99  void createGroupList(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in AccessPolicyGroupList groups);
100 
101  /**
102  * Obtain a list of policies.
103  *
104  * @param list - policies
105  * @param totalItems - number of policies found
106  * @param query - query attributes and limits
107  */
108  void get(out AccessPolicyRuleList list, out long totalItems, in kerio::web::SearchQuery query);
109 
110  /**
111  * Get the list of groups, sorted in ascending order.
112  *
113  * @param groups - list of Access policy groups
114  */
115  void getGroupList(out AccessPolicyGroupList groups);
116 
117  /**
118  * Get the list of services.
119  *
120  * @param services - list of service info
121  */
122  void getServiceList(out ServiceTypeInfoList services);
123 
124  /**
125  * Remove policies.
126  *
127  * @param errors - error message list
128  * @param ruleIds - list of IDs of policy to be removed
129  */
130  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList ruleIds);
131 
132  /**
133  * Remove the list of groups.
134  *
135  * @param errors - error message list
136  * @param groupIds - list of IDs of group policy to be removed
137  */
138  void removeGroupList(out kerio::web::ErrorList errors, in kerio::web::KIdList groupIds);
139 
140  /**
141  * Set policy details.
142  *
143  * @param errors - error message list
144  * @param rules - rules to save
145  */
146  void set(out kerio::web::ErrorList errors, in AccessPolicyRuleList rules);
147 
148  /**
149  * Set the list of groups.
150  *
151  * @param errors - error message list
152  * @param groups - list of group to set
153  */
154  void setGroupList(out kerio::web::ErrorList errors, in AccessPolicyGroupList groups);
155 };
156 
157 }; }; };//end of namespace