Clinton Lee Taylor / Mbed 2 deprecated WiFiLamp

Dependencies:   ESP8266_WebServer mbed

Fork of WiFiLamp by Sebastian Schocke

Revision:
7:f15c81074400
Parent:
5:42c6f9d916bc
Child:
9:319aeb6e0123
--- a/ESP8266_WebServer/ESP8266_WebServer.h	Thu Dec 18 15:02:20 2014 +0000
+++ b/ESP8266_WebServer/ESP8266_WebServer.h	Thu Dec 18 16:06:10 2014 +0000
@@ -1,14 +1,36 @@
 #include "mbed.h"
+#include <string>
 
 #ifndef _ESP8266_WEB_SERVER_H
 #define _ESP8266_WEB_SERVER_H
 
 class ESP8266_WebServer
 {
-    Serial serial;
+    Serial *serial;
+    char buffer[1024];
+    char reply[1024];
+    char response[2048];
+    char httpMethod[64];
+    char httpURI[512];
+    char* rxptr;
     
-    public: 
-        ESP8266_WebServer(Serial espUART);
-    
-}
+    private:
+        short data_waiting(void);
+        short string_waiting(const char*);
+        void readBuffer(void);
+        void sendResponse(int linkID);
+    public:
+        int LinkID;
+        std::string Method;
+        std::string URI;
+        Serial *debugSerial;
+        
+        ESP8266_WebServer(Serial *espUART);
+        void rxint(void);
+        void Initialize(void);
+        bool GetRequest(void);
+        void SendHTMLReply(int linkID, std::string reply);
+        void Send404Reply(int linkID);
+};
+
 #endif
\ No newline at end of file