Dependents:   SimpleLCDClock readCard2Twitter_http AnalogClock_StepperMotor_NTP ServoCamV1

Revision:
0:a2dd0ba6cd2d
Child:
1:7043cc0db03c
diff -r 000000000000 -r a2dd0ba6cd2d services/http/server/impl/RpcHandler.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/services/http/server/impl/RpcHandler.h	Mon May 24 10:24:38 2010 +0000
@@ -0,0 +1,27 @@
+#ifndef RPC_HANDLER_H
+#define RPC_HANDLER_H
+
+#include "../HttpRequestHandler.h"
+
+class RpcHandler : public HttpRequestHandler
+{
+public:
+  RpcHandler(const char* rootPath, const char* path, TcpSocket* pTcpSocket);
+  virtual ~RpcHandler();
+
+//protected:
+  static inline HttpRequestHandler* inst(const char* rootPath, const char* path, TcpSocket* pTcpSocket) { return new RpcHandler(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
+
+protected:
+  void cleanReq(char* data);
+};
+
+#endif