TimeHandler test program for the HTTPServer
Dependencies: EthernetNetIf mbed HTTPServer
Diff: TimeHandler.h
- Revision:
- 0:b37980ea1c2f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TimeHandler.h Thu Feb 03 17:51:51 2011 +0000 @@ -0,0 +1,24 @@ +#ifndef TIME_HANDLER_H +#define TIME_HANDLER_H + +#include "../HTTPRequestHandler.h" + +class TimeHandler : public HTTPRequestHandler +{ +public: + TimeHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket); + virtual ~TimeHandler(); + +//protected: + static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new TimeHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one + + virtual void doGet(); + virtual void doPost(); + virtual void doHead(); + + virtual void onReadable(); //Data has been read + virtual void onWriteable(); //Data has been written & buf is free + virtual void onClose(); //Connection is closing +}; + +#endif