Changeset 46 in cheroxy for trunk/include
- Timestamp:
- 11/26/12 15:23:31 (11 years ago)
- Location:
- trunk/include
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXHttpHeader.h
r45 r46 1 1 /** 2 * CRXHttp Message.h2 * CRXHttpHeader.h 3 3 */ 4 4 #ifndef __CRXHTTPMESSAGE_H__ … … 10 10 #define CRLF2 "\r\n\r\n" 11 11 12 class CRXHttp Message12 class CRXHttpHeader 13 13 { 14 14 protected: 15 std::string mHttp Message;15 std::string mHttpHeader; 16 16 std::string mHttpVersion; 17 17 18 18 public: 19 CRXHttp Message(void);20 virtual ~CRXHttp Message(void);19 CRXHttpHeader (void); 20 virtual ~CRXHttpHeader (void); 21 21 22 22 protected: 23 virtual void Parse (void) = 0; 24 virtual void Reset (void) = 0; 23 virtual void Parse (void) = 0; 25 24 26 25 public: 27 void SetMessage (const char * aHttpMessage); 28 std::string GetMessage (void) const; 29 30 void ResetMessage (void); 26 void Set (const char * aHeader); 27 std::string Get (void) const; 31 28 }; 32 29 -
trunk/include/CRXHttpRequest.h
r44 r46 5 5 #define __CRXHTTPREQUEST_H__ 6 6 7 #include "CRXHttp Message.h"7 #include "CRXHttpHeader.h" 8 8 9 class CRXHttpRequest : public CRXHttp Message9 class CRXHttpRequest : public CRXHttpHeader 10 10 { 11 11 private: … … 25 25 void Parse (void); 26 26 void ParseFileExtension (void); 27 void Reset (void);28 27 29 28 public: -
trunk/include/CRXHttpResponse.h
r44 r46 5 5 #define __CRXHTTPRESPONSE_H__ 6 6 7 #include "CRXHttpMessage.h" 7 #include "CRXHttpHeader.h" 8 9 #include <vector> 8 10 9 11 #define ERROR_HTTP_RESPONSE -4000 … … 13 15 #define ERROR_HTTP_RESPONSE_FAILED_TO_PARSE_CONTENT ERROR_HTTP_RESPONSE - 4 14 16 15 class CRXHttpResponse : public CRXHttp Message17 class CRXHttpResponse : public CRXHttpHeader 16 18 { 17 19 private: 18 int mStatusCode; 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; 20 int mStatusCode; 21 std::string mStatusString; 22 bool mIsChunked; /* Transfer-Encoding */ 23 unsigned int mContentLength; 24 std::vector <char> mContent; 27 25 28 26 public: … … 33 31 void Parse (void); 34 32 void Reset (void); 35 void ResetContent (void);36 33 37 34 public: … … 39 36 40 37 bool IsChunked (void) const; 41 int SetResponseAll (const char * aHttpResponse, 42 const int aResponseLength); 43 void SetHeader (const char * aHttpResponse); 38 void SetHeader (const char * aHeader); 44 39 std::string GetHeader (void) const; 45 40 int SetContent (const char * aContent, -
trunk/include/CRXProxy.h
r45 r46 7 7 #include "CRXException.h" 8 8 #include "CRXSocket.h" 9 #include "CRXHttp Message.h"9 #include "CRXHttpHeader.h" 10 10 #include "CRXHttpRequest.h" 11 11 #include "CRXHttpResponse.h"
Note:
See TracChangeset
for help on using the changeset viewer.