use WebServer instead of WifiServer

This commit is contained in:
technyon
2022-04-04 21:27:27 +02:00
parent cb81db5d8e
commit 08f7c6025f
3 changed files with 161 additions and 224 deletions

View File

@@ -1,7 +1,7 @@
#pragma once
#include <WiFiServer.h>
#include <Preferences.h>
#include <WebServer.h>
#include "NukiWrapper.h"
#include "Network.h"
@@ -28,16 +28,14 @@ public:
private:
void serveHtml(WiFiClient& client);
void printInputField(WiFiClient& client, const char* token, const char* description, const char* value, size_t maxLength);
void printInputField(WiFiClient& client, const char* token, const char* description, const int value, size_t maxLength);
void processArgs();
void serveHtml(String& response);
void printInputField(String& response, const char* token, const char* description, const char* value, size_t maxLength);
void printInputField(String& response, const char* token, const char* description, const int value, size_t maxLength);
void printParameter(WiFiClient& client, const char* description, const char* value);
void printParameter(String& response, const char* description, const char* value);
TokenType getParameterType(char*& token);
WiFiServer _wifiServer;
WebServer server;
NukiWrapper* _nuki;
Network* _network;
Preferences* _preferences;