CWspHeaderEncoder Class Reference

class CWspHeaderEncoder : public CBase

This class can be used to encode one header field at a time, with all its values and parameters.

It has no knowledge of encoding the BNF of a particular header field, but the functions provided can be used in combination, producing an 8-bit buffer containing the encoded header.

Intended usage would be to call a series of functions. The first one being StartHeader, The final one being EndHeader, which would return a buffer containing the complete encoded header field. eg: encoder->StartHeaderL(); encoder->AddLongIntL(); encoder->AddTextStringL(); HBufC8* output = encoder->EndHeaderL();

Inherits from

Public Member Functions
~CWspHeaderEncoder()
IMPORT_C voidAddDataL(const TDesC8 &)
IMPORT_C voidAddDateL(const TDateTime)
IMPORT_C voidAddIntegerL(const TUint)
IMPORT_C voidAddLongIntL(const TUint32)
IMPORT_C voidAddShortIntL(const TUint8)
IMPORT_C voidAddShortLengthL(const TUint8)
IMPORT_C voidAddTextStringL(const RString &)
IMPORT_C voidAddTextStringL(const TDesC8 &)
IMPORT_C voidAddTokenL(const TUint8)
IMPORT_C voidAddTokenTextL(const TDesC8 &)
IMPORT_C voidAddUintVarL(const TUint)
IMPORT_C HBufC8 *EndHeaderL()
IMPORT_C voidEndValueLengthL()
IMPORT_C CWspHeaderEncoder *NewL()
IMPORT_C CWspHeaderEncoder *NewLC()
IMPORT_C voidStartHeaderL(TUint8)
IMPORT_C voidStartHeaderL(const TDesC8 &)
IMPORT_C voidStartHeaderL(const RStringF)
IMPORT_C voidStartValueLengthL()
Private Member Functions
CWspHeaderEncoder()
voidConstructL()
voidInit()
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
RPointerArray< CDesC8Array >iArray
TInt iTotalLength

Constructor & Destructor Documentation

CWspHeaderEncoder()

CWspHeaderEncoder()[private]

~CWspHeaderEncoder()

IMPORT_C~CWspHeaderEncoder()[virtual]

Member Functions Documentation

AddDataL(const TDesC8 &)

IMPORT_C voidAddDataL(const TDesC8 &aData)

Parameters

const TDesC8 & aData

AddDateL(const TDateTime)

IMPORT_C voidAddDateL(const TDateTimeaDate)

Parameters

const TDateTime aDate

AddIntegerL(const TUint)

IMPORT_C voidAddIntegerL(const TUintaInt)

Parameters

const TUint aInt

AddLongIntL(const TUint32)

IMPORT_C voidAddLongIntL(const TUint32aValue)

Parameters

const TUint32 aValue

AddShortIntL(const TUint8)

IMPORT_C voidAddShortIntL(const TUint8aValue)

Parameters

const TUint8 aValue

AddShortLengthL(const TUint8)

IMPORT_C voidAddShortLengthL(const TUint8aValue)

Parameters

const TUint8 aValue

AddTextStringL(const RString &)

IMPORT_C voidAddTextStringL(const RString &aText)

Parameters

const RString & aText

AddTextStringL(const TDesC8 &)

IMPORT_C voidAddTextStringL(const TDesC8 &aText)

Parameters

const TDesC8 & aText

AddTokenL(const TUint8)

IMPORT_C voidAddTokenL(const TUint8aToken)

Parameters

const TUint8 aToken

AddTokenTextL(const TDesC8 &)

IMPORT_C voidAddTokenTextL(const TDesC8 &aTokenText)

Parameters

const TDesC8 & aTokenText

AddUintVarL(const TUint)

IMPORT_C voidAddUintVarL(const TUintaInt)

Parameters

const TUint aInt

ConstructL()

voidConstructL()[private]

EndHeaderL()

IMPORT_C HBufC8 *EndHeaderL()

EndValueLengthL()

IMPORT_C voidEndValueLengthL()

Init()

voidInit()[private]

NewL()

IMPORT_C CWspHeaderEncoder *NewL()[static]

NewLC()

IMPORT_C CWspHeaderEncoder *NewLC()[static]

StartHeaderL(TUint8)

IMPORT_C voidStartHeaderL(TUint8aToken)

Parameters

TUint8 aToken

StartHeaderL(const TDesC8 &)

IMPORT_C voidStartHeaderL(const TDesC8 &aString)

Parameters

const TDesC8 & aString

StartHeaderL(const RStringF)

IMPORT_C voidStartHeaderL(const RStringFaString)

Parameters

const RStringF aString

StartValueLengthL()

IMPORT_C voidStartValueLengthL()

Member Data Documentation

RPointerArray< CDesC8Array > iArray

RPointerArray< CDesC8Array >iArray[private]

Array for storing the partial encoded header. Each time StartValueLength is called a new array element is used. When EndValueLength is called, the array is decremented, data from the last element being added to the one before.

TInt iTotalLength

TInt iTotalLength[private]

Value incremented as the encoded header increases in size. Used to allocate the buffer for storing the final encoded header, output when EndHeader is called.