forked from jeelabs/esp-link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb-server.h
38 lines (28 loc) · 809 Bytes
/
web-server.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
#ifndef WEB_SERVER_H
#define WEB_SERVER_H
#include <esp8266.h>
#include "httpd.h"
#include "cmd.h"
typedef enum
{
LOAD=0, // loading web-page content at the first time
REFRESH, // loading web-page subsequently
BUTTON, // HTML button pressed
SUBMIT, // HTML form is submitted
INVALID=-1,
} RequestReason;
typedef enum
{
WEB_STRING=0, // the value is string
WEB_NULL, // the value is NULL
WEB_INTEGER, // the value is integer
WEB_BOOLEAN, // the value is boolean
WEB_FLOAT, // the value is float
WEB_JSON // the value is JSON data
} WebValueType;
void WEB_Init();
char * WEB_UserPages();
int WEB_CgiJsonHook(HttpdConnData *connData);
void WEB_Setup(CmdPacket *cmd);
void WEB_Data(CmdPacket *cmd);
#endif /* WEB_SERVER_H */