experimenting with some refactoring
This commit is contained in:
61
lib/framework/ESP8266React.h
Normal file
61
lib/framework/ESP8266React.h
Normal file
@ -0,0 +1,61 @@
|
||||
#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>
|
||||
|
||||
class ESP8266React {
|
||||
|
||||
public:
|
||||
|
||||
ESP8266React(FS* fs);
|
||||
|
||||
void init(AsyncWebServer* server);
|
||||
void loop();
|
||||
|
||||
SecurityManager* getSecurityManager(){
|
||||
return &_securitySettingsService;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
FS* _fs;
|
||||
|
||||
SecuritySettingsService _securitySettingsService;
|
||||
|
||||
WiFiSettingsService _wifiSettingsService;
|
||||
APSettingsService _apSettingsService;
|
||||
NTPSettingsService _ntpSettingsService;
|
||||
OTASettingsService _otaSettingsService;
|
||||
AuthenticationService _authenticationService;
|
||||
|
||||
WiFiScanner _wifiScanner;
|
||||
WiFiStatus _wifiStatus;
|
||||
NTPStatus _ntpStatus;
|
||||
APStatus _apStatus;
|
||||
SystemStatus _systemStatus;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user