Clinton Lee Taylor / Mbed 2 deprecated WiFiLamp

Dependencies:   ESP8266_WebServer mbed

Fork of WiFiLamp by Sebastian Schocke

ESP8266_WebServer/ESP8266_WebServer.h

Committer:
sschocke
Date:
2014-12-18
Revision:
7:f15c81074400
Parent:
5:42c6f9d916bc
Child:
9:319aeb6e0123

File content as of revision 7:f15c81074400:

#include "mbed.h"
#include <string>

#ifndef _ESP8266_WEB_SERVER_H
#define _ESP8266_WEB_SERVER_H

class ESP8266_WebServer
{
    Serial *serial;
    char buffer[1024];
    char reply[1024];
    char response[2048];
    char httpMethod[64];
    char httpURI[512];
    char* rxptr;
    
    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