Changeset 46 in cheroxy for trunk/include/CRXHttpResponse.h


Ignore:
Timestamp:
11/26/12 15:23:31 (11 years ago)
Author:
cheese
Message:

#1 rename http message to http header and change way to process response content as binary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/CRXHttpResponse.h

    r44 r46  
    55#define __CRXHTTPRESPONSE_H__
    66
    7 #include "CRXHttpMessage.h"
     7#include "CRXHttpHeader.h"
     8
     9#include <vector>
    810
    911#define ERROR_HTTP_RESPONSE                                 -4000
     
    1315#define ERROR_HTTP_RESPONSE_FAILED_TO_PARSE_CONTENT         ERROR_HTTP_RESPONSE - 4
    1416
    15 class CRXHttpResponse : public CRXHttpMessage
     17class CRXHttpResponse : public CRXHttpHeader
    1618{
    1719private:
    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;
    2725
    2826public:
     
    3331    void                Parse               (void);
    3432    void                Reset               (void);
    35     void                ResetContent        (void);
    3633
    3734public:
     
    3936
    4037    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);
    4439    std::string         GetHeader           (void) const;
    4540    int                 SetContent          (const char * aContent,
Note: See TracChangeset for help on using the changeset viewer.