Changeset 24 in cheroxy for trunk/include/CRXHttpResponse.h
- Timestamp:
- 11/14/12 14:00:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXHttpResponse.h
r5 r24 7 7 #include "CRXHttpMessage.h" 8 8 9 #define ERROR_HTTP_RESPONSE -4000 10 #define ERROR_HTTP_RESPONSE_INVALID_LENGTH ERROR_HTTP_RESPONSE - 1 11 #define ERROR_HTTP_RESPONSE_INVALID_FORMAT ERROR_HTTP_RESPONSE - 2 12 #define ERROR_HTTP_RESPONSE_FAILED_TO_MEMORY_ALLOCATION ERROR_HTTP_RESPONSE - 3 13 #define ERROR_HTTP_RESPONSE_FAILED_TO_PARSE_CONTENT ERROR_HTTP_RESPONSE - 4 14 9 15 class CRXHttpResponse : public CRXHttpMessage 10 16 { … … 12 18 int mStatusCode; 13 19 std::string mStatusString; 20 bool mIsChunked; /* Transfer-Encoding */ 21 int mContentLength; 22 23 struct __content_body__ { 24 char * mBody; 25 int mLength; 26 } mContent; 14 27 15 28 public: 16 CRXHttpResponse (void); 29 CRXHttpResponse (void); 30 ~CRXHttpResponse (void); 17 31 18 32 private: 19 void Parse (void); 33 void Parse (void); 34 int ParseContent (const char * aContent, 35 const int aLength); 36 void ResetContent (void); 20 37 21 38 public: 22 void SetResponse (const char * aHttpResponse); 23 std::string GetResponse (void) const; 39 int GetStatusCode (void) const; 24 40 25 CRXHttpResponse & operator = (const char * aHttpResponse); 41 int SetResponse (const char * aHttpResponse, 42 const int aResponseLength); 43 std::string GetHeader (void) const; 44 const char * GetContentBody (void) const; 45 int GetContentLength (void) const; 26 46 27 public: 28 int GetStatusCode (void) const; 47 CRXHttpResponse & operator = (const char * aHttpResponse); 29 48 }; 30 49
Note:
See TracChangeset
for help on using the changeset viewer.