#include <http.h>
Inherited by BazisLib::Network::HTTP::CHTTPReplyHeader, and BazisLib::Network::HTTP::CHTTPRequestHeader.
Public Member Functions | |
| std::string & | operator[] (const char *pszIndex) |
| Allows modifying individual fields. | |
| bool | Send (const ConstManagedPointer< AISocket > &pSocket) |
| Sends the field set to a socket. | |
| void | EraseField (const char *pszFieldName) |
| const std::string & | GetStringForm () |
Protected Member Functions | |
| CHTTPHeader () | |
| ~CHTTPHeader () | |
| bool | MergeFields (const CIStringMap &fields) |
| bool | Initialize (const ConstManagedPointer< AIAdvancedSocket > &pSocket) |
| bool | InitializeFromFieldList (const std::string &header) |
| bool | InitializeFromFullHeader (const std::string &header, std::string &firstLine) |
| bool | Valid () const |
| void | Reset () |
| const CIStringMap & | GetFields () |
Static Protected Member Functions | |
| static void | AppendField (std::string &fields, const std::string &field, const std::string &value) |
| A helper for appending key-value pair to an existing field set. | |
Private Member Functions | |
| bool | UpdateBuffer () |
| Updates buffer using m_pFieldData. | |
| bool | UpdateFields () |
| Updates m_FieldData using buffer. | |
Private Attributes | |
| std::string | m_Header |
| CIStringMap | m_FieldData |
| std::string | m_InvalidField |
This class is used to represent a widely used HTTP field set. The following functionality is implemented in it:
| BazisLib::Network::HTTP::CHTTPHeader::CHTTPHeader | ( | ) | [protected] |
| BazisLib::Network::HTTP::CHTTPHeader::~CHTTPHeader | ( | ) | [inline, protected] |
| static void BazisLib::Network::HTTP::CHTTPHeader::AppendField | ( | std::string & | fields, | |
| const std::string & | field, | |||
| const std::string & | value | |||
| ) | [inline, static, protected] |
A helper for appending key-value pair to an existing field set.
| void BazisLib::Network::HTTP::CHTTPHeader::EraseField | ( | const char * | pszFieldName | ) | [inline] |
| const CIStringMap& BazisLib::Network::HTTP::CHTTPHeader::GetFields | ( | ) | [inline, protected] |

| const std::string& BazisLib::Network::HTTP::CHTTPHeader::GetStringForm | ( | ) | [inline] |

| bool BazisLib::Network::HTTP::CHTTPHeader::Initialize | ( | const ConstManagedPointer< AIAdvancedSocket > & | pSocket | ) | [protected] |
| bool BazisLib::Network::HTTP::CHTTPHeader::InitializeFromFieldList | ( | const std::string & | header | ) | [protected] |
| bool BazisLib::Network::HTTP::CHTTPHeader::InitializeFromFullHeader | ( | const std::string & | header, | |
| std::string & | firstLine | |||
| ) | [protected] |
| bool BazisLib::Network::HTTP::CHTTPHeader::MergeFields | ( | const CIStringMap & | fields | ) | [protected] |
| std::string& BazisLib::Network::HTTP::CHTTPHeader::operator[] | ( | const char * | pszIndex | ) |
Allows modifying individual fields.
| void BazisLib::Network::HTTP::CHTTPHeader::Reset | ( | ) | [inline, protected] |
| bool BazisLib::Network::HTTP::CHTTPHeader::Send | ( | const ConstManagedPointer< AISocket > & | pSocket | ) |
Sends the field set to a socket.
Reimplemented in BazisLib::Network::HTTP::CHTTPRequestHeader, and BazisLib::Network::HTTP::CHTTPReplyHeader.
| bool BazisLib::Network::HTTP::CHTTPHeader::UpdateBuffer | ( | ) | [private] |
Updates buffer using m_pFieldData.
| bool BazisLib::Network::HTTP::CHTTPHeader::UpdateFields | ( | ) | [private] |
Updates m_FieldData using buffer.
| bool BazisLib::Network::HTTP::CHTTPHeader::Valid | ( | ) | const [inline, protected] |
std::string BazisLib::Network::HTTP::CHTTPHeader::m_Header [private] |
std::string BazisLib::Network::HTTP::CHTTPHeader::m_InvalidField [private] |