blob: 3db88fa28a863b9237936a6da97e43352d8e41c4 (
plain)
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
42
43
44
45
|
#ifndef __USER_WEBSERVER_H__
#define __USER_WEBSERVER_H__
#define SERVER_PORT 80
#define SERVER_SSL_PORT 443
#define URLSize 10
typedef enum Result_Resp {
RespFail = 0,
RespSuc,
} Result_Resp;
typedef enum ProtocolType {
GET = 0,
POST,
} ProtocolType;
typedef enum _ParmType {
SWITCH_STATUS = 0,
INFOMATION,
WIFI,
SCAN,
REBOOT,
DEEP_SLEEP,
LIGHT_STATUS,
CONNECT_STATUS,
USER_BIN
} ParmType;
typedef struct URL_Frame {
enum ProtocolType Type;
char pSelect[URLSize];
char pCommand[URLSize];
char pFilename[URLSize];
} URL_Frame;
typedef struct _rst_parm {
ParmType parmtype;
struct espconn *pespconn;
} rst_parm;
void user_webserver_init(uint32 port);
#endif
|