21 #ifndef OLAD_OLASERVER_H_
22 #define OLAD_OLASERVER_H_
31 #include <ola/io/SelectServer.h>
32 #include <ola/network/InterfacePicker.h>
33 #include <ola/network/Socket.h>
34 #include <ola/network/TCPSocketFactory.h>
35 #include <ola/plugin_id.h>
38 #include <ola/rpc/RpcSessionHandler.h>
52 #ifdef HAVE_LIBMICROHTTPD
53 typedef class OladHTTPServer OladHTTPServer_t;
55 typedef int OladHTTPServer_t;
73 std::string network_interface;
74 std::string pid_data_dir;
89 OlaServer(
const std::vector<class PluginLoader*> &plugin_loaders,
150 return m_instance_name;
158 return m_preferences_factory;
161 static const unsigned int DEFAULT_HTTP_PORT = 9090;
168 class OlaClientService *client_service;
171 typedef std::map<ola::io::DescriptorHandle, ClientEntry> ClientMap;
174 const Options m_options;
175 std::vector<class PluginLoader*> m_plugin_loaders;
176 class PreferencesFactory *m_preferences_factory;
179 class ExportMap *m_export_map;
181 std::auto_ptr<class ExportMap> m_our_export_map;
185 std::auto_ptr<class DeviceManager> m_device_manager;
186 std::auto_ptr<class PluginManager> m_plugin_manager;
187 std::auto_ptr<class PluginAdaptor> m_plugin_adaptor;
188 std::auto_ptr<class UniverseStore> m_universe_store;
189 std::auto_ptr<class PortManager> m_port_manager;
190 std::auto_ptr<class OlaServerServiceImpl> m_service_impl;
191 std::auto_ptr<class ClientBroker> m_broker;
192 std::auto_ptr<class PortBroker> m_port_broker;
193 std::auto_ptr<const ola::rdm::RootPidStore> m_pid_store;
194 std::auto_ptr<class DiscoveryAgentInterface> m_discovery_agent;
195 std::auto_ptr<ola::rpc::RpcServer> m_rpc_server;
196 class Preferences *m_server_preferences;
197 class Preferences *m_universe_preferences;
198 std::string m_instance_name;
201 std::auto_ptr<OladHTTPServer_t> m_httpd;
203 bool RunHousekeeping();
205 #ifdef HAVE_LIBMICROHTTPD
215 void ReloadPluginsInternal();
221 static const char INSTANCE_NAME_KEY[];
222 static const char K_INSTANCE_NAME_VAR[];
223 static const char K_DISCOVERY_SERVICE_TYPE[];
224 static const char K_UID_VAR[];
225 static const char SERVER_PREFERENCES[];
226 static const char UNIVERSE_PREFERENCES[];
227 static const unsigned int K_HOUSEKEEPING_TIMEOUT_MS;
232 #endif // OLAD_OLASERVER_H_