-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathWebConfig.h
41 lines (31 loc) · 882 Bytes
/
WebConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// WebConfig.h
#ifndef _WEBCONFIG_h
#define _WEBCONFIG_h
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
typedef String(*Web_Get_Function)();
typedef String(*Web_Response_Function)(ESP8266WebServer pWebServer);
class WebConfig
{
public:
WebConfig(Web_Get_Function pConfigPageFunction, Web_Response_Function pSavePageFunction);
void Setup();
void Handle();
protected:
static void SetupWebServer();
static void WebServer_GetConfig();
static void WebServer_SaveConfig();
private:
static Web_Get_Function gConfigPageFunction;
static Web_Response_Function gSavePageFunction;
static const char* AP_SSID;
static const char* AP_CONFIG_PAGE;
static const char* AP_SUCCESS_PAGE;
static ESP8266WebServer gWebServer;
};
#endif