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  AntivirusWaitingForInitialDb ///< waiting for download of initial threat definitions database
46 };
47 
49  boolean internalEnabled; ///< integrated antivirus is used?
50  boolean externalEnabled; ///< an external antivirus is used? note: both internal and extenal can be used together
51  AntivirusStatus status; ///< status of antivirus to be used for informative message
52  ExternalAntivirusList externalList; ///< list of available antivirus plugins
53  string selectedExternalId; ///< identifier of currently selected antivirus plugin
54  InternalAntivirus internal; ///< integrated engine settings
55 };
56 
57 enum AntivirusUpdatePhases {
58  AntivirusUpdateStarted, ///< "Update process started"
59  AntivirusUpdateChecking, ///< "Checking for new version..."
60  AntivirusUpdateDownload, ///< "Downloading new virus definition files..."
61  AntivirusUpdateDownloadEngine, ///< "Downloading new engine..."
62  AntivirusUpdateOk, ///< Update finished, update not called yet
63  AntivirusUpdateFailed ///< "Update failed (see error log)"
64 };
65 
67  AntivirusUpdatePhases phase; ///< state of update process
68  long percentage; ///< percent of progress, valid for: AntivirusUpdateChecking, AntivirusUpdateDownload, AntivirusUpdateDownloadEngine
69  TimeSpan databaseAge; ///< how old is virus database
70  TimeSpan lastUpdateCheck; ///< how long is since last database update check
71  string databaseVersion; ///< virus database version
72  string engineVersion; ///< scanning engine version
73 };
74 
75 /**
76  * Product dependent part
77  */
78 
80  boolean http;
81  boolean ftp;
82  boolean smtp;
83  boolean pop3;
84 };
85 
86 enum ScanRuleType {
87  ScanRuleUrl,
88  ScanRuleMime,
89  ScanRuleFilename,
90  ScanRuleFileGroup
91 };
92 
94  kerio::web::KId id;
95  boolean enabled;
96  ScanRuleType type;
97  string pattern;
98  boolean scan;
99  string description;
100 };
101 
102 typedef sequence<ScanRuleConfig> ScanRuleConfigList;
103 
105  boolean moveToQuarantine; ///< not available on Linux
106  boolean alertClient;
107  boolean allowNotScanned;
108  ScanRuleConfigList scanRuleList;
109 };
110 
112  boolean moveToQuarantine; ///< not available on Linux
113  kerio::web::OptionalString prependText;
114  boolean allowTls;
115  boolean allowNotScanned;
116 };
117 
119  AntivirusSetting antivirus;
120  ScannedProtocols protocols;
121  kerio::web::OptionalLong fileSizeLimit;
122  HttpFtpScanningConfig httpFtpScanning;
123  EmailScanningConfig emailScanning;
124 };
125 
126 interface Antivirus {
127 
128  /**
129  * Get Antivirus Settings
130  * @throws kerio::web::ApiException \n
131  * -32001 Session expired. - "The user is not logged in." \n
132  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
133  */
134  void get(out AntivirusConfig config);
135 
136  /**
137  * Set Antivirus
138  * @param errors - list of errors \n
139  * 1000 Operation failed. - various errors from antivirus plugins \n
140  * 8002 Database error. - "Unable to modify scanning rule '%1'." \n
141  * 8002 Database error. - "Unable to modify antivirus option '%1'." \n
142  * 8002 Database error. - "Unable to create scanning rule '%1'." \n
143  * 8002 Database error. - "Unable to create antivirus option '%1'." \n
144  * 8002 Database error. - "Unable to delete scanning rule '%1'." \n
145  * 8002 Database error. - "Unable to delete antivirus option '%1'."
146  * @param config - structure with complete antivirus settings
147  * @throws kerio::web::ApiException \n
148  * -32001 Session expired. - "The user is not logged in." \n
149  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
150  */
151  void set(out kerio::web::ErrorList errors, in AntivirusConfig config);
152 
153  /**
154  * Force update of integrated antivirus
155  * @throws kerio::web::ApiException \n
156  * -32001 Session expired. - "The user is not logged in." \n
157  * 1000 Operation failed. - "Failed to run antivirus update." \n
158  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
159  */
160  void update();
161 
162  /**
163  * Get progres of antivirus updating
164  * @throws kerio::web::ApiException \n
165  * -32001 Session expired. - "The user is not logged in." \n
166  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
167  */
168  void getUpdateStatus(out InternalUpdateStatus status);
169 
170 };
171 
172 }; //webadmin
TimeSpan databaseAge
how old is virus database
Definition: Antivirus.idl:69
AntivirusUpdatePhases phase
state of update process
Definition: Antivirus.idl:67
AntivirusStatus status
status of antivirus to be used for informative message
Definition: Antivirus.idl:51
boolean externalEnabled
an external antivirus is used? note: both internal and extenal can be used together ...
Definition: Antivirus.idl:50
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:68
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:52
string selectedExternalId
identifier of currently selected antivirus plugin
Definition: Antivirus.idl:53
string defaultValue
read only value
Definition: Antivirus.idl:19
boolean moveToQuarantine
not available on Linux
Definition: Antivirus.idl:112
Definition: Antivirus.idl:104
string databaseVersion
virus database version
Definition: Antivirus.idl:71
Definition: Antivirus.idl:93
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:126
boolean moveToQuarantine
not available on Linux
Definition: Antivirus.idl:105
Definition: SharedStructures.idl:298
Definition: Antivirus.idl:118
TimeSpan lastUpdateCheck
how long is since last database update check
Definition: Antivirus.idl:70
Definition: Antivirus.idl:48
Definition: Antivirus.idl:66
boolean internalEnabled
integrated antivirus is used?
Definition: Antivirus.idl:49
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:72
Definition: Antivirus.idl:24
Definition: Accounting.idl:11
Definition: Antivirus.idl:79
Definition: SharedStructures.idl:289
Definition: Antivirus.idl:111