Files
EMS-ESP32/lib/framework/RestartService.h
2024-08-12 09:23:46 +02:00

27 lines
633 B
C++

#ifndef RestartService_h
#define RestartService_h
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include "SecurityManager.h"
#define RESTART_SERVICE_PATH "/rest/restart"
#define PARTITION_SERVICE_PATH "/rest/partition"
#define FACTORYPARTITION_SERVICE_PATH "/rest/factoryPartition"
class RestartService {
public:
RestartService(AsyncWebServer * server, SecurityManager * securityManager);
static void restartNow();
private:
void restart(AsyncWebServerRequest * request);
void partition(AsyncWebServerRequest * request);
void factory(AsyncWebServerRequest * request);
};
#endif