Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

  1. #ifndef ESP8266React_h
  2. #define ESP8266React_h
  3. #include <Arduino.h>
  4. #if defined(ESP8266)
  5. #include <ESP8266WiFi.h>
  6. #include <ESPAsyncTCP.h>
  7. #elif defined(ESP_PLATFORM)
  8. #include <AsyncTCP.h>
  9. #include <SPIFFS.h>
  10. #include <WiFi.h>
  11. #endif
  12. #include <APSettingsService.h>
  13. #include <APStatus.h>
  14. #include <AuthenticationService.h>
  15. #include <FS.h>
  16. #include <NTPSettingsService.h>
  17. #include <NTPStatus.h>
  18. #include <OTASettingsService.h>
  19. #include <RestartService.h>
  20. #include <SecuritySettingsService.h>
  21. #include <SystemStatus.h>
  22. #include <WiFiScanner.h>
  23. #include <WiFiSettingsService.h>
  24. #include <WiFiStatus.h>
  25. class ESP8266React {
  26. public:
  27. ESP8266React(AsyncWebServer* server, FS* fs);
  28. void begin();
  29. void loop();
  30. SecurityManager* getSecurityManager() {
  31. return &_securitySettingsService;
  32. }
  33. private:
  34. SecuritySettingsService _securitySettingsService;
  35. WiFiSettingsService _wifiSettingsService;
  36. APSettingsService _apSettingsService;
  37. NTPSettingsService _ntpSettingsService;
  38. OTASettingsService _otaSettingsService;
  39. RestartService _restartService;
  40. AuthenticationService _authenticationService;
  41. WiFiScanner _wifiScanner;
  42. WiFiStatus _wifiStatus;
  43. NTPStatus _ntpStatus;
  44. APStatus _apStatus;
  45. SystemStatus _systemStatus;
  46. };
  47. #endif