All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Services.idl
Go to the documentation of this file.
1 /**
2  * @file Services.idl
3  * @brief Set services like (un)secure SMTP, POP3, IMAP, HTTP, etc.
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <kerio/web/idl/IpAddressGroups.idl> //IpAddressGroup
12 
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 /**
19  * type of start-up
20  */
21 enum StartUp {
22  Manual, // service should be started manually
23  Automatic // service starts automatically
24 };
25 
26 /**
27  *
28  */
29 enum AddressType {
30  AllAddresses, // all IP addresses for this machine
31  Localhost, // localhost - special case
32  RealIpAddress // a specific address of this machine
33 };
34 
35 /**
36  * Listening entity
37  * Note: all fields must be assigned if used in set methods
38  */
39 struct Listener {
40  AddressType type;
41  kerio::web::IpAddress address; // can obtain localizable string "All addresses"
42  long port;
43 };
44 
45 typedef sequence<Listener> ListenerList;
46 
47 /**
48  *
49  * Note: all fields must be assigned if used in set methods
50  */
52  boolean isSet; // is set maximum of concurrent connections?
53  long value; // maximum of concurrent connections
54 };
55 
56 struct GroupLimit {
57  boolean isUsed; // is group limit set
58  kerio::web::IpAddressGroup ipGroup; // IP address group
59 };
60 
61 struct Service {
62  kerio::web::KId id;
63  string name;
64  StartUp howToStart;
65  ListenerList listeners;
66  GroupLimit group;
67  ConcurrentConnections connectionLimit;
68  long defaultPort;
69  boolean isRunning;
70  boolean anonymousAccess; //this property has meaning only for nntp
71 };
72 
73 typedef sequence<Service> ServiceList;
74 
75 interface Services {
76 
77  /**
78  * Show a list of services with current status.
79  *
80  * @param services - list of KMS services
81  */
82  void get(out ServiceList services);
83 
84  /**
85  * Restart a given service.
86  *
87  * @param service - unique service identifier
88  */
89  void restart(in kerio::web::KId service);
90 
91  /**
92  * Change current status of service(s).
93  *
94  * @param errors - errors of requested changes
95  * @param services - list of KMS services
96  */
97  void set(out kerio::web::ErrorList errors, in ServiceList services);
98 
99  /**
100  * Start a given service.
101  *
102  * @param service - unique service identifier
103  */
104  void start(in kerio::web::KId service);
105 
106  /**
107  * Stop a given service.
108  *
109  * @param service - unique service identifier
110  */
111  void stop(in kerio::web::KId service);
112 
113  /**
114  * Stop the Mac OS services.
115  */
116  void stopMacOSServices();
117 
118  /**
119  * Obtain IPv6 settings.
120  *
121  * @param setting - new settings
122  */
123  void getIPv6(out boolean isEnabled);
124 
125  /**
126  * Set IPv6 settings.
127  *
128  * @param setting - new settings
129  */
130  void setIPv6(in boolean isEnabled);
131 };
132 
133 }; }; };//end of namespace
134