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