WiFi WebServer for ESP8266
Fork of ESP8266_WebServer by
Diff: ESP8266_WebServer.h
- Revision:
- 5:48b7fd921bef
- Parent:
- 3:4ef7db7a95a7
- Child:
- 6:34d93ea4d519
diff -r 4ef7db7a95a7 -r 48b7fd921bef ESP8266_WebServer.h --- a/ESP8266_WebServer.h Thu Jan 01 16:27:58 2015 +0000 +++ b/ESP8266_WebServer.h Sun Jan 04 11:48:11 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,11 +73,24 @@ 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); void SendFile(int linkID, FileHandle* file, const char* mimeType); void SendFile(int linkID, FileHandle* file, const char* mimeType, int maxAge); + + 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