All Classes Files Functions Variables Pages
Configuration.idl
Go to the documentation of this file.
1 /**
2  * @file Configuration.idl
3  * @brief API for Configuration export/import
4  * @version 3
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <Interfaces.idl>
9 
10 module webadmin {
11 
12 struct ExportOptions {
13  boolean certificates;
14  boolean dhcpLeases;
15  boolean stats;
16 };
17 
19  kerio::web::KId importedId;
20  string name;
21  InterfaceGroupType group;
22  kerio::web::IpAddress ip;
23  InterfaceType type;
24  boolean useForFullImport;
25  IdReference currentInterface; // id and system name of the corresponding interface in the currently running machine
26  kerio::web::KId portId; // only for engine purposes
27  boolean wifi;
28 };
29 
30 typedef sequence<ImportedInterface> ImportedInterfaceList;
31 
33  IdReference id; // id and system name of the interface in the currently running machine
34  kerio::web::IpAddress ip;
35  string MAC;
36  InterfaceType type;
37  boolean useForFullImport;
38  boolean wifi;
39 };
40 
41 typedef sequence<CurrentInterface> CurrentInterfaceList;
42 
43 interface Configuration {
44 
45  /**
46  * Creates backup file and returns id.
47  *
48  * @param fileDownload - description of the output file
49  * @param options - A set of options which configuration variables/list to store in exported file.
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." \n
53  * 1000 Operation failed. - "Unable to create temporary directory." \n
54  * 1000 Operation failed. - "Error during tar archive creation."
55  */
56  void exportConfig(out kerio::web::Download fileDownload, in ExportOptions options);
57 
58  /**
59  * Returns additiaonal information about imported configuration needed during it's import.
60  *
61  * @param errors - list of errors \n
62  * 1000 Operation failed. - "Extraction has already started." \n
63  * 1000 Operation failed. - "Unable to create temporary directory." \n
64  * 1000 Operation failed. - "Unable to process imported file." \n
65  * 1000 Operation failed. - "Unable to import configuration from a version older than %1." \n
66  * 1000 Operation failed. - "Unable to import configuration, the version in the configuration file is higher than the version needed."
67  * @param fullImportPossible - tells whether it is possible to import configuration 1:1 (with IP settings).
68  * @param needIfaceMapping - tells whether it has to be setup iface mapping in case of fullImportPossible
69  * @param importedInterfaces - a list of interfaces loaded from the imported configuration file.
70  * @param currentInterfaces - a list of interfaces available in currently loaded configuration.
71  * @param fileId - id of uploaded configuration file. (see spec. for uploader)
72  * @throws kerio::web::ApiException \n
73  * -32001 Session expired. - "The user is not logged in." \n
74  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
75  * 8000 Internal error. - "Internal error."
76  */
77  void getImportInfo(out kerio::web::ErrorList errors, out boolean fullImportPossible, out boolean needIfaceMapping, out ImportedInterfaceList importedInterfaces, out CurrentInterfaceList currentInterfaces, in string fileId);
78 
79  /**
80  * Applies changes obtained from imported configuration file and users interaction.
81  *
82  * @param errors - list of errors \n
83  * 1000 Operation failed. - "Imported configuration cannot be loaded." \n
84  * 1000 Operation failed. - "Impotred configuration cannot be saved."
85  * @param interfaces - a list of interfaces from imported configuration with mappings to the currently present interfeces. This mapping should be ignored in fullimport.
86  * @param id - id of uploaded configuration file. (see spec. for uploader)
87  * @param fullImport - whether to do a full import (overvrite IP & domain setting with imported values)
88  * @param keepIdInFullImport - full import through kmanager will keep instanceId
89  * @throws kerio::web::ApiException \n
90  * -32001 Session expired. - "The user is not logged in." \n
91  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
92  * 1000 Operation failed. - "Upload wasn't finished."
93  */
94  void apply(out kerio::web::ErrorList errors, in ImportedInterfaceList interfaces, in string id, in boolean fullImport, in [Opt] boolean keepIdInFullImport);
95 
96  };
97 
98 }; //webadmin
Definition: Configuration.idl:18
Definition: SharedStructures.idl:342
Definition: Configuration.idl:12
Definition: common.idl:28
Definition: Configuration.idl:32
API for network interfaces administration.
Definition: Accounting.idl:11
Definition: Configuration.idl:43