Open Lighting Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ola::OladHTTPServer Class Reference
Inheritance diagram for ola::OladHTTPServer:
ola::http::OlaHTTPServer

Classes

struct  OladHTTPServerOptions
struct  port_identifier

Public Member Functions

 OladHTTPServer (ExportMap *export_map, const OladHTTPServerOptions &options, ola::io::ConnectedDescriptor *client_socket, class OlaServer *ola_server, const ola::network::Interface &interface)
bool Init ()
void SetPidStore (const ola::rdm::RootPidStore *pid_store)
int JsonServerStats (const HTTPRequest *request, HTTPResponse *response)
int JsonUniversePluginList (const HTTPRequest *request, HTTPResponse *response)
int JsonPluginInfo (const HTTPRequest *request, HTTPResponse *response)
int JsonUniverseInfo (const HTTPRequest *request, HTTPResponse *response)
int JsonAvailablePorts (const HTTPRequest *request, HTTPResponse *response)
int CreateNewUniverse (const HTTPRequest *request, HTTPResponse *response)
int ModifyUniverse (const HTTPRequest *request, HTTPResponse *response)
int GetDmx (const HTTPRequest *request, HTTPResponse *response)
int HandleSetDmx (const HTTPRequest *request, HTTPResponse *response)
int DisplayQuit (const HTTPRequest *request, HTTPResponse *response)
int ReloadPlugins (const HTTPRequest *request, HTTPResponse *response)
int ReloadPidStore (const HTTPRequest *request, HTTPResponse *response)
void HandlePluginList (HTTPResponse *response, const vector< class OlaPlugin > &plugins, const string &error)
void HandleUniverseList (HTTPResponse *response, ola::web::JsonObject *json, const vector< class OlaUniverse > &universes, const string &error)
void HandlePartialPluginInfo (HTTPResponse *response, int plugin_id, const string &description, const string &error)
void HandlePluginInfo (HTTPResponse *response, string description, const OlaCallbackClient::PluginState &state, const string &error)
void HandleUniverseInfo (HTTPResponse *response, class OlaUniverse &universe, const string &error)
void HandlePortsForUniverse (HTTPResponse *response, ola::web::JsonObject *json, unsigned int universe_id, const vector< class OlaDevice > &devices, const string &error)
void HandleCandidatePorts (HTTPResponse *response, const vector< class OlaDevice > &devices, const string &error)
void CreateUniverseComplete (HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue)
void SendCreateUniverseResponse (HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue)
void ModifyUniverseComplete (HTTPResponse *response, class ActionQueue *action_queue)
void SendModifyUniverseResponse (HTTPResponse *response, class ActionQueue *action_queue)
- Public Member Functions inherited from ola::http::OlaHTTPServer
 OlaHTTPServer (const HTTPServer::HTTPServerOptions &options, ExportMap *export_map)
bool Start ()
void Stop ()

Static Public Member Functions

static int ServeHelpRedirect (HTTPResponse *response)
static int ServeUsage (HTTPResponse *response, const string &details)

Static Public Attributes

static const char HELP_PARAMETER [] = "help"

Additional Inherited Members

- Protected Member Functions inherited from ola::http::OlaHTTPServer
void RegisterFile (const string &file, const string &content_type)
- Protected Attributes inherited from ola::http::OlaHTTPServer
Clock m_clock
ExportMapm_export_map
HTTPServer m_server
TimeStamp m_start_time

Constructor & Destructor Documentation

ola::OladHTTPServer::OladHTTPServer ( ExportMap export_map,
const OladHTTPServerOptions options,
ola::io::ConnectedDescriptor client_socket,
class OlaServer ola_server,
const ola::network::Interface interface 
)

Create a new OLA HTTP server

Parameters
export_mapthe ExportMap to display when /debug is called
client_socketA ConnectedDescriptor which is used to communicate with the server.

Member Function Documentation

bool ola::OladHTTPServer::Init ( )
virtual

Setup the OLA HTTP server

Returns
true if this worked, false otherwise.

Reimplemented from ola::http::OlaHTTPServer.

int ola::OladHTTPServer::JsonAvailablePorts ( const HTTPRequest request,
HTTPResponse response 
)

Return a list of unbound ports

Parameters
requestthe HTTPRequest
responsethe HTTPResponse
Returns
MHD_NO or MHD_YES
int ola::OladHTTPServer::JsonPluginInfo ( const HTTPRequest request,
HTTPResponse response 
)

Print the plugin info as a json string

Parameters
requestthe HTTPRequest
responsethe HTTPResponse
Returns
MHD_NO or MHD_YES
int ola::OladHTTPServer::JsonUniverseInfo ( const HTTPRequest request,
HTTPResponse response 
)

Return information about a universe

Parameters
requestthe HTTPRequest
responsethe HTTPResponse
Returns
MHD_NO or MHD_YES
void ola::OladHTTPServer::SetPidStore ( const ola::rdm::RootPidStore pid_store)

Can be called while the http server is running


The documentation for this class was generated from the following files: