Firmware
0.9.0
Toggle main menu visibility
Loading...
Searching...
No Matches
server.hpp
Go to the documentation of this file.
1
// Copyright (C) 2025 Vincent Hamp
2
//
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
21
22
#pragma once
23
24
#include <memory>
25
#include "
endpoints.hpp
"
26
#include "utility.hpp"
27
28
namespace
intf::http
{
29
31
class
Server
:
public
Endpoints
{
32
public
:
33
Server
();
34
~Server
();
35
36
Response
settingsGetRequest
(
Request
const
& req);
37
Response
settingsPostRequest
(
Request
const
& req);
38
Response
sysGetRequest
(
Request
const
& req);
39
Response
sysPostRequest
(
Request
const
& req);
40
41
private
:
42
esp_err_t
getHandler
(httpd_req_t* req);
43
esp_err_t
putPostHandler
(httpd_req_t* req);
44
esp_err_t
deleteHandler
(httpd_req_t* req);
45
46
esp_err_t
otaWsHandler
(httpd_req_t* req);
47
48
esp_err_t
rocoZ21WsHandler
(httpd_req_t* req);
49
50
esp_err_t
zimoDecupZppWsHandler
(httpd_req_t* req);
51
esp_err_t
zimoDecupZsuWsHandler
(httpd_req_t* req);
52
esp_err_t
zimoMduZppWsHandler
(httpd_req_t* req);
53
esp_err_t
zimoMduZsuWsHandler
(httpd_req_t* req);
54
esp_err_t
zimoZusiWsHandler
(httpd_req_t* req);
55
56
esp_err_t
wildcardGetHandler
(httpd_req_t* req);
57
};
58
59
}
// namespace intf::http
intf::http::Endpoints
Definition
endpoints.hpp:43
intf::http::Server::putPostHandler
esp_err_t putPostHandler(httpd_req_t *req)
Definition
server.cpp:516
intf::http::Server::sysPostRequest
Response sysPostRequest(Request const &req)
Definition
server.cpp:486
intf::http::Server::sysGetRequest
Response sysGetRequest(Request const &req)
Definition
server.cpp:434
intf::http::Server::wildcardGetHandler
esp_err_t wildcardGetHandler(httpd_req_t *req)
Definition
server.cpp:579
intf::http::Server::otaWsHandler
esp_err_t otaWsHandler(httpd_req_t *req)
intf::http::Server::getHandler
esp_err_t getHandler(httpd_req_t *req)
Definition
server.cpp:497
intf::http::Server::Server
Server()
Ctor.
Definition
server.cpp:43
intf::http::Server::settingsPostRequest
Response settingsPostRequest(Request const &req)
Definition
server.cpp:257
intf::http::Server::zimoDecupZsuWsHandler
esp_err_t zimoDecupZsuWsHandler(httpd_req_t *req)
intf::http::Server::deleteHandler
esp_err_t deleteHandler(httpd_req_t *req)
Definition
server.cpp:534
intf::http::Server::zimoMduZppWsHandler
esp_err_t zimoMduZppWsHandler(httpd_req_t *req)
intf::http::Server::zimoZusiWsHandler
esp_err_t zimoZusiWsHandler(httpd_req_t *req)
intf::http::Server::rocoZ21WsHandler
esp_err_t rocoZ21WsHandler(httpd_req_t *req)
intf::http::Server::settingsGetRequest
Response settingsGetRequest(Request const &req)
Definition
server.cpp:198
intf::http::Server::zimoMduZsuWsHandler
esp_err_t zimoMduZsuWsHandler(httpd_req_t *req)
intf::http::Server::zimoDecupZppWsHandler
esp_err_t zimoDecupZppWsHandler(httpd_req_t *req)
endpoints.hpp
HTTP and WebSocket endpoints.
intf::http
Definition
config.hpp:495
intf::http::Response
std::expected< std::string, std::string > Response
Definition
response.hpp:29
intf::http::Request
Definition
request.hpp:28
src
intf
http
server.hpp
Firmware 0.9.0