All Classes Files Functions Variables Pages
Ports.idl
Go to the documentation of this file.
1 /**
2  * @file Ports.idl
3  * @brief Ports API for HW Box
4  * @version 2
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 
9 module webadmin {
10 
11 enum PortAssignmentType {
12  PortAssignmentSwitch,
13  PortAssignmentStandalone,
14  PortAssignmentUnassigned
15 };
16 
17 enum PortType {
18  PortEthernet,
19  PortWifi
20 };
21 
22 enum SpeedDuplexType {
23  SpeedDuplexAuto,
24  SpeedDuplexHalf10,
25  SpeedDuplexFull10,
26  SpeedDuplexHalf100,
27  SpeedDuplexFull100,
28  SpeedDuplexFull1000
29 };
30 
31 typedef sequence<SpeedDuplexType> SpeedDuplexMayNotWorkList;
32 
33 struct PortConfig {
34  kerio::web::KId id; /**< read-only */
35  PortType type; /**< read-only */
36  string name; /**< read-only */
37  PortAssignmentType assignment;
39  SpeedDuplexType speedDuplex;
40  SpeedDuplexMayNotWorkList speedDuplexMayNotWork;
41 };
42 
43 typedef sequence<PortConfig> PortConfigList;
44 
45 interface Ports {
46 
47  /**
48  * Returns list of system ports together with assignments
49  * @param list - list of ports sorted by port's order of precedence (WiFi last)
50  * @throws kerio::web::ApiException \n
51  * -32001 Session expired. - "The user is not logged in." \n
52  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
53  * @note: System version has to support port and switch configuration
54  */
55  void get(out PortConfigList list);
56 
57  /**
58  * Stores configuration for system ports
59  *
60  * If some of given items has id, that doesn't exist in current configuration, Error is returned \n
61  * Unknown items are not added, no item is deleted
62  * @param errors - list of errors \n
63  * 1000 Operation failed. - "Unable to modify port '%1'." \n
64  * 8000 Internal error. - "Internal error."
65  * @param ports - list of ports (order is not significant)
66  * @param revertTimeout - If client doesn't confirm config to this timeout, configuration is reverted (0 - revert disabled)
67  * @throws kerio::web::ApiException \n
68  * -32001 Session expired. - "The user is not logged in." \n
69  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
70  * @note: System version has to support port and switch configuration
71  */
72  void set(out kerio::web::ErrorList errors, in PortConfigList ports, in long revertTimeout);
73 
74 };
75 
76 }; //webadmin
Definition: Ports.idl:33
string name
Definition: Ports.idl:36
kerio::web::KId id
Definition: Ports.idl:34
PortType type
Definition: Ports.idl:35
Definition: Ports.idl:45
Definition: Accounting.idl:11
Definition: SharedStructures.idl:289