22 #ifndef INCLUDE_OLA_HTTP_OLAHTTPSERVER_H_
23 #define INCLUDE_OLA_HTTP_OLAHTTPSERVER_H_
25 #include <ola/Clock.h>
28 #include <ola/http/HTTPServer.h>
45 bool Start() {
return m_server.
Start(); }
46 void Stop() {
return m_server.
Stop(); }
58 const std::string &content_type) {
63 static const char K_DATA_DIR_VAR[];
64 static const char K_UPTIME_VAR[];
66 inline void RegisterHandler(
67 const std::string &path,
86 #endif // INCLUDE_OLA_HTTP_OLAHTTPSERVER_H_
The base HTTP Server.
Definition: HTTPServer.h:144
Definition: OlaHTTPServer.h:38
A container for the exported variables.
Definition: ExportMap.h:324
Definition: HTTPServer.h:54
void RegisterFile(const std::string &file, const std::string &content_type)
Definition: OlaHTTPServer.h:57
Definition: HTTPServer.h:149
Export variables on the http server.
Definition: HTTPServer.h:98
virtual bool Start()
Start the thread and wait for the thread to be running.
Definition: Thread.cpp:84
Used to get the current time.
Definition: Clock.h:221
void Stop()
Stop the HTTP server.
Definition: HTTPServer.cpp:521
bool RegisterHandler(const std::string &path, BaseHTTPCallback *handler)
Register a handler.
Definition: HTTPServer.cpp:642
bool RegisterFile(const std::string &path, const std::string &content_type)
Register a static file. The root of the URL corresponds to the data dir.
Definition: HTTPServer.cpp:658
virtual bool Init()
Definition: OlaHTTPServer.cpp:64
Callback0< ReturnType > * NewCallback(ReturnType(*callback)())
A helper function to create a new Callback with 0 create-time arguments and 0 execution time argument...
Definition: Callback.h:211
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
OlaHTTPServer(const HTTPServer::HTTPServerOptions &options, ola::ExportMap *export_map)
Definition: OlaHTTPServer.cpp:46