2019-07-14 21:13:26 +00:00
|
|
|
#ifndef ESP8266React_h
|
|
|
|
#define ESP8266React_h
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
#if defined(ESP8266)
|
|
|
|
#include <ESP8266WiFi.h>
|
|
|
|
#include <ESPAsyncTCP.h>
|
|
|
|
#elif defined(ESP_PLATFORM)
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <AsyncTCP.h>
|
|
|
|
#include <SPIFFS.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <FS.h>
|
|
|
|
#include <SecuritySettingsService.h>
|
|
|
|
#include <WiFiSettingsService.h>
|
|
|
|
#include <APSettingsService.h>
|
|
|
|
#include <NTPSettingsService.h>
|
|
|
|
#include <OTASettingsService.h>
|
|
|
|
#include <AuthenticationService.h>
|
|
|
|
#include <WiFiScanner.h>
|
|
|
|
#include <WiFiStatus.h>
|
|
|
|
#include <NTPStatus.h>
|
|
|
|
#include <APStatus.h>
|
|
|
|
#include <SystemStatus.h>
|
2019-11-30 12:54:57 +00:00
|
|
|
#include <ResetService.h>
|
2019-07-14 21:13:26 +00:00
|
|
|
|
|
|
|
class ESP8266React {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2019-09-28 20:29:46 +00:00
|
|
|
ESP8266React(AsyncWebServer* server, FS* fs);
|
2019-09-30 20:28:24 +00:00
|
|
|
|
|
|
|
void begin();
|
2019-07-14 21:13:26 +00:00
|
|
|
void loop();
|
|
|
|
|
|
|
|
SecurityManager* getSecurityManager(){
|
|
|
|
return &_securitySettingsService;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
SecuritySettingsService _securitySettingsService;
|
|
|
|
|
|
|
|
WiFiSettingsService _wifiSettingsService;
|
|
|
|
APSettingsService _apSettingsService;
|
|
|
|
NTPSettingsService _ntpSettingsService;
|
|
|
|
OTASettingsService _otaSettingsService;
|
2019-11-30 12:54:57 +00:00
|
|
|
ResetService _ResetService;
|
2019-07-14 21:13:26 +00:00
|
|
|
AuthenticationService _authenticationService;
|
|
|
|
|
2019-11-30 12:34:52 +00:00
|
|
|
|
2019-07-14 21:13:26 +00:00
|
|
|
WiFiScanner _wifiScanner;
|
|
|
|
WiFiStatus _wifiStatus;
|
|
|
|
NTPStatus _ntpStatus;
|
|
|
|
APStatus _apStatus;
|
|
|
|
SystemStatus _systemStatus;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|