22#ifndef INCLUDE_OLA_HTTP_OLAHTTPSERVER_H_
23#define INCLUDE_OLA_HTTP_OLAHTTPSERVER_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,
Export variables on the http server.
Used to get the current time.
Definition Clock.h:230
A container for the exported variables.
Definition ExportMap.h:324
Definition HTTPServer.h:65
Definition HTTPServer.h:110
The base HTTP Server.
Definition HTTPServer.h:157
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:676
bool RegisterHandler(const std::string &path, BaseHTTPCallback *handler)
Register a handler.
Definition HTTPServer.cpp:659
void Stop()
Stop the HTTP server.
Definition HTTPServer.cpp:535
Definition OlaHTTPServer.h:38
OlaHTTPServer(const HTTPServer::HTTPServerOptions &options, ola::ExportMap *export_map)
Definition OlaHTTPServer.cpp:46
virtual bool Init()
Definition OlaHTTPServer.cpp:64
void RegisterFile(const std::string &file, const std::string &content_type)
Definition OlaHTTPServer.h:57
virtual bool Start()
Start the thread and wait for the thread to be running.
Definition Thread.cpp:90
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
Definition HTTPServer.h:162