This library is deprecated.

Dependents:   HTTPServerExample HTTPServerHelloWorld PoorMansScope Lab3 ... more

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Mon Jun 14 10:22:58 2010 +0000
Parent:
0:52230c56755e
Child:
2:356c7fa399ae
Commit message:

Changed in this revision

LPC1768/HTTPServer.ar Show annotated file Show diff for this revision Revisions of this file
LPC1768/services/http/server/HTTPRequestDispatcher.h Show annotated file Show diff for this revision Revisions of this file
LPC1768/services/http/server/HTTPServer.h Show annotated file Show diff for this revision Revisions of this file
LPC1768/services/http/server/impl/FSHandler.h Show annotated file Show diff for this revision Revisions of this file
LPC2368/HTTPServer.ar Show annotated file Show diff for this revision Revisions of this file
LPC2368/services/http/server/HTTPRequestDispatcher.h Show annotated file Show diff for this revision Revisions of this file
LPC2368/services/http/server/HTTPServer.h Show annotated file Show diff for this revision Revisions of this file
LPC2368/services/http/server/impl/FSHandler.h Show annotated file Show diff for this revision Revisions of this file
Binary file LPC1768/HTTPServer.ar has changed
--- a/LPC1768/services/http/server/HTTPRequestDispatcher.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC1768/services/http/server/HTTPRequestDispatcher.h	Mon Jun 14 10:22:58 2010 +0000
@@ -60,7 +60,7 @@
   
   void onTimeout(); //Connection has timed out
 
-  bool getRequest(string* rootPath, string* fullPath, string* meth);
+  bool getRequest(string* rootPath, string* subPath, string* meth);
   
   HTTPServer* m_pSvr;
   TCPSocket* m_pTCPSocket;
--- a/LPC1768/services/http/server/HTTPServer.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC1768/services/http/server/HTTPServer.h	Mon Jun 14 10:22:58 2010 +0000
@@ -60,7 +60,7 @@
 };
 
 //Including handlers here for more convenience
-#include "impl/RpcHandler.h"
+#include "impl/RPCHandler.h"
 #include "impl/FSHandler.h"
 #include "impl/SimpleHandler.h"
 
--- a/LPC1768/services/http/server/impl/FSHandler.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC1768/services/http/server/impl/FSHandler.h	Mon Jun 14 10:22:58 2010 +0000
@@ -27,11 +27,19 @@
 #include "../HTTPRequestHandler.h"
 #include "mbed.h"
 
+#include <map>
+using std::map;
+
+#include <string>
+using std::string;
+
 class FSHandler : public HTTPRequestHandler
 {
 public:
   FSHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
   virtual ~FSHandler();
+  
+  static void mount(const string& fsPath, const string& rootPath);
 
 //protected:
   static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new FSHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
@@ -47,6 +55,7 @@
 private:
   FILE* m_fp;
   bool m_err404;
+  static map<string,string> m_lFsPath;
 };
 
 #endif
Binary file LPC2368/HTTPServer.ar has changed
--- a/LPC2368/services/http/server/HTTPRequestDispatcher.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC2368/services/http/server/HTTPRequestDispatcher.h	Mon Jun 14 10:22:58 2010 +0000
@@ -60,7 +60,7 @@
   
   void onTimeout(); //Connection has timed out
 
-  bool getRequest(string* rootPath, string* fullPath, string* meth);
+  bool getRequest(string* rootPath, string* subPath, string* meth);
   
   HTTPServer* m_pSvr;
   TCPSocket* m_pTCPSocket;
--- a/LPC2368/services/http/server/HTTPServer.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC2368/services/http/server/HTTPServer.h	Mon Jun 14 10:22:58 2010 +0000
@@ -60,7 +60,7 @@
 };
 
 //Including handlers here for more convenience
-#include "impl/RpcHandler.h"
+#include "impl/RPCHandler.h"
 #include "impl/FSHandler.h"
 #include "impl/SimpleHandler.h"
 
--- a/LPC2368/services/http/server/impl/FSHandler.h	Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC2368/services/http/server/impl/FSHandler.h	Mon Jun 14 10:22:58 2010 +0000
@@ -27,11 +27,19 @@
 #include "../HTTPRequestHandler.h"
 #include "mbed.h"
 
+#include <map>
+using std::map;
+
+#include <string>
+using std::string;
+
 class FSHandler : public HTTPRequestHandler
 {
 public:
   FSHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
   virtual ~FSHandler();
+  
+  static void mount(const string& fsPath, const string& rootPath);
 
 //protected:
   static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new FSHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
@@ -47,6 +55,7 @@
 private:
   FILE* m_fp;
   bool m_err404;
+  static map<string,string> m_lFsPath;
 };
 
 #endif