Dependents: SimpleLCDClock readCard2Twitter_http AnalogClock_StepperMotor_NTP ServoCamV1
Diff: services/http/client/data/HttpFile.h
- Revision:
- 3:7fe2ff1a61a4
- Parent:
- 2:32345cf67bf2
--- 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; };