Firmware  0.4.1
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
28namespace intf::http::sta {
29
31class Server : public Endpoints {
32public:
33 Server();
34 ~Server();
35
38 Response sysGetRequest(Request const& req);
39
40private:
41 esp_err_t getHandler(httpd_req_t* req);
42 esp_err_t putPostHandler(httpd_req_t* req);
43 esp_err_t deleteHandler(httpd_req_t* req);
44
45 esp_err_t otaWsHandler(httpd_req_t* req);
46
47 esp_err_t rocoZ21WsHandler(httpd_req_t* req);
48
49 esp_err_t zimoDecupZppWsHandler(httpd_req_t* req);
50 esp_err_t zimoDecupZsuWsHandler(httpd_req_t* req);
51 esp_err_t zimoMduZppWsHandler(httpd_req_t* req);
52 esp_err_t zimoMduZsuWsHandler(httpd_req_t* req);
53 esp_err_t zimoZusiWsHandler(httpd_req_t* req);
54
55 esp_err_t wildcardGetHandler(httpd_req_t* req);
56};
57
58} // namespace intf::http::sta
Definition endpoints.hpp:43
esp_err_t wildcardGetHandler(httpd_req_t *req)
Definition server.cpp:525
esp_err_t zimoMduZppWsHandler(httpd_req_t *req)
Response settingsPostRequest(Request const &req)
Definition server.cpp:241
esp_err_t deleteHandler(httpd_req_t *req)
Definition server.cpp:480
esp_err_t zimoDecupZsuWsHandler(httpd_req_t *req)
esp_err_t zimoMduZsuWsHandler(httpd_req_t *req)
esp_err_t zimoDecupZppWsHandler(httpd_req_t *req)
esp_err_t getHandler(httpd_req_t *req)
Definition server.cpp:438
esp_err_t otaWsHandler(httpd_req_t *req)
~Server()
Dtor.
Definition server.cpp:186
esp_err_t rocoZ21WsHandler(httpd_req_t *req)
Response sysGetRequest(Request const &req)
Definition server.cpp:381
Response settingsGetRequest(Request const &req)
Definition server.cpp:192
Server()
Ctor.
Definition server.cpp:43
esp_err_t putPostHandler(httpd_req_t *req)
Definition server.cpp:457
esp_err_t zimoZusiWsHandler(httpd_req_t *req)
HTTP and WebSocket endpoints.
Definition config.hpp:450
std::expected< std::string, std::string > Response
Definition response.hpp:29
Definition request.hpp:28