All Classes Files Functions Variables Enumerations Enumerator Groups Pages
IpAddressGroups.idl
Go to the documentation of this file.
1 /**
2  * @file IpAddressGroups.idl
3  * @brief Ip Address %Group settings
4  *
5  * @author Dusan Juhas, Roman Jokl
6  *
7  * Copyright © 2011-2012 Kerio Technologies s.r.o.
8  */
9 #import <kerio/web/idl/SharedStructures.idl>
10 
11 module kerio {
12 module web {
13 
14 /**
15  * @defgroup SUBGROUP3 Definitions
16  * @{
17  */
18 
19 
20 enum IpAddressGroupType {
21  Host,
22  Network,
23  Range,
24  ChildGroup,
25  ThisMachine,
26  IpPrefix
27 };
28 
30  KId id;
31  string name;
32 };
33 
34 /**
35  *
36  * Note: If type is changed, all fields representing associated value must be also assigned, if used in set method.
37  * And conversely, type must be assigned if value was changed.
38  * type + host + (addr1, addr2) + childGroupId
39  */
41  KId id;
42  KId groupId;
43  string groupName;
44  string description;
45 
46  IpAddressGroupType type;
47  boolean enabled;
48  StoreStatus status;
49 
50  /*@{ host */
51  string host; ///< name, IP or IP prefix
52  /*@}*/
53 
54  /*@{ network, range */
55  IpAddress addr1; ///< network/from, e.g. 192.168.0.0
56  IpAddress addr2; ///< mask/to, e.g. 255.255.0.0
57  /*@}*/
58 
59  /*@{ group */
60  KId childGroupId;
61  string childGroupName;
62  /*@}*/
63 
64  /*@{ firewall */
65  // nothing
66  /*@}*/
67 };
68 
69 typedef sequence<IpAddressEntry> IpAddressEntryList;
70 typedef sequence<IpAddressGroup> IpAddressGroupList;
71 
72 interface IpAddressGroups {
73 
74  /**
75  * Create new groups.
76  *
77  * @param errors - possible errors:
78  * - "This address group already exists!" duplicate name-value
79  * @param result - list of IDs of created IpAddressGroups
80  * @param groups - details for new groups.
81  */
82  void create(out ErrorList errors, out CreateResultList result, in IpAddressEntryList groups);
83 
84  /**
85  * Get the list of IP groups.
86  *
87  * @param groups - list of groups and its details
88  * @param totalItems - count of all groups on the server (before the start/limit applied)
89  * @param query - conditions and limits. Included from weblib. KWF engine implementation notes:
90  * - LIKE matches substring (second argument) in a string (first argument). There are no wildcards.
91  * - sort and match are not case sensitive.
92  * - column alias (first operand):
93  * - TODO: "QUICKSEARCH" - requested operator applied as following: (name operator secondOperand ) || (description operator secondOperand)
94  */
95  void get(out IpAddressEntryList list, out long totalItems, in SearchQuery query);
96 
97  /**
98  * Get the list of groups, sorted in ascending order.
99  *
100  * @param groups - list of IP address groups
101  */
102  void getGroupList(out IpAddressGroupList groups);
103 
104  /**
105  * Remove groups.
106  *
107  * @param groupIds - IDs of groups that should be removed
108  * @param errors - Errors by removing groups
109  */
110  void remove(out ErrorList errors, in KIdList groupIds);
111 
112  /**
113  * Create groups.
114  *
115  * @param errors - possible errors:
116  * - "This address group already exists!" duplicate name-value
117  * @param groupIds - IDs of groups to be updated.
118  * @param details - details for update.
119  */
120  void set(out ErrorList errors, in KIdList groupIds, in IpAddressEntry details);
121 
122  /**
123  * Check if groups removal can cut off the administrator from remote administration
124  *
125  * @param groupIds - IDs of groups that should be removed
126  * @param errors - if the result is false, error argument contains additional error info; possible errors:
127  * - "You will be cut off from remote administration!"
128  */
129  void validateRemove(out ErrorList errors, in KIdList groupIds);
130 
131  /**
132  * Check update of existing groups to see whether this change cut off the administrator from remote administration.
133  *
134  * @param errors - if the result is false, error argument contains additional error info; possible errors:
135  * - "You will be cut off from remote administration!"
136  * @param groupIds - IDs of groups to be updated.
137  * @param details - details for update.
138  */
139  void validateSet(out ErrorList errors, in KIdList groupIds, in IpAddressEntry details);
140 
141 };
142 
143 }; // module web
144 }; // module kerio