ported HTTP-Server with W5500 Ethernet Shield

Dependencies:   W5500Interface mbed-rpc mbed

Fork of HTTP-Server by F B

Committer:
embeddist
Date:
Tue Apr 28 13:54:18 2015 +0000
Revision:
11:ac3569846176
Parent:
0:9e4bcb10b3e3
ported HTTP-Server with W5500 Ethernet Shield

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feb11 0:9e4bcb10b3e3 1 #ifndef REQUEST_HANDLER
feb11 0:9e4bcb10b3e3 2 #define REQUEST_HANDLER
feb11 0:9e4bcb10b3e3 3
feb11 0:9e4bcb10b3e3 4 #include "RPCCommand.h"
feb11 0:9e4bcb10b3e3 5
feb11 0:9e4bcb10b3e3 6 class RequestHandler
feb11 0:9e4bcb10b3e3 7 {
feb11 0:9e4bcb10b3e3 8 public :
feb11 0:9e4bcb10b3e3 9
feb11 0:9e4bcb10b3e3 10 virtual void handle(const RPCCommand& cmd, char* reply) = 0;
feb11 0:9e4bcb10b3e3 11 };
feb11 0:9e4bcb10b3e3 12
feb11 0:9e4bcb10b3e3 13 class GetRequestHandler : public RequestHandler
feb11 0:9e4bcb10b3e3 14 {
feb11 0:9e4bcb10b3e3 15 public :
feb11 0:9e4bcb10b3e3 16
feb11 0:9e4bcb10b3e3 17 virtual void handle(const RPCCommand& cmd, char* reply);
feb11 0:9e4bcb10b3e3 18 };
feb11 0:9e4bcb10b3e3 19
feb11 0:9e4bcb10b3e3 20 class PutRequestHandler : public RequestHandler
feb11 0:9e4bcb10b3e3 21 {
feb11 0:9e4bcb10b3e3 22 public :
feb11 0:9e4bcb10b3e3 23
feb11 0:9e4bcb10b3e3 24 virtual void handle(const RPCCommand& cmd, char* reply);
feb11 0:9e4bcb10b3e3 25
feb11 0:9e4bcb10b3e3 26 };
feb11 0:9e4bcb10b3e3 27
feb11 0:9e4bcb10b3e3 28
feb11 0:9e4bcb10b3e3 29 class DeleteRequestHandler : public RequestHandler
feb11 0:9e4bcb10b3e3 30 {
feb11 0:9e4bcb10b3e3 31 public :
feb11 0:9e4bcb10b3e3 32
feb11 0:9e4bcb10b3e3 33 virtual void handle(const RPCCommand& cmd, char* reply);
feb11 0:9e4bcb10b3e3 34
feb11 0:9e4bcb10b3e3 35 };
feb11 0:9e4bcb10b3e3 36
feb11 0:9e4bcb10b3e3 37 class ComplexRequestHandler : public RequestHandler
feb11 0:9e4bcb10b3e3 38 {
feb11 0:9e4bcb10b3e3 39 public :
feb11 0:9e4bcb10b3e3 40
feb11 0:9e4bcb10b3e3 41 virtual void handle(const RPCCommand& cmd, char* reply);
feb11 0:9e4bcb10b3e3 42
feb11 0:9e4bcb10b3e3 43 private :
feb11 0:9e4bcb10b3e3 44
feb11 0:9e4bcb10b3e3 45 GetRequestHandler getHandler;
feb11 0:9e4bcb10b3e3 46 PutRequestHandler putHandler;
feb11 0:9e4bcb10b3e3 47 DeleteRequestHandler deleteHandler;
feb11 0:9e4bcb10b3e3 48 };
feb11 0:9e4bcb10b3e3 49
feb11 0:9e4bcb10b3e3 50 #endif
feb11 0:9e4bcb10b3e3 51