Dependents:   SimpleLCDClock readCard2Twitter_http AnalogClock_StepperMotor_NTP ServoCamV1

Committer:
donatien
Date:
Mon May 24 10:24:38 2010 +0000
Revision:
0:a2dd0ba6cd2d
Child:
1:7043cc0db03c

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 0:a2dd0ba6cd2d 1 #ifndef SIMPLE_HANDLER_H
donatien 0:a2dd0ba6cd2d 2 #define SIMPLE_HANDLER_H
donatien 0:a2dd0ba6cd2d 3
donatien 0:a2dd0ba6cd2d 4 #include "../HttpRequestHandler.h"
donatien 0:a2dd0ba6cd2d 5
donatien 0:a2dd0ba6cd2d 6 class SimpleHandler : public HttpRequestHandler
donatien 0:a2dd0ba6cd2d 7 {
donatien 0:a2dd0ba6cd2d 8 public:
donatien 0:a2dd0ba6cd2d 9 SimpleHandler(const char* rootPath, const char* path, TcpSocket* pTcpSocket);
donatien 0:a2dd0ba6cd2d 10 virtual ~SimpleHandler();
donatien 0:a2dd0ba6cd2d 11
donatien 0:a2dd0ba6cd2d 12 //protected:
donatien 0:a2dd0ba6cd2d 13 static inline HttpRequestHandler* inst(const char* rootPath, const char* path, TcpSocket* pTcpSocket) { return new SimpleHandler(rootPath, path, pTcpSocket); } //if we ever could do static virtual functions, this would be one
donatien 0:a2dd0ba6cd2d 14
donatien 0:a2dd0ba6cd2d 15 virtual void doGet();
donatien 0:a2dd0ba6cd2d 16 virtual void doPost();
donatien 0:a2dd0ba6cd2d 17 virtual void doHead();
donatien 0:a2dd0ba6cd2d 18
donatien 0:a2dd0ba6cd2d 19 virtual void onReadable(); //Data has been read
donatien 0:a2dd0ba6cd2d 20 virtual void onWriteable(); //Data has been written & buf is free
donatien 0:a2dd0ba6cd2d 21 virtual void onClose(); //Connection is closing
donatien 0:a2dd0ba6cd2d 22 };
donatien 0:a2dd0ba6cd2d 23
donatien 0:a2dd0ba6cd2d 24 #endif