CHeaders Class Reference

class CHeaders : public CBase

The CHeaders class provides the internal implementation of the RHTTPHeaders interface, which is documented in <http.h>. Briefly, this interface provides a unified point at which all header data can be read and written for a given request or response. The CHeaders object is related to an instance of a specific CHTTPTransactionCodec subclass, which is used to provide on-demand decoding and encoding of indivual header fields. RHTTPHeaders

Inherits from

Nested Classes and Structures

Public Member Functions
~CHeaders ()
CHeaderCodec & Codec ()
IMPORT_C TInt ConvertAllHeadersToParsedFormat ()
TInt FieldPartsL ( RStringF )
THTTPHdrFieldIter Fields ()
TInt GetField ( RStringF , TInt , THTTPHdrVal &)
void GetFieldL ( RStringF , TInt , THTTPHdrVal &)
THTTPHdrVal GetParam ( RStringF , RStringF , THTTPHdrVal &, TInt )
TInt GetRawField ( RStringF , TPtrC8 &)
void GetRawFieldL ( RStringF , TPtrC8 &)
RHTTPHeaders Handle ()
IMPORT_C CHeaderField * LookupField ( RStringF )
CHeaders * NewL ( CHeaderCodec &)
void RemoveAllFields ()
TInt RemoveField ( RStringF )
TInt RemoveFieldPartL ( RStringF , TInt )
TInt SetField ( RStringF , THTTPHdrVal )
void SetFieldL ( RStringF , THTTPHdrVal )
void SetFieldL ( RStringF , THTTPHdrVal , RStringF , THTTPHdrVal )
void SetParamL ( RStringF , RStringF , THTTPHdrVal , TInt )
void SetRawFieldL ( RStringF , const TDesC8 &, const TDesC8 &)
Private Member Functions
CHeaders ( CHeaderCodec &)
CHeaderField * CreateOrLookupField ( RStringF )
CHeaderField & CreateOrLookupFieldL ( RStringF )
TInt DoInsertInNameOrder ( CHeaderField *, RStringF )
void DoInsertInNameOrderL ( CHeaderField *, RStringF )
CHeaderFieldParam * GetFieldParameter ( RStringF , RStringF , TInt )
TInt GetFieldPart ( RStringF , TInt , CHeaderFieldPart *&)
CHeaderFieldPart * GetFieldPartL ( RStringF , TInt )
TBool IsPredefinedHeader ( RStringF )
TInt LocateFieldName ( RStringF )
void PurgeFields ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CHeaderCodec & iCodec
RArray < THeaderFieldNamePair > iFields

Constructor & Destructor Documentation

CHeaders(CHeaderCodec &)

CHeaders ( CHeaderCodec & aCodec ) [private, inline]

Parameters

CHeaderCodec & aCodec

~CHeaders()

~CHeaders ( )

Member Functions Documentation

Codec()

CHeaderCodec & Codec ( ) const [inline]

ConvertAllHeadersToParsedFormat()

IMPORT_C TInt ConvertAllHeadersToParsedFormat ( )

CreateOrLookupField(RStringF)

CHeaderField * CreateOrLookupField ( RStringF aHeaderName ) [private]

Parameters

RStringF aHeaderName

CreateOrLookupFieldL(RStringF)

CHeaderField & CreateOrLookupFieldL ( RStringF aHeaderName ) [private]

Parameters

RStringF aHeaderName

DoInsertInNameOrder(CHeaderField *, RStringF)

TInt DoInsertInNameOrder ( CHeaderField * aHeader,
RStringF aHeaderName
) [private]

Parameters

CHeaderField * aHeader
RStringF aHeaderName

DoInsertInNameOrderL(CHeaderField *, RStringF)

void DoInsertInNameOrderL ( CHeaderField * aHeader,
RStringF aHeaderName
) [private]

Parameters

CHeaderField * aHeader
RStringF aHeaderName

FieldPartsL(RStringF)

TInt FieldPartsL ( RStringF aFieldName ) const

Parameters

RStringF aFieldName

Fields()

THTTPHdrFieldIter Fields ( ) const

GetField(RStringF, TInt, THTTPHdrVal &)

TInt GetField ( RStringF aFieldName,
TInt aPartIdx,
THTTPHdrVal & aHeaderValue
) const

Parameters

RStringF aFieldName
TInt aPartIdx
THTTPHdrVal & aHeaderValue

GetFieldL(RStringF, TInt, THTTPHdrVal &)

