2018-02-26 00:11:31 +00:00
|
|
|
#ifndef APStatus_h
|
|
|
|
#define APStatus_h
|
|
|
|
|
2019-12-24 11:19:19 +00:00
|
|
|
#ifdef ESP32
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <AsyncTCP.h>
|
|
|
|
#elif defined(ESP8266)
|
2019-12-03 23:16:06 +00:00
|
|
|
#include <ESP8266WiFi.h>
|
|
|
|
#include <ESPAsyncTCP.h>
|
2018-11-11 16:44:29 +00:00
|
|
|
#endif
|
|
|
|
|
2018-02-26 00:11:31 +00:00
|
|
|
#include <ArduinoJson.h>
|
2019-11-30 09:58:28 +00:00
|
|
|
#include <AsyncJson.h>
|
2019-12-03 23:16:06 +00:00
|
|
|
#include <ESPAsyncWebServer.h>
|
2018-02-26 00:11:31 +00:00
|
|
|
#include <IPAddress.h>
|
2019-05-31 18:58:33 +00:00
|
|
|
#include <SecurityManager.h>
|
2020-05-30 08:47:24 +00:00
|
|
|
#include <APSettingsService.h>
|
2018-02-26 00:11:31 +00:00
|
|
|
|
2019-04-14 07:52:40 +00:00
|
|
|
#define MAX_AP_STATUS_SIZE 1024
|
2018-04-01 09:35:23 +00:00
|
|
|
#define AP_STATUS_SERVICE_PATH "/rest/apStatus"
|
|
|
|
|
2018-02-26 00:11:31 +00:00
|
|
|
class APStatus {
|
2019-12-03 23:16:06 +00:00
|
|
|
public:
|
2020-05-30 08:47:24 +00:00
|
|
|
APStatus(AsyncWebServer* server, SecurityManager* securityManager, APSettingsService* apSettingsService);
|
2018-02-26 00:11:31 +00:00
|
|
|
|
2019-12-03 23:16:06 +00:00
|
|
|
private:
|
2020-05-30 08:47:24 +00:00
|
|
|
APSettingsService* _apSettingsService;
|
2019-12-03 23:16:06 +00:00
|
|
|
void apStatus(AsyncWebServerRequest* request);
|
2018-02-26 00:11:31 +00:00
|
|
|
};
|
|
|
|
|
2019-12-03 23:16:06 +00:00
|
|
|
#endif // end APStatus_h
|