All Classes Files Functions Variables Pages
BandwidthManagement.idl
Go to the documentation of this file.
1 /**
2  * @file BandwidthManagement.idl
3  * @brief API for Bandwidth Management
4  * @version 5
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <Users.idl>
9 #import <Interfaces.idl>
10 #import <common.idl>
11 #import <IpServices.idl>
12 
13 module webadmin {
14 
15 enum BMConditionType {
16  BMConditionTrafficType,
17  BMConditionQuota,
18  BMConditionLargeData,
19  BMConditionTrafficRule,
20  BMConditionContentRule,
21  BMConditionService,
22  BMConditionDscp,
23  BMConditionUsers,
24  BMConditionInvalid,
25  BMContentRuleType,
26  BMConditionGuests,
27  BMConditionApplication
28 };
29 
30 enum BMTrafficType {
31  BMTrafficEmail,
32  BMTrafficFtp,
33  BMTrafficInstantMessaging,
34  BMTrafficMultimedia,
35  BMTrafficP2p,
36  BMTrafficRemoteAccess,
37  BMTrafficSip,
38  BMTrafficVpn,
39  BMTrafficWeb
40 };
41 
42 struct BMCondition {
43  BMConditionType type;
44 
45  /*@{ TrafficRule, ContentRules */
46  IdReference valueId;
47  /*@}*/
48 
49  /*@{ Service */
50  IpServiceReference service;
51  /*@}*/
52 
53  /*@{ Dscp */
54  long dscp;
55  /*@}*/
56 
57  /*@{ TrafficType */
58  BMTrafficType trafficType;
59  /*@}*/
60 
61  /*@{ Users */
62  UserReference user; ///< @see UserManager
63  /*@}*/
64 
65  /*@{ Application */
66  long appId;
67  /*@}*/
68 
69 };
70 
71 typedef sequence<BMCondition> BMConditionList;
72 
74  boolean enabled;
75  long value;
76  BandwidthUnit unit;
77 };
78 
79 struct BMRule {
80  kerio::web::KId id;
81  boolean enabled;
82  string name;
83  string description;
84  string color;
85 
86  BMConditionList traffic;
87 
88  BandwidthSetting reservedDownload;
89  BandwidthSetting reservedUpload;
90  BandwidthSetting maximumDownload;
91  BandwidthSetting maximumUpload;
92 
93  IdReference interfaceId;
94  IdReference validTimeRange;
95  boolean chart;
96 };
97 
98 typedef sequence<BMRule> BMRuleList;
99 
101  long speed; ///> maximum speed of the link (defined in Interfaces); zero means "undefined"
102  BandwidthUnit unit; ///> unit for the speed value
103 };
104 
106  kerio::web::KId id;
107  string name; ///> name of the interface
108  InterfaceType type; ///> (e.g. ethernet, ras, etc.)
109  boolean online; ///> false = interface is offline (values download and upload should be ignored)
110 
112  InternetBandwidthData upload;
113 };
114 
115 typedef sequence<InternetBandwidth> InternetBandwidthList;
116 
118  boolean decryptVpnTunnels; ///>Traffic in VPN tunnels will be matched against rules decrypted
119  BMRuleList rules;
120 };
121 
123  /**
124  * Get the list of Bandwidth Management rules
125  *
126  * @param config - Bandwidth Management rules
127  * @throws kerio::web::ApiException \n
128  * -32001 Session expired. - "The user is not logged in." \n
129  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
130  */
131  void get(out BandwidthManagementConfig config);
132 
133  /**
134  * Stores the list of Bandwidth Management rules
135  *
136  * @param errors - list of errors \n
137  * 8002 Database error. - "Unable to modify rule '%1'." \n
138  * 8002 Database error. - "Unable to create rule '%1'." \n
139  * 8002 Database error. - "Unable to delete rule '%1'."
140  * @param config - Bandwidth Management rules
141  * @throws kerio::web::ApiException \n
142  * -32001 Session expired. - "The user is not logged in." \n
143  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
144  */
145  void set(out kerio::web::ErrorList errors, in BandwidthManagementConfig config);
146 
147  /**
148  * Returns list of Internet interfaces and their current usage
149  *
150  * @param list - list of interfaces (sorted by name); empty if there are no Internet interfaces
151  * @throws kerio::web::ApiException \n
152  * -32001 Session expired. - "The user is not logged in." \n
153  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
154  */
155  void getBandwidth(out InternetBandwidthList list);
156 
157  /**
158  * Stores the list of Bandwidth Management rules
159  * Note: from the InternetBandwidth structure only values id, download/upload speed and unit are used
160  *
161  * @param errors - list of errors \n
162  * 8002 Database error. - "Unable to set bandwidth properties for interface %1."
163  * @param list - list of Bandwidth Management rules
164  * @throws kerio::web::ApiException \n
165  * -32001 Session expired. - "The user is not logged in." \n
166  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
167  */
168  void setBandwidth(out kerio::web::ErrorList errors, in InternetBandwidthList list);
169 
170 };
171 
172 };//webadmin
Definition: IpServices.idl:14
Common Kerio Control structures, enums and types.
API for Kerio Control Users.
Definition: Users.idl:91
Definition: BandwidthManagement.idl:100
Definition: common.idl:28
BandwidthUnit unit
maximum speed of the link (defined in Interfaces); zero means "undefined"
Definition: BandwidthManagement.idl:102
BMRuleList rules
>Traffic in VPN tunnels will be matched against rules decrypted
Definition: BandwidthManagement.idl:119
Definition: BandwidthManagement.idl:42
boolean online
(e.g. ethernet, ras, etc.)
Definition: BandwidthManagement.idl:109
API for services administration.
Definition: BandwidthManagement.idl:122
Definition: BandwidthManagement.idl:117
InternetBandwidthData download
false = interface is offline (values download and upload should be ignored)
Definition: BandwidthManagement.idl:111
API for network interfaces administration.
Definition: Accounting.idl:11
Definition: BandwidthManagement.idl:79
InterfaceType type
name of the interface
Definition: BandwidthManagement.idl:108
Definition: BandwidthManagement.idl:105
UserReference user
Definition: BandwidthManagement.idl:62
Definition: BandwidthManagement.idl:73