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:156
Definition: OlaHTTPServer.h:38
A container for the exported variables.
Definition: ExportMap.h:324
Definition: HTTPServer.h:65
void RegisterFile(const std::string &file, const std::string &content_type)
Definition: OlaHTTPServer.h:57
Definition: HTTPServer.h:161
Export variables on the http server.
Definition: HTTPServer.h:109
virtual bool Start()
Start the thread and wait for the thread to be running.
Definition: Thread.cpp:90
Used to get the current time.
Definition: Clock.h:242
void Stop()
Stop the HTTP server.
Definition: HTTPServer.cpp:553
bool RegisterHandler(const std::string &path, BaseHTTPCallback *handler)
Register a handler.
Definition: HTTPServer.cpp:677
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:694
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
Represents a point in time with microsecond accuracy.
Definition: Clock.h:191
OlaHTTPServer(const HTTPServer::HTTPServerOptions &options, ola::ExportMap *export_map)
Definition: OlaHTTPServer.cpp:46