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;
153 static const unsigned int DEFAULT_HTTP_PORT = 9090;
160 class OlaClientService *client_service;
163 typedef std::map<ola::io::DescriptorHandle, ClientEntry> ClientMap;
166 const Options m_options;
167 std::vector<class PluginLoader*> m_plugin_loaders;
168 class PreferencesFactory *m_preferences_factory;
171 class ExportMap *m_export_map;
173 std::auto_ptr<class ExportMap> m_our_export_map;
177 std::auto_ptr<class DeviceManager> m_device_manager;
178 std::auto_ptr<class PluginManager> m_plugin_manager;
179 std::auto_ptr<class PluginAdaptor> m_plugin_adaptor;
180 std::auto_ptr<class UniverseStore> m_universe_store;
181 std::auto_ptr<class PortManager> m_port_manager;
182 std::auto_ptr<class OlaServerServiceImpl> m_service_impl;
183 std::auto_ptr<class ClientBroker> m_broker;
184 std::auto_ptr<class PortBroker> m_port_broker;
185 std::auto_ptr<const ola::rdm::RootPidStore> m_pid_store;
186 std::auto_ptr<class DiscoveryAgentInterface> m_discovery_agent;
187 std::auto_ptr<ola::rpc::RpcServer> m_rpc_server;
188 class Preferences *m_server_preferences;
189 class Preferences *m_universe_preferences;
190 std::string m_instance_name;
193 std::auto_ptr<OladHTTPServer_t> m_httpd;
195 bool RunHousekeeping();
197 #ifdef HAVE_LIBMICROHTTPD
207 void ReloadPluginsInternal();
213 static const char INSTANCE_NAME_KEY[];
214 static const char K_INSTANCE_NAME_VAR[];
215 static const char K_DISCOVERY_SERVICE_TYPE[];
216 static const char K_UID_VAR[];
217 static const char SERVER_PREFERENCES[];
218 static const char UNIVERSE_PREFERENCES[];
219 static const unsigned int K_HOUSEKEEPING_TIMEOUT_MS;
224 #endif // OLAD_OLASERVER_H_