ESPMegaPRO-v3-SDK/ESPMegaPRO-firmware/lib/ESPMegaPRO/ESPMegaWebServer.hpp.disabled

24 lines
668 B
Plaintext
Raw Normal View History

2023-12-29 18:23:33 +00:00
#pragma once
#include <ESPAsyncWebServer.h>
#include <ESPMegaIoT.hpp>
#include <Update.h>
class ESPMegaWebServer
{
public:
ESPMegaWebServer(uint16_t port);
~ESPMegaWebServer();
void begin(ESPMegaIoT *iot);
void loop();
private:
// Web Server
AsyncWebServer server;
uint16_t port;
// ESPMegaIoT
ESPMegaIoT *iot;
// Endpoints Handlers
void dashboardHandler(AsyncWebServerRequest *request);
void configHandler(AsyncWebServerRequest *request);
void saveConfigHandler(AsyncWebServerRequest *request);
void otaHandler(AsyncWebServerRequest *request);
};