A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.

Dependents:   Smart-WiFly-WebServer WattEye X10Svr SSDP_Server

Revision:
33:ef165a67ab22
Parent:
32:7ded9bacb546
Child:
36:1bb5fa6b109c
--- a/SW_HTTPServer.h	Mon Dec 30 23:03:37 2013 +0000
+++ b/SW_HTTPServer.h	Fri Jan 03 19:12:22 2014 +0000
@@ -188,6 +188,7 @@
     typedef enum CALLBACKTYPE {
         CONTENT_LENGTH_REQUEST, ///< ask the client if they wish to accept the data, typically from a POST event
         DATA_TRANSFER,          ///< used when submitting a file via a form
+        DATA_TRANSFER_END,      ///< used when all data has been given to the client (may be used to close the file)
         SEND_PAGE,              ///< the activated method should now send the page
     } CallBackType;
 
@@ -211,15 +212,19 @@
     *       When the callback returns, it should always indicate true that it has sent the page.
     *
     * @note The queryParams pointer purpose depends on the callback type.
-    *       For CONTENT_LENGTH_REQUEST, the queryParams pointer points to the name=value pairs from the 
+    *       For CONTENT_LENGTH_REQUEST, the pointer points to the name=value pairs from the 
     *           header.
-    *       For DATA_TRANSFER, the queryParams pointer points to the start of the chunk of data, queryParamCount is # bytes.
+    *       For DATA_TRANSFER, the pointer points to the start of the actual data.
     *       For SEND_PAGE, ... <to be determined>
     *
     * @param svr is a handle to this class, so the callback has access to member functions
+    * @param type is the callback type @see CallBackType
+    * @param path is the pointer to a large block of information being transferred
     * @param queryParams is a pointer based on the callback type.
-    * @queryParamCount is the number of parameters or bytes.
-    * @return true if command was accepted
+    * @param count is the number of items - for type = CONTENT_LENGTH_REQUEST this is the number of 
+    *        name=value pars in the queryParams parameter, and for the DATA_TRANSFER this is the 
+    *        number of bytes being passed in the path parameters.
+    * @return one of the @see CallBackResults signals indicating error or successes
     */
     typedef CallBackResults (* Handler)(HTTPServer * svr, CallBackType type, const char *path, const namevalue *queryParams, int queryParamCount);