void GetFieldL ( RStringF aFieldName,
TInt aPartIdx,
THTTPHdrVal & aHeaderValue
) const

Parameters

RStringF aFieldName
TInt aPartIdx
THTTPHdrVal & aHeaderValue

GetFieldParameter(RStringF, RStringF, TInt)

CHeaderFieldParam * GetFieldParameter ( RStringF aFieldName,
RStringF aParamName,
TInt aPartIdx
) const [private]

Parameters

RStringF aFieldName
RStringF aParamName
TInt aPartIdx

GetFieldPart(RStringF, TInt, CHeaderFieldPart *&)

TInt GetFieldPart ( RStringF aFieldName,
TInt aPartIdx,
CHeaderFieldPart *& aPart
) const [private]

Parameters

RStringF aFieldName
TInt aPartIdx
CHeaderFieldPart *& aPart

GetFieldPartL(RStringF, TInt)

CHeaderFieldPart * GetFieldPartL ( RStringF aFieldName,
TInt aPartIdx
) const [private]

Parameters

RStringF aFieldName
TInt aPartIdx

GetParam(RStringF, RStringF, THTTPHdrVal &, TInt)

THTTPHdrVal GetParam ( RStringF aFieldName,
RStringF aParamName,
THTTPHdrVal & aValue,
TInt aPartIdx
) const

Parameters

RStringF aFieldName
RStringF aParamName
THTTPHdrVal & aValue
TInt aPartIdx

GetRawField(RStringF, TPtrC8 &)

TInt GetRawField ( RStringF aFieldName,
TPtrC8 & aRawFieldData
) const

Parameters

RStringF aFieldName
TPtrC8 & aRawFieldData

GetRawFieldL(RStringF, TPtrC8 &)

void GetRawFieldL ( RStringF aFieldName,
TPtrC8 & aRawFieldData
) const

Parameters

RStringF aFieldName
TPtrC8 & aRawFieldData

Handle()

RHTTPHeaders Handle ( )

IsPredefinedHeader(RStringF)

TBool IsPredefinedHeader ( RStringF aFieldName ) const [private]

Parameters

RStringF aFieldName

LocateFieldName(RStringF)

TInt LocateFieldName ( RStringF aHeaderName ) const [private]

Parameters

RStringF aHeaderName

LookupField(RStringF)

IMPORT_C CHeaderField * LookupField ( RStringF aString )

Parameters

RStringF aString

NewL(CHeaderCodec &)

CHeaders * NewL ( CHeaderCodec & aCodec ) [static]

Parameters

CHeaderCodec & aCodec

PurgeFields()

void PurgeFields ( ) [private]

RemoveAllFields()

void RemoveAllFields ( )

RemoveField(RStringF)

TInt RemoveField ( RStringF aFieldName )

Parameters

RStringF aFieldName

RemoveFieldPartL(RStringF, TInt)

TInt RemoveFieldPartL ( RStringF aFieldName,
TInt aIndex
)

Parameters

RStringF aFieldName
TInt aIndex

SetField(RStringF, THTTPHdrVal)

TInt SetField ( RStringF aFieldName,
THTTPHdrVal aFieldValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue

SetFieldL(RStringF, THTTPHdrVal)

void SetFieldL ( RStringF aFieldName,
THTTPHdrVal aFieldValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue

SetFieldL(RStringF, THTTPHdrVal, RStringF, THTTPHdrVal)

void SetFieldL ( RStringF aFieldName,
THTTPHdrVal aFieldValue,
RStringF aParamName,
THTTPHdrVal aParamValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue
RStringF aParamName
THTTPHdrVal aParamValue

SetParamL(RStringF, RStringF, THTTPHdrVal, TInt)

void SetParamL ( RStringF aFieldName,
RStringF aParamName,
THTTPHdrVal aParamValue,
TInt aPartIdx
)

Parameters

RStringF aFieldName
RStringF aParamName
THTTPHdrVal aParamValue
TInt aPartIdx

SetRawFieldL(RStringF, const TDesC8 &, const TDesC8 &)

void SetRawFieldL ( RStringF aFieldName,
const TDesC8 & aOtaFieldData,
const TDesC8 & aFieldSeparator
)

Parameters

RStringF aFieldName
const TDesC8 & aOtaFieldData
const TDesC8 & aFieldSeparator

Member Data Documentation

CHeaderCodec & iCodec

CHeaderCodec & iCodec [private]

RArray< THeaderFieldNamePair > iFields

RArray < THeaderFieldNamePair > iFields [private]