WiFi WebServer for ESP8266
Fork of ESP8266_WebServer by
Diff: ESP8266_WebServer.h
- Revision:
- 6:34d93ea4d519
- Parent:
- 4:759de84e790b
- Parent:
- 5:48b7fd921bef
- Child:
- 7:f6172ba3e807
--- a/ESP8266_WebServer.h Sat Jan 03 17:36:41 2015 +0000 +++ b/ESP8266_WebServer.h Sun Jan 04 12:11:33 2015 +0000 @@ -14,6 +14,13 @@ const char mimePNG[] = "image/png"; const char mimeGIF[] = "image/gif"; const char mimeText[] = "text/plain"; +const char mimeJSON[] = "application/json"; + +#define OPMODE_STATION 1 +#define OPMODE_SOFTAP 2 +#define OPMODE_ALL 3 + +extern const char* opModes[]; class ESP8266_WebRequest { @@ -66,6 +73,7 @@ void SendError(int linkID, const char* error); void Send404Error(int linkID); void SendReply(int linkID, std::string reply, const char* mimeType); + void SendReply(int linkID, std::string reply, const char* mimeType, int maxAge); void SendReply(int linkID, char const* reply, int replySize, const char* mimeType); void SendReply(int linkID, char const* reply, int replySize, const char* mimeType, int maxAge); void SendReply(int linkID, char const* reply, const char* mimeType, int maxAge); @@ -73,6 +81,18 @@ void SendFile(int linkID, FileHandle* file, const char* mimeType, int maxAge); int SendStream(int linkID, char const* reply, int StreamSize, int WindowSize, const char* mimeType, int maxAge); int SendStream(int linkID, char const* reply, int WindowSize); + + std::string GetStationMAC(void); + std::string GetAPMAC(void); + std::string GetStationIP(void); + std::string GetAPIP(void); + int GetOperatingMode(void); + std::string GetStationSSID(void); + std::list<std::string> ListAvailableSSID(void); + std::string GetFirmwareVersion(void); + + bool SetOperatingMode(int mode); + bool SetStationSSID(std::string newAP, std::string password); }; #endif \ No newline at end of file