Dependents:   SimpleLCDClock readCard2Twitter_http AnalogClock_StepperMotor_NTP ServoCamV1

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Wed May 26 11:50:40 2010 +0000
Parent:
2:32345cf67bf2
Child:
4:4fa18943de63
Commit message:

Changed in this revision

netCfg.h Show diff for this revision Revisions of this file
services.ar Show annotated file Show diff for this revision Revisions of this file
services/http/client/HttpData.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/HttpMap.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/client/data/HttpText.h Show annotated file Show diff for this revision Revisions of this file
--- a/netCfg.h	Tue May 25 11:58:19 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#ifndef NET_CFG_H
-#define NET_TELIT_STACK 0
-#define NET_GPRS 0
-#define NET_PPP 0
-#define NET_ZG2100 0
-#define NET_ETH 0
-#define NET_USB_SERIAL 0
-#define NET_TELIT 0
-#define NET_CFG_H 1
-#define NET_USB 0
-#define NET_LWIP_STACK 0
-#endif
Binary file services.ar has changed
--- a/services/http/client/HttpData.h	Tue May 25 11:58:19 2010 +0000
+++ b/services/http/client/HttpData.h	Wed May 26 11:50:40 2010 +0000
@@ -34,6 +34,8 @@
 public:
   HttpData();
   virtual ~HttpData();
+  
+  virtual void clear() = 0;
 
 protected:
   friend class HttpClient;
--- a/services/http/client/data/HttpFile.h	Tue May 25 11:58:19 2010 +0000
+++ b/services/http/client/data/HttpFile.h	Wed May 26 11:50:40 2010 +0000
@@ -30,8 +30,10 @@
 class HttpFile : public HttpData //Read or Write data from a file
 {
 public:
-  HttpFile(const char* path, const char* mode); //mode is "r", "w", "a", etc
+  HttpFile(const char* path);
   virtual ~HttpFile();
+  
+  virtual void clear();
 
 protected:
   virtual int read(char* buf, int len);
@@ -47,7 +49,11 @@
   virtual void setDataLen(int len); //From Content-Length header
   
 private:
+  bool openFile(const char* mode); //true on success, false otherwise
+  void closeFile();
+
   FILE* m_fp;
+  string m_path;
   int m_len;
   bool m_chunked;
 };
--- a/services/http/client/data/HttpMap.h	Tue May 25 11:58:19 2010 +0000
+++ b/services/http/client/data/HttpMap.h	Wed May 26 11:50:40 2010 +0000
@@ -40,7 +40,8 @@
   
  /* string& operator[](const string& key);
   int count();*/
-  
+
+  virtual void clear();  
   
 protected:
   virtual int read(char* buf, int len);
--- a/services/http/client/data/HttpStream.h	Tue May 25 11:58:19 2010 +0000
+++ b/services/http/client/data/HttpStream.h	Wed May 26 11:50:40 2010 +0000
@@ -40,6 +40,8 @@
   bool readable();
   
   int readLen();
+  
+  virtual void clear();
       
 protected:
   virtual int read(char* buf, int len);
--- a/services/http/client/data/HttpText.h	Tue May 25 11:58:19 2010 +0000
+++ b/services/http/client/data/HttpText.h	Wed May 26 11:50:40 2010 +0000
@@ -41,6 +41,8 @@
   string& get();
   void set(const string& str);
   
+  virtual void clear();
+  
 protected:
   virtual int read(char* buf, int len);
   virtual int write(const char* buf, int len);