BazisLib::Network::HTTP::CHTTPHeader Class Reference

Represents a key/value-based HTTP header valid for both request and reply. More...

#include <http.h>

Inherited by BazisLib::Network::HTTP::CHTTPReplyHeader, and BazisLib::Network::HTTP::CHTTPRequestHeader.

List of all members.

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 CIStringMapGetFields ()

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


Detailed Description

Represents a key/value-based HTTP header valid for both request and reply.

This class is used to represent a widely used HTTP field set. The following functionality is implemented in it:


Constructor & Destructor Documentation

BazisLib::Network::HTTP::CHTTPHeader::CHTTPHeader (  )  [protected]

BazisLib::Network::HTTP::CHTTPHeader::~CHTTPHeader (  )  [inline, protected]


Member Function Documentation

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]

Here is the call graph for this function:

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

Here is the call graph for this function:

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]


Member Data Documentation


The documentation for this class was generated from the following file:
SourceForge.net Logo