All Classes Files Functions Variables Pages
Dns.idl
Go to the documentation of this file.
1 /**
2  * @file Dns.idl
3  * @brief Dns API
4  * @version 2
5  */
6 
7 #import <common.idl>
8 
9 module webadmin {
10 
11 struct DnsForwarder {
12  boolean enabled;
13  string domain; ///< network/mask for Reverse DNS query, other for Name DNS query
14  string forwarders; ///< empty for Do not forward
15 };
16 
17 typedef sequence<DnsForwarder> DnsForwarderList;
18 
19 struct DnsConfig {
20  boolean forwarderEnabled;
21 
22  boolean cacheEnabled;
23  boolean customForwardingEnabled;
24  DnsForwarderList customForwarders;
25  kerio::web::OptionalString useDomainControler; ///< read-only, enabled - true in case, that domain controller will be used
26  ///< value - dns queries, that matches this string, will be passed to domain controller
27 
28  boolean hostsEnabled;
29  boolean dhcpLookupEnabled;
30  string domainName;
31 };
32 
33 struct DnsHost {
34  boolean enabled;
35  kerio::web::KId id;
36  kerio::web::IpAddress ip;
37  string hosts;
38  string description;
39 };
40 typedef sequence<DnsHost> DnsHostList;
41 
42 
43 interface Dns {
44 
45  /**
46  * Returns DNS configuration
47  * @throws kerio::web::ApiException \n
48  * -32001 Session expired. - "The user is not logged in." \n
49  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
50  */
51  void get(out DnsConfig config);
52 
53  /**
54  * Returns DNS ip/hosts mapping
55  * @throws kerio::web::ApiException \n
56  * -32001 Session expired. - "The user is not logged in." \n
57  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
58  */
59  void getHosts(out DnsHostList hosts);
60 
61  /**
62  * Stores DNS configuration
63  * @param errors - list of errors \n
64  * 8002 Database error. - "Unable to modify custom DNS forwarding entry '%1'." \n
65  * 8002 Database error. - "Unable to create custom DNS forwarding entry '%1'." \n
66  * 8002 Database error. - "Unable to remove custom DNS forwarding entry '%1'."
67  * @param config - A structure containing all the settings of DND that sould be stored.
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 set(out kerio::web::ErrorList errors, in DnsConfig config);
73 
74  /**
75  * Stores DNS ip/hosts mapping
76  * @param errors - list of errors \n
77  * 8002 Database error. - "Unable to modify DNS host entry '%1'." \n
78  * 8002 Database error. - "Unable to create DNS host entry '%1'." \n
79  * 8002 Database error. - "Unable to remove DNS host entry '%1'."
80  * @param hosts - list of hosts file entries to be stored
81  * @throws kerio::web::ApiException \n
82  * -32001 Session expired. - "The user is not logged in." \n
83  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
84  */
85  void setHosts(out kerio::web::ErrorList errors, in DnsHostList hosts);
86 
87  /**
88  * Imports DNS hosts records from file (hosts format)
89  * @param fileId - id of uploaded file
90  * @param clean - true, if current hosts records should be removed, false, if new records should be appended to current config
91  * @throws kerio::web::ApiException \n
92  * -32001 Session expired. - "The user is not logged in." \n
93  * 1002 No such entity. - "Unable to open the uploaded file." \n
94  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
95  * 8000 Internal error. - "Internal error."
96  */
97  void importHosts(in string fileId, in boolean clean);
98 
99  /**
100  * Flushes DNS cache
101  * @throws kerio::web::ApiException \n
102  * -32001 Session expired. - "The user is not logged in." \n
103  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
104  */
105  void clearCache();
106 };
107 
108 }; //webadmin
kerio::web::OptionalString useDomainControler
Definition: Dns.idl:25
Common Kerio Control structures, enums and types.
Definition: Dns.idl:43
Definition: Dns.idl:19
string forwarders
empty for Do not forward
Definition: Dns.idl:14
Definition: Accounting.idl:11
Definition: SharedStructures.idl:289
Definition: Dns.idl:11
string domain
network/mask for Reverse DNS query, other for Name DNS query
Definition: Dns.idl:13
Definition: Dns.idl:33