All Classes Files Functions Variables Pages
Alerts.idl
Go to the documentation of this file.
1 /**
2  * @file Alerts.idl
3  * @brief Alert Messages API
4  * @version 3
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <common.idl>
9 #import <Users.idl>
10 
11 module webadmin {
12 
13 struct AlertRow {
14  kerio::web::KId id;
15  string date; /**< dd/Mon/YYYY HH:mm:ss, e.g. 15/Feb/2010 10:50:44 */
16  string alert; /**< char [128] */
17  string details; /**< char [256] */
18 };
19 typedef sequence<AlertRow> AlertRowList;
20 
21 struct AlertType {
22  kerio::web::KId id;
23  string name;
24 };
25 typedef sequence<AlertType> AlertTypeList;
26 
27 enum AlertEventRuleType {
28  AlertTraffic,
29  AlertContent
30 };
31 
32 struct AlertRuleEvent {
33  AlertEventRuleType ruleType;
34  IdReference rule;
35 };
36 
37 typedef sequence<AlertRuleEvent> AlertRuleEventList;
38 
39 struct AlertLogEvent {
40  kerio::web::KId log;
41  string name;
42  long interval;
43  boolean isRegex;
44  string condition;
45 };
46 
47 typedef sequence<AlertLogEvent> AlertLogEventList;
48 
49 struct AlertSetting {
50  kerio::web::KId id;
51  boolean enabled;
52  Addressee addressee;
53  kerio::web::KIdList alertList; /**< System events */
54  AlertRuleEventList ruleEventList; /**< Rule events */
55  AlertLogEventList logEventList; /**< Log events */
56  IdReference validTimeRange;
57 };
58 typedef sequence<AlertSetting> AlertSettingList;
59 
60 interface Alerts {
61 
62  /**
63  * Returns Alert Messages data
64  *
65  * @param list - output data
66  * @param totalItems - all data count
67  * @param query - paging query (sorting is not possible and it is ignored)
68  * @throws kerio::web::ApiException \n
69  * -32001 Session expired. - "The user is not logged in." \n
70  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
71  */
72  void get(out AlertRowList list, out long totalItems, in kerio::web::SearchQuery query);
73 
74  /**
75  * Returns content of given Alert Message as formatted HTML
76  *
77  * @param content - output data
78  * @param id - ID of given alert
79  * @throws kerio::web::ApiException \n
80  * -32001 Session expired. - "The user is not logged in." \n
81  * 1002 No such entity. - "The required record doesn't exist any more. The page will be reloaded." \n
82  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
83  */
84  void getContent(out string content, in kerio::web::KId id);
85 
86  /**
87  * Returns list of possible Alerts types
88  * @throws kerio::web::ApiException \n
89  * -32001 Session expired. - "The user is not logged in." \n
90  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
91  */
92  void getAlertTypes(out AlertTypeList types);
93 
94  /**
95  * Returns list of user defined alert handling
96  * @throws kerio::web::ApiException \n
97  * -32001 Session expired. - "The user is not logged in." \n
98  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
99  */
100  void getSettings(out AlertSettingList config);
101 
102  /**
103  * Stores list of user defined alert handling
104  * @param errors - list of items that cannot be changed. \n
105  * 8002 Database error. - "Unable to modify alert '%1' for '%2'." \n
106  * 8002 Database error. - "Unable to create alert '%1' for '%2'." \n
107  * 8002 Database error. - "Unable to remove alert '%1' for '%2'."
108  * @param config - structure with complete alerts settings
109  * @throws kerio::web::ApiException \n
110  * -32001 Session expired. - "The user is not logged in." \n
111  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
112  */
113  void setSettings(out kerio::web::ErrorList errors, in AlertSettingList config);
114 
115  /**
116  * Returns default language for Alert emails
117  * @throws kerio::web::ApiException \n
118  * -32001 Session expired. - "The user is not logged in." \n
119  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
120  */
121  void getDefaultLanguage(out string lang);
122 
123  /**
124  * Stores default language for Alert emails
125  * @throws kerio::web::ApiException \n
126  * -32001 Session expired. - "The user is not logged in." \n
127  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
128  */
129  void setDefaultLanguage(in string lang);
130 };
131 
132 }; //webadmin
string alert
Definition: Alerts.idl:16
Definition: Alerts.idl:13
Common Kerio Control structures, enums and types.
Definition: SharedStructures.idl:139
API for Kerio Control Users.
Definition: Alerts.idl:49
AlertLogEventList logEventList
Definition: Alerts.idl:55
Definition: Alerts.idl:32
AlertRuleEventList ruleEventList
Definition: Alerts.idl:54
string date
Definition: Alerts.idl:15
Definition: common.idl:28
Definition: Users.idl:105
Definition: Alerts.idl:60
string details
Definition: Alerts.idl:17
Definition: Alerts.idl:21
Definition: Accounting.idl:11
Definition: Alerts.idl:39
kerio::web::KIdList alertList
Definition: Alerts.idl:53