NetServices Stack source

Dependents:   HelloWorld ServoInterfaceBoardExample1 4180_Lab4

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Thu Aug 05 14:54:16 2010 +0000
Parent:
9:c79fa4034f5b
Child:
11:da4498f591ee
Commit message:

Changed in this revision

core/netservice.h Show annotated file Show diff for this revision Revisions of this file
netCfg.h Show annotated file Show diff for this revision Revisions of this file
services/http/client/data/HTTPFile.h Show annotated file Show diff for this revision Revisions of this file
services/http/client/data/HTTPStream.h Show annotated file Show diff for this revision Revisions of this file
services/http/server/HTTPRequestHandler.h Show annotated file Show diff for this revision Revisions of this file
--- a/core/netservice.h	Thu Aug 05 14:32:43 2010 +0000
+++ b/core/netservice.h	Thu Aug 05 14:54:16 2010 +0000
@@ -21,29 +21,38 @@
 THE SOFTWARE.
 */
 
+/**
+\file Net Service base class header file
+*/
+
 #ifndef NETSERVICE_H
 #define NETSERVICE_H
 
-//class NetDnsRequest;
-//#include "net.h"
-
-//Each connection-oriented object can register as service (by inheriting this class), so that it is polled regularly
-//It notifies the pool when the connection is terminated so that it can be destroyed
-
 #include <list>
 using std::list;
 
+///Net Service base class
+/**
+Each connection-oriented object can register as service (by inheriting this class), so that it is polled regularly.
+It notifies the pool when the connection is terminated so that it can be destroyed.
+*/
 class NetService
 {
 public:
+  ///Instantiates a new service
+  /**
+  @param owned If true the object is owned by the pool and will be destroyed on closure.
+  */
   NetService(bool owned = true); //Is owned by the pool?
   virtual ~NetService();
 
+  ///This method can be inherited so that it is called on each @a Net::poll() call.
   virtual void poll();
  
   static void servicesPoll(); //Poll all registered services & destroy closed ones
 
 protected:
+  ///This flags the service as to be destructed if owned by the pool.
   void close();
   
 private:
--- a/netCfg.h	Thu Aug 05 14:32:43 2010 +0000
+++ b/netCfg.h	Thu Aug 05 14:54:16 2010 +0000
@@ -1,8 +1,6 @@
 #ifndef NET_CFG_H
-#define NET_TELIT_STACK 0
 #define NET_GPRS 1
 #define NET_PPP 1
-#define NET_ZG2100 0
 #define NET_GPRS_MODULE 1
 #define NET_ETH 1
 #define NET_USB_SERIAL 1
--- a/services/http/client/data/HTTPFile.h	Thu Aug 05 14:32:43 2010 +0000
+++ b/services/http/client/data/HTTPFile.h	Thu Aug 05 14:54:16 2010 +0000
@@ -34,15 +34,20 @@
 ///HTTP Client data container for files
 /**
 This class provides file access/storage for HTTP requests and responses' data payloads.
+
+
 */
 class HTTPFile : public HTTPData //Read or Write data from a file
 {
 public:
   ///Instantiates data source/sink with file in param.
   /**
-  Uses file at path @param path.
+  Uses file at path @a path.
   It will be opened when some data has to be read/written from/to it and closed when this operation is complete or on destruction of the instance.
   Note that the file will be opened with mode "w" for writing and mode "r" for reading, so the file will be cleared between each request if you are using it for writing.
+  
+  @note
+  Note that to use this you must instantiate a proper file system (such as the LocalFileSystem or the SDFileSystem).
   */
   HTTPFile(const char* path);
   virtual ~HTTPFile();
--- a/services/http/client/data/HTTPStream.h	Thu Aug 05 14:32:43 2010 +0000
+++ b/services/http/client/data/HTTPStream.h	Thu Aug 05 14:54:16 2010 +0000
@@ -47,7 +47,7 @@
   
   ///Starts to read into buffer
   /**
-  Passes a buffer of address @param buf and size @param size to the instance.
+  Passes a buffer of address @a buf and size @a size to the instance.
   When it receives data it will be stored in this buffer.
   When the buffer is full it throttles the client until this function is called again.
   */
--- a/services/http/server/HTTPRequestHandler.h	Thu Aug 05 14:32:43 2010 +0000
+++ b/services/http/server/HTTPRequestHandler.h	Thu Aug 05 14:54:16 2010 +0000
@@ -21,6 +21,10 @@
 THE SOFTWARE.
 */
 
+/**
+HTTP Request Handler header file.
+*/
+
 #ifndef HTTP_REQUEST_HANDLER_H
 #define HTTP_REQUEST_HANDLER_H
 
@@ -36,9 +40,11 @@
 #include <map>
 using std::map;
 
+///HTTP Server's generic request handler
 class HTTPRequestHandler : public NetService
 {
 public:
+  ///Instantiated by the HTTP Server
   HTTPRequestHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
   virtual ~HTTPRequestHandler();