Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
src
hal
esp32
esp32_web_server.h
Go to the documentation of this file.
1
#pragma once
2
3
#if defined(ARDUINO)
4
#include "
ersa/hal/http_server.h
"
5
#include <DNSServer.h>
6
#include <WebServer.h>
7
8
namespace
ersa::hal
{
9
11
class
Esp32WebServer final :
public
IHttpServer,
public
IDnsServer {
12
public
:
13
Esp32WebServer();
14
Result<void>
begin
(uint16_t port)
override
;
15
void
route(std::string_view path, HttpMethod method, HttpHandler handler,
void
* context)
override
;
16
void
routeNotFound(HttpHandler handler,
void
* context)
override
;
17
void
handleClient()
override
;
18
void
stop
()
override
;
19
bool
hasArgument(std::string_view name)
const override
;
20
std::string argument(std::string_view name)
const override
;
21
void
send(uint16_t status, std::string_view contentType, std::string_view body)
override
;
22
Result<void>
begin
(uint16_t port, std::string_view domain,
const
uint8_t address[4])
override
;
23
void
process()
override
;
24
25
private
:
26
WebServer server_;
27
DNSServer dns_;
28
};
29
30
}
// namespace ersa::hal
31
#endif
http_server.h
AppAgenda::begin
void begin()
Definition
app_agenda.cpp:27
AppPortal::stop
void stop()
ersa::hal
Definition
battery.h:7
Generated by
1.9.8