Firmware  0.6.0
Loading...
Searching...
No Matches
server.hpp
Go to the documentation of this file.
1// Copyright (C) 2025 Vincent Hamp
2// Copyright (C) 2025 Franziska Walter
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
22
23#pragma once
24
25#include <string>
26#include "utility.hpp"
27
28namespace intf::http::ap {
29
30class Server {
31public:
32 explicit Server();
33 ~Server();
34
35private:
37 void buildGetString();
38 void getConfig();
39 void setConfig() const;
40 esp_err_t rootGetHandler(httpd_req_t* req);
41 esp_err_t savePostHandler(httpd_req_t* req);
42 esp_err_t wildcardGetHandler(httpd_req_t* req);
43
44 std::string _ap_options_str;
45 std::string _ap_records_str;
46 std::string _get_str;
47 std::string _sta_mdns_str;
48 std::string _sta_ssid_str;
49 std::string _sta_pass_str;
50 std::string _sta_alt_ssid_str;
51 std::string _sta_alt_pass_str;
52 std::string _sta_ip_str;
53 std::string _sta_netmask_str;
54 std::string _sta_gateway_str;
55};
56
57} // namespace intf::http::ap
void setConfig() const
Definition server.cpp:159
void getConfig()
Definition server.cpp:130
std::string _sta_alt_pass_str
Definition server.hpp:51
std::string _sta_netmask_str
Definition server.hpp:53
std::string _ap_options_str
Definition server.hpp:44
std::string _sta_ssid_str
Definition server.hpp:48
std::string _sta_alt_ssid_str
Definition server.hpp:50
void buildApRecordsStrings()
Definition server.cpp:84
esp_err_t savePostHandler(httpd_req_t *req)
Definition server.cpp:181
std::string _ap_records_str
Definition server.hpp:45
std::string _sta_ip_str
Definition server.hpp:52
std::string _sta_gateway_str
Definition server.hpp:54
std::string _get_str
Definition server.hpp:46
esp_err_t wildcardGetHandler(httpd_req_t *req)
Definition server.cpp:272
~Server()
Dtor.
Definition server.cpp:78
esp_err_t rootGetHandler(httpd_req_t *req)
Definition server.cpp:172
void buildGetString()
Definition server.cpp:109
std::string _sta_pass_str
Definition server.hpp:49
Server()
Ctor.
Definition server.cpp:41
std::string _sta_mdns_str
Definition server.hpp:47
Definition init.cpp:26