All Classes Files Functions Variables Pages
Antivirus.idl
Go to the documentation of this file.
1 /**
2  * @file Antivirus.idl
3  * @brief API for Antivirus page
4  * @version 3
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <common.idl>
9 
10 module webadmin {
11 
12 /**
13  * Common part, that can be shared between the products
14  */
15 
17  string name;
18  string content;
19  string defaultValue; ///< read only value
20 };
21 
22 typedef sequence<AntivirusOption> AntivirusOptionList;
23 
25  string id; ///< example: avir_avg
26  string description; ///< example: AVG Email Server Edition
27  boolean areOptionsAvailable;
28  AntivirusOptionList options;
29 };
30 
31 typedef sequence<ExternalAntivirus> ExternalAntivirusList;
32 
34  kerio::web::OptionalLong updateCheckInterval; ///< should we periodically ask for a new version? + update checking period in hours
35  boolean available; ///< license is valid for internal antivirus, it is present: true - checkbox "Use integrated..." is enabled
36  boolean expired; ///< license is not valid for McAfee: message "McAfee(R) antivirus subscription expired." is displayed
37 };
38 
39 enum AntivirusStatus {
40  AntivirusOk, ///< no message is needed
41  AntivirusNotActive, ///< neither internal nor external antivirus is active
42  AntivirusInternalFailed, ///< problem with internal intivirus
43  AntivirusExternalFailed, ///< problem with external intivirus
44  AntivirusBothFailed ///< both internal and external antivirus has failed
45 };
46 
48  boolean internalEnabled; ///< integrated antivirus is used?
49  boolean externalEnabled; ///< an external antivirus is used? note: both internal and extenal can be used together
50  AntivirusStatus status; ///< status of antivirus to be used for informative message
51  ExternalAntivirusList externalList; ///< list of available antivirus plugins
52  string selectedExternalId; ///< identifier of currently selected antivirus plugin
53  InternalAntivirus internal; ///< integrated engine settings
54 };
55 
56 enum AntivirusUpdatePhases {
57  AntivirusUpdateStarted, ///< "Update process started"
58  AntivirusUpdateChecking, ///< "Checking for new version..."
59  AntivirusUpdateDownload, ///< "Downloading new virus definition files..."
60  AntivirusUpdateDownloadEngine, ///< "Downloading new engine..."
61  AntivirusUpdateOk, ///< Update finished, update not called yet
62  AntivirusUpdateFailed ///< "Update failed (see error log)"
63 };
64 
66  AntivirusUpdatePhases phase; ///< state of update process
67  long percentage; ///< percent of progress, valid for: AntivirusUpdateChecking, AntivirusUpdateDownload, AntivirusUpdateDownloadEngine
68  TimeSpan databaseAge; ///< how old is virus database
69  TimeSpan lastUpdateCheck; ///< how long is since last database update check
70  string databaseVersion; ///< virus database version
71  string engineVersion; ///< scanning engine version
72 };
73 
74 /**
75  * Product dependent part
76  */
77 
79  boolean http;
80  boolean ftp;
81  boolean smtp;
82  boolean pop3;
83 };
84 
85 enum ScanRuleType {
86  ScanRuleUrl,
87  ScanRuleMime,
88  ScanRuleFilename,
89  ScanRuleFileGroup
90 };
91 
93  kerio::web::KId id;
94  boolean enabled;
95  ScanRuleType type;
96  string pattern;
97  boolean scan;
98  string description;
99 };
100 
101 typedef sequence<ScanRuleConfig> ScanRuleConfigList;
102 
104  boolean moveToQuarantine; ///< not available on Linux
105  boolean alertClient;
106  boolean allowNotScanned;
107  ScanRuleConfigList scanRuleList;
108 };
109 
111  boolean moveToQuarantine; ///< not available on Linux
112  kerio::web::OptionalString prependText;
113  boolean allowTls;
114  boolean allowNotScanned;
115 };
116 
117 struct SslVpnScanningConfig { ///< not available on Linux
118  boolean scanUpload;
119  boolean scanDownload;
120  boolean allowNotScanned;
121 };
122 
124  AntivirusSetting antivirus;
125  ScannedProtocols protocols;
126  kerio::web::OptionalLong fileSizeLimit;
127  HttpFtpScanningConfig httpFtpScanning;
128  EmailScanningConfig emailScanning;
129  SslVpnScanningConfig sslVpnScanning; ///< not available on Linux
130 };
131 
132 interface Antivirus {
133 
134  /**
135  * Get Antivirus Settings
136  * @throws kerio::web::ApiException \n
137  * -32001 Session expired. - "The user is not logged in." \n
138  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
139  */
140  void get(out AntivirusConfig config);
141 
142  /**
143  * Set Antivirus
144  * @param errors - list of errors \n
145  * 1000 Operation failed. - various errors from antivirus plugins \n
146  * 8002 Database error. - "Unable to modify scanning rule '%1'." \n
147  * 8002 Database error. - "Unable to modify antivirus option '%1'." \n
148  * 8002 Database error. - "Unable to create scanning rule '%1'." \n
149  * 8002 Database error. - "Unable to create antivirus option '%1'." \n
150  * 8002 Database error. - "Unable to delete scanning rule '%1'." \n
151  * 8002 Database error. - "Unable to delete antivirus option '%1'."
152  * @param config - structure with complete antivirus settings
153  * @throws kerio::web::ApiException \n
154  * -32001 Session expired. - "The user is not logged in." \n
155  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
156  */
157  void set(out kerio::web::ErrorList errors, in AntivirusConfig config);
158 
159  /**
160  * Force update of integrated antivirus
161  * @throws kerio::web::ApiException \n
162  * -32001 Session expired. - "The user is not logged in." \n
163  * 1000 Operation failed. - "Failed to run antivirus update." \n
164  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
165  */
166  void update();
167 
168  /**
169  * Get progres of antivirus updating
170  * @throws kerio::web::ApiException \n
171  * -32001 Session expired. - "The user is not logged in." \n
172  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
173  */
174  void getUpdateStatus(out InternalUpdateStatus status);
175 
176 };
177 
178 }; //webadmin
TimeSpan databaseAge
how old is virus database
Definition: Antivirus.idl:68
AntivirusUpdatePhases phase
state of update process
Definition: Antivirus.idl:66
AntivirusStatus status
status of antivirus to be used for informative message
Definition: Antivirus.idl:50
boolean externalEnabled
an external antivirus is used? note: both internal and extenal can be used together ...
Definition: Antivirus.idl:49
string id
example: avir_avg
Definition: Antivirus.idl:25
Common Kerio Control structures, enums and types.
long percentage
percent of progress, valid for: AntivirusUpdateChecking, AntivirusUpdateDownload, AntivirusUpdateDown...
Definition: Antivirus.idl:67
boolean scanUpload
< not available on Linux
Definition: Antivirus.idl:118
boolean available
license is valid for internal antivirus, it is present: true - checkbox "Use integrated..." is enabled
Definition: Antivirus.idl:35
ExternalAntivirusList externalList
list of available antivirus plugins
Definition: Antivirus.idl:51
string selectedExternalId
identifier of currently selected antivirus plugin
Definition: Antivirus.idl:52
string defaultValue
read only value
Definition: Antivirus.idl:19
boolean moveToQuarantine
not available on Linux
Definition: Antivirus.idl:111
Definition: Antivirus.idl:103
string databaseVersion
virus database version
Definition: Antivirus.idl:70
Definition: Antivirus.idl:92
Definition: Antivirus.idl:33
string description
example: AVG Email Server Edition
Definition: Antivirus.idl:26
Definition: common.idl:67
Definition: Antivirus.idl:16
kerio::web::OptionalLong updateCheckInterval
should we periodically ask for a new version? + update checking period in hours
Definition: Antivirus.idl:34
Definition: Antivirus.idl:132
Definition: Antivirus.idl:117
SslVpnScanningConfig sslVpnScanning
not available on Linux
Definition: Antivirus.idl:129
boolean moveToQuarantine
not available on Linux
Definition: Antivirus.idl:104
Definition: SharedStructures.idl:298
Definition: Antivirus.idl:123
TimeSpan lastUpdateCheck
how long is since last database update check
Definition: Antivirus.idl:69
Definition: Antivirus.idl:47
Definition: Antivirus.idl:65
boolean internalEnabled
integrated antivirus is used?
Definition: Antivirus.idl:48
boolean expired
license is not valid for McAfee: message "McAfee(R) antivirus subscription expired." is displayed
Definition: Antivirus.idl:36
string engineVersion
scanning engine version
Definition: Antivirus.idl:71
Definition: Antivirus.idl:24
Definition: Accounting.idl:11
Definition: Antivirus.idl:78
Definition: SharedStructures.idl:289
Definition: Antivirus.idl:110