All Classes Files Functions Variables Pages
ActiveHosts.idl
Go to the documentation of this file.
1 /**
2  * @file ActiveHosts.idl
3  * @brief Active Hosts API
4  * @version 2
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <kerio/web/idl/SystemHealth.idl>
9 #import <Users.idl>
10 #import <common.idl>
11 
12 module webadmin {
13 
14 enum ActiveHostType {
15  ActiveHostFirevall,
16  ActiveHostVpnClient,
17  ActiveHostHost,
18  ActiveHostGuest
19 };
20 
21 enum AuthMethodType {
22  AuthMethodWeb, /**< Plaintext */
23  AuthMethodSslWeb, /**< SSL */
24  AuthMethodNtlm, /**< NTLM */
25  AuthMethodProxy, /**< Proxy */
26  AuthMethodAutomatic,/**< Automatic */
27  AuthMethodVpnClient,/**< VPN Client */
28  AuthMethodSso, /**< "Kerio Unity Sign-On" */
29  AuthMethodApi, /**< webadmin API */
30  AuthMethodRadius, /**< webadmin API */
31  AuthMethodNone /**< "" */
32 };
33 
34 struct ActiveHost {
35  kerio::web::KId id;
36  ActiveHostType type;
37  kerio::web::IpAddress ip;
38  Ip6AddressList ip6Addresses;
39  string hostname;
40  string macAddress;
41  boolean ipAddressFromDHCP;
42  DateTimeConfig startTime; /**< @see SystemConfig.idl */
43  long inactivityTime; /**< in seconds */
44  UserReference user;
45 
46  DateTimeConfig loginTime; /**< @see SystemConfig.idl */
47  long loginDuration; /**< in seconds */
48  AuthMethodType authMethod;
49  long connections;
50 
51  double totalDownload; /**< in KB */
52  double totalUpload; /**< in KB */
53  double currentDownload; /**< in KB */
54  double currentUpload; /**< in KB */
55 };
56 
57 typedef sequence<ActiveHost> ActiveHostList;
58 
59 
60 enum ActivityType {
61  ActivityTypeWeb, /**< not used in current implementation */
62  ActivityTypeWebSearch,
63  ActivityTypeMail,
64  ActivityTypeDownload,
65  ActivityTypeUpload,
66  ActivityTypeMultimedia,
67  ActivityTypeP2p,
68  ActivityTypeRemoteAccess,
69  ActivityTypeVpn,
70  ActivityTypeInstantMessaging,
71  ActivityTypeHugeConnection,
72  ActivityTypeMailConnection,
73  ActivityTypeP2pAttempt,
74  ActivityTypeWebConnection,
75  ActivityTypeHTTPConnection,
76  ActivityTypeWebMultimedia,
77  ActivityTypeSip,
78  ActivityTypeSocialNetwork
79 };
80 
81 struct Activity {
82  kerio::web::KId id;
83  TimeHMS time; /**< @see SystemConfig.idl */
84  ActivityType type;
86  string url;
87 };
88 
89 typedef sequence<Activity> ActivityList;
90 
91 interface ActiveHosts {
92 
93  /**
94  * Returns Active Hosts data
95  *
96  * @param list - output data
97  * @param totalItems - all data count
98  * @param query - filter/sort query
99  * @param refresh - true in case, that data snapshot have to be refreshed
100  * @throws kerio::web::ApiException \n
101  * -32001 Session expired. - "The user is not logged in." \n
102  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
103  */
104  void get(out ActiveHostList list, out long totalItems, in kerio::web::SearchQuery query, in boolean refresh);
105 
106  /**
107  * Returns Activities for specified host
108  *
109  * @param list - output data
110  * @param id - Active Host id returned by get
111  * @throws kerio::web::ApiException \n
112  * -32001 Session expired. - "The user is not logged in." \n
113  * 1002 No such entity. - "Invalid host id." \n
114  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
115  */
116  void getActivityList(out ActivityList list, in kerio::web::KId id);
117 
118  /**
119  * Returns throughput Histogram for specified host
120  *
121  * @param hist - samples of traffic rate for given host
122  * @param type - granularity (two hours or one day)
123  * @param id - Active Host id returned by get
124  * @throws kerio::web::ApiException \n
125  * -32001 Session expired. - "The user is not logged in." \n
126  * 1002 No such entity. - "Invalid host id." \n
127  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
128  */
129  void getHistogram(out Histogram hist, in kerio::web::HistogramType type, in kerio::web::KId id);
130 
131  /**
132  * Returns throughput Histogram for specified host
133  *
134  * @param hist - output data
135  * @param sampleTime - Returns first time, that is not included in returned data (pass it to the same method again as a lastSampleTime to obtain only new data since last request)
136  * @param startSampleTime - Specifies starting time for returned data
137  * @param type - granularity
138  * @param id - rule or interface id returned in item.id member by get
139  * @throws kerio::web::ApiException \n
140  * -32001 Session expired. - "The user is not logged in." \n
141  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
142  */
143  void getHistogramInc(out Histogram hist, out kerio::web::DateTimeStamp sampleTime, in kerio::web::HistogramIntervalType type, in kerio::web::KId id, in kerio::web::DateTimeStamp startSampleTime);
144 
145  /**
146  * Logout users from specified hosts / empty for all hosts
147  *
148  * @param ids - Active Host ids returned by get or empty for logout all hosts
149  * @throws kerio::web::ApiException \n
150  * -32001 Session expired. - "The user is not logged in." \n
151  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
152  */
153  void logout(in kerio::web::KIdList ids);
154 
155  /**
156  * Logs in user for specified host
157  *
158  * @param hostId - internal identifier of a host computer in network
159  * @param userName - Name of a user to be loged from given host specified by hostId (including domain if needed)
160  * @throws kerio::web::ApiException \n
161  * -32001 Session expired. - "The user is not logged in." \n
162  * 1000 Operation failed. - "Some user is already logged in from specified host." \n
163  * 1002 No such entity. - "Invalid host id." \n
164  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
165  */
166  void login(in kerio::web::KId hostId, in string userName);
167 
168 };
169 
170 };//webadmin
DateTimeConfig loginTime
Definition: ActiveHosts.idl:46
Common Kerio Control structures, enums and types.
double currentUpload
Definition: ActiveHosts.idl:54
Definition: SharedStructures.idl:139
API for Kerio Control Users.
DateTimeConfig startTime
Definition: ActiveHosts.idl:42
long loginDuration
Definition: ActiveHosts.idl:47
double currentDownload
Definition: ActiveHosts.idl:53
Definition: Users.idl:91
long inactivityTime
Definition: ActiveHosts.idl:43
Definition: common.idl:62
TimeHMS time
Definition: ActiveHosts.idl:83
Definition: common.idl:93
Definition: ActiveHosts.idl:34
Definition: SharedStructures.idl:151
double totalUpload
Definition: ActiveHosts.idl:52
Definition: ActiveHosts.idl:91
Definition: common.idl:56
double totalDownload
Definition: ActiveHosts.idl:51
Definition: ActiveHosts.idl:81
Definition: Accounting.idl:11