Suspended plotter for the skaperfest
Dependencies: mbed HTTPServer EthernetNetIf FatFileSystemCpp
Diff: HomePageHandler.hpp
- Revision:
- 0:602ff2b2d41c
diff -r 000000000000 -r 602ff2b2d41c HomePageHandler.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HomePageHandler.hpp Mon Aug 22 10:24:23 2022 +0000 @@ -0,0 +1,30 @@ +#ifndef HOME_PAGE_HANDLER_H +#define HOME_PAGE_HANDLER_H + +#include "HTTPRequestHandler.h" + +class HomePageHandler : public HTTPRequestHandler +{ +public: + HomePageHandler(const char* rootPath, const char* path, TCPSocket* pTcpSocket); + virtual ~HomePageHandler(); + + static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTcpSocket) + { + return new HomePageHandler(rootPath, path, pTcpSocket); + } + +protected: + 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 + +private: + FILE* m_fp; + int m_idx_size; +}; +#endif \ No newline at end of file