21 #ifndef OLAD_OLASERVER_H_ 22 #define OLAD_OLASERVER_H_ 26 #endif // HAVE_CONFIG_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;
56 #endif // HAVE_LIBMICROHTTPD 73 std::string network_interface;
74 std::string pid_data_dir;
89 OlaServer(
const std::vector<class PluginLoader*> &plugin_loaders,
112 void ReloadPlugins();
119 void ReloadPidStore();
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;
175 std::vector<class PluginLoader*> m_plugin_loaders;
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;
198 std::string m_instance_name;
201 std::auto_ptr<OladHTTPServer_t> m_httpd;
203 bool RunHousekeeping();
205 #ifdef HAVE_LIBMICROHTTPD 208 #endif // 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_ Represents the RPC session between a client and server.
Definition: RpcSession.h:45
Used to receive notifications of RPC client session activity.
Definition: RpcSessionHandler.h:36
const PreferencesFactory * GetPreferencesFactory()
Get the preferences factory.
Definition: OlaServer.h:157
Definition: Preferences.h:345
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
A container for the exported variables.
Definition: ExportMap.h:324
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition: Descriptor.h:282
std::string http_data_dir
Port to run the HTTP server on.
Definition: OlaServer.h:72
Holds information about RDM PIDs.
A RDM unique identifier (UID).
Export variables on the http server.
bool http_enable_quit
Restrict access to localhost only.
Definition: OlaServer.h:69
Constants used throughout OLA.
Options for the OlaServer.
Definition: OlaServer.h:66
static const int OLA_DEFAULT_PORT
The default port which olad listens on for incoming RPC connections.
Definition: Constants.h:68
void * timeout_id
A timeout handle which can later be used to cancel a timeout.
Definition: SchedulerInterface.h:34
const std::string InstanceName()
Get the instance name.
Definition: OlaServer.h:149
The main OlaServer class.
Definition: OlaServer.h:61
Definition: Interface.h:35
A single threaded I/O event management system.
Definition: SelectServer.h:63
An RPC server.
Definition: RpcServer.h:48
bool http_localhost_only
Run the HTTP server.
Definition: OlaServer.h:68
Definition: Preferences.h:147
void StopServer()
Stop the OLA Server.
Definition: OlaServer.h:126
Represents a RDM UID.
Definition: UID.h:57
Definition: TCPSocket.h:73
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
The root of the RDM parameter descriptor store.
Definition: PidStore.h:68
unsigned int http_port
Enable /quit URL.
Definition: OlaServer.h:70
a Generic Socket Address
Definition: SocketAddress.h:166