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 TIntConvertAllHeadersToParsedFormat()
TInt FieldPartsL(RStringF)
THTTPHdrFieldIter Fields()
TInt GetField(RStringF, TInt, THTTPHdrVal &)
voidGetFieldL(RStringF, TInt, THTTPHdrVal &)
THTTPHdrVal GetParam(RStringF, RStringF, THTTPHdrVal &, TInt)
TInt GetRawField(RStringF, TPtrC8 &)
voidGetRawFieldL(RStringF, TPtrC8 &)
RHTTPHeaders Handle()
IMPORT_C CHeaderField *LookupField(RStringF)
CHeaders *NewL(CHeaderCodec &)
voidRemoveAllFields()
TInt RemoveField(RStringF)
TInt RemoveFieldPartL(RStringF, TInt)
TInt SetField(RStringF, THTTPHdrVal)
voidSetFieldL(RStringF, THTTPHdrVal)
voidSetFieldL(RStringF, THTTPHdrVal, RStringF, THTTPHdrVal)
voidSetParamL(RStringF, RStringF, THTTPHdrVal, TInt)
voidSetRawFieldL(RStringF, const TDesC8 &, const TDesC8 &)
Private Member Functions
CHeaders(CHeaderCodec &)
CHeaderField *CreateOrLookupField(RStringF)
CHeaderField &CreateOrLookupFieldL(RStringF)
TInt DoInsertInNameOrder(CHeaderField *, RStringF)
voidDoInsertInNameOrderL(CHeaderField *, RStringF)
CHeaderFieldParam *GetFieldParameter(RStringF, RStringF, TInt)
TInt GetFieldPart(RStringF, TInt, CHeaderFieldPart *&)
CHeaderFieldPart *GetFieldPartL(RStringF, TInt)
TBool IsPredefinedHeader(RStringF)
TInt LocateFieldName(RStringF)
voidPurgeFields()
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 TIntConvertAllHeadersToParsedFormat()

CreateOrLookupField(RStringF)

CHeaderField *CreateOrLookupField(RStringFaHeaderName)[private]

Parameters

RStringF aHeaderName

CreateOrLookupFieldL(RStringF)

CHeaderField &CreateOrLookupFieldL(RStringFaHeaderName)[private]

Parameters

RStringF aHeaderName

DoInsertInNameOrder(CHeaderField *, RStringF)

TInt DoInsertInNameOrder(CHeaderField *aHeader,
RStringFaHeaderName
)[private]

Parameters

CHeaderField * aHeader
RStringF aHeaderName

DoInsertInNameOrderL(CHeaderField *, RStringF)

voidDoInsertInNameOrderL(CHeaderField *aHeader,
RStringFaHeaderName
)[private]

Parameters

CHeaderField * aHeader
RStringF aHeaderName

FieldPartsL(RStringF)

TInt FieldPartsL(RStringFaFieldName)const

Parameters

RStringF aFieldName

Fields()

THTTPHdrFieldIter Fields()const

GetField(RStringF, TInt, THTTPHdrVal &)

TInt GetField(RStringFaFieldName,
TIntaPartIdx,
THTTPHdrVal &aHeaderValue
)const

Parameters

RStringF aFieldName
TInt aPartIdx
THTTPHdrVal & aHeaderValue

GetFieldL(RStringF, TInt, THTTPHdrVal &)

voidGetFieldL(RStringFaFieldName,
TIntaPartIdx,
THTTPHdrVal &aHeaderValue
)const

Parameters

RStringF aFieldName
TInt aPartIdx
THTTPHdrVal & aHeaderValue

GetFieldParameter(RStringF, RStringF, TInt)

CHeaderFieldParam *GetFieldParameter(RStringFaFieldName,
RStringFaParamName,
TIntaPartIdx
)const [private]

Parameters

RStringF aFieldName
RStringF aParamName
TInt aPartIdx

GetFieldPart(RStringF, TInt, CHeaderFieldPart *&)

TInt GetFieldPart(RStringFaFieldName,
TIntaPartIdx,
CHeaderFieldPart *&aPart
)const [private]

Parameters

RStringF aFieldName
TInt aPartIdx
CHeaderFieldPart *& aPart

GetFieldPartL(RStringF, TInt)

CHeaderFieldPart *GetFieldPartL(RStringFaFieldName,
TIntaPartIdx
)const [private]

Parameters

RStringF aFieldName
TInt aPartIdx

GetParam(RStringF, RStringF, THTTPHdrVal &, TInt)

THTTPHdrVal GetParam(RStringFaFieldName,
RStringFaParamName,
THTTPHdrVal &aValue,
TIntaPartIdx
)const

Parameters

RStringF aFieldName
RStringF aParamName
THTTPHdrVal & aValue
TInt aPartIdx

GetRawField(RStringF, TPtrC8 &)

TInt GetRawField(RStringFaFieldName,
TPtrC8 &aRawFieldData
)const

Parameters

RStringF aFieldName
TPtrC8 & aRawFieldData

GetRawFieldL(RStringF, TPtrC8 &)

voidGetRawFieldL(RStringFaFieldName,
TPtrC8 &aRawFieldData
)const

Parameters

RStringF aFieldName
TPtrC8 & aRawFieldData

Handle()

RHTTPHeaders Handle()

IsPredefinedHeader(RStringF)

TBool IsPredefinedHeader(RStringFaFieldName)const [private]

Parameters

RStringF aFieldName

LocateFieldName(RStringF)

TInt LocateFieldName(RStringFaHeaderName)const [private]

Parameters

RStringF aHeaderName

LookupField(RStringF)

IMPORT_C CHeaderField *LookupField(RStringFaString)

Parameters

RStringF aString

NewL(CHeaderCodec &)

CHeaders *NewL(CHeaderCodec &aCodec)[static]

Parameters

CHeaderCodec & aCodec

PurgeFields()

voidPurgeFields()[private]

RemoveAllFields()

voidRemoveAllFields()

RemoveField(RStringF)

TInt RemoveField(RStringFaFieldName)

Parameters

RStringF aFieldName

RemoveFieldPartL(RStringF, TInt)

TInt RemoveFieldPartL(RStringFaFieldName,
TIntaIndex
)

Parameters

RStringF aFieldName
TInt aIndex

SetField(RStringF, THTTPHdrVal)

TInt SetField(RStringFaFieldName,
THTTPHdrValaFieldValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue

SetFieldL(RStringF, THTTPHdrVal)

voidSetFieldL(RStringFaFieldName,
THTTPHdrValaFieldValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue

SetFieldL(RStringF, THTTPHdrVal, RStringF, THTTPHdrVal)

voidSetFieldL(RStringFaFieldName,
THTTPHdrValaFieldValue,
RStringFaParamName,
THTTPHdrValaParamValue
)

Parameters

RStringF aFieldName
THTTPHdrVal aFieldValue
RStringF aParamName
THTTPHdrVal aParamValue

SetParamL(RStringF, RStringF, THTTPHdrVal, TInt)

voidSetParamL(RStringFaFieldName,
RStringFaParamName,
THTTPHdrValaParamValue,
TIntaPartIdx
)

Parameters

RStringF aFieldName
RStringF aParamName
THTTPHdrVal aParamValue
TInt aPartIdx

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

voidSetRawFieldL(RStringFaFieldName,
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]