Firmware  0.0.0
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 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 deleteHandler(httpd_req_t* req);
42 esp_err_t getHandler(httpd_req_t* req);
43 esp_err_t putPostHandler(httpd_req_t* req);
44 esp_err_t decupZppWsHandler(httpd_req_t* req);
45 esp_err_t decupZsuWsHandler(httpd_req_t* req);
46 esp_err_t mduZppWsHandler(httpd_req_t* req);
47 esp_err_t mduZsuWsHandler(httpd_req_t* req);
48 esp_err_t otaWsHandler(httpd_req_t* req);
49 esp_err_t z21WsHandler(httpd_req_t* req);
50 esp_err_t zusiWsHandler(httpd_req_t* req);
51 esp_err_t wildcardGetHandler(httpd_req_t* req);
52};
53
54} // namespace http::sta
Definition endpoints.hpp:41
Definition server.hpp:31
esp_err_t decupZppWsHandler(httpd_req_t *req)
esp_err_t wildcardGetHandler(httpd_req_t *req)
Definition server.cpp:457
Response settingsGetRequest(Request const &req)
Definition server.cpp:160
~Server()
Dtor.
Definition server.cpp:154
esp_err_t mduZppWsHandler(httpd_req_t *req)
esp_err_t getHandler(httpd_req_t *req)
Definition server.cpp:386
esp_err_t otaWsHandler(httpd_req_t *req)
Response sysGetRequest(Request const &req)
Definition server.cpp:314
esp_err_t decupZsuWsHandler(httpd_req_t *req)
esp_err_t deleteHandler(httpd_req_t *req)
Definition server.cpp:368
esp_err_t zusiWsHandler(httpd_req_t *req)
esp_err_t mduZsuWsHandler(httpd_req_t *req)
esp_err_t z21WsHandler(httpd_req_t *req)
Response settingsPostRequest(Request const &req)
Definition server.cpp:201
Server()
Ctor.
Definition server.cpp:41
esp_err_t putPostHandler(httpd_req_t *req)
Definition server.cpp:405
HTTP and WebSocket endpoints.
Definition config.hpp:307
std::expected< std::string, std::string > Response
Definition response.hpp:29
Definition request.hpp:28
Utility functions.