CHTTPFormEncoder Class Reference

class CHTTPFormEncoder : public CBase

A data supplier class that is used to build up data that is to be encoded to application/x-www-form-urlencoded.

A client will create an instance of this class and add name/value pairs. They then use this as the data supplier for the body of an http request that is a forms submission.

The name and value must both be supplied in the correct character encoding that you want to send to the server. This then gets url encoded.

Inherits from

Constructor & Destructor Documentation

CHTTPFormEncoder()

CHTTPFormEncoder()[private]

~CHTTPFormEncoder()

IMPORT_C~CHTTPFormEncoder()

Member Functions Documentation

AddFieldL(const TDesC8 &, const TDesC8 &)

IMPORT_C voidAddFieldL(const TDesC8 &aFieldName,
const TDesC8 &aFieldValue
)
Adds a field to the data. A field consists a name and value pair
leave
KErrNoMemory There was not enough memory
leave
KErrArgument aFieldName was empty
panic
Will panic if called after the first data has been supplied or OverallDataSize has been called

Parameters

const TDesC8 & aFieldNameA name. This must not be empty
const TDesC8 & aFieldValueA value. This may be an empty descriptor

AppendData(const TDesC8 &)

voidAppendData(const TDesC8 &aData)[private]

Parameters

const TDesC8 & aData

AppendSpecialChar(TUint8)

voidAppendSpecialChar(TUint8aChar)[private]

Appends a non alpha numeric character by converting it to HH where HH is the Hexadecmial representation of the character

Parameters

TUint8 aChar

ConstructL()

voidConstructL()[private]

GetNextDataPart(TPtrC8 &)

TBool GetNextDataPart(TPtrC8 &aDataPart)[virtual]

Parameters

TPtrC8 & aDataPart

IsAlphaNumeric(TUint8)

TBool IsAlphaNumeric(TUint8aChar)[private]

Parameters

TUint8 aChar

NewL()

IMPORT_C CHTTPFormEncoder *NewL()[static]

OverallDataSize()

TInt OverallDataSize()[virtual]

ReleaseData()

voidReleaseData()[virtual]

Reset()

TInt Reset()[virtual]

Member Enumerations Documentation

Enum THTTPFormEncoderState

Enumerators

EAllowAppendData
ESuppliedSize
ESupplyingData
EDataReleased

Member Data Documentation

HBufC8 * iData

HBufC8 *iData[private]

THTTPFormEncoderState iState

THTTPFormEncoderState iState[private]