Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: WSPEncoder.h
Link against: inetprotutil.lib

Class TWspPrimitiveEncoder

class TWspPrimitiveEncoder;

Description

Class encapsulating primitive encoding methods which are defined in the WSP standard. Input will be encoded and returned in an 8 bit buffer.

Members

Defined in TWspPrimitiveEncoder:
DateL(), LongIntL(), ShortInt(), TextStringL(), TextStringL(), UintVarL()


Member functions


ShortInt()

static IMPORT_C TUint8 ShortInt(const TUint8 aValue);

Description

Takes a TUint8 parameter, and sets the top bit. As specified for the WSP ShortInt encoding method.

Parameters

const TUint8 aValue

number to be encoded.

Return value

TUint8

Output, encoded as a TUint8, representation of the header buffer. If input greater that 127 (invalid input), returns 0


LongIntL()

static IMPORT_C HBufC8 *LongIntL(const TUint32 aValue);

Description

Takes a TUint32 parameter and encodes it using the WSP specified LongInt method.

Parameters

const TUint32 aValue

number to be encoded.

Return value

HBufC8 *

Output, encoded HBufC8 buffer.

Leave codes

KErrNoMemory


UintVarL()

static IMPORT_C HBufC8 *UintVarL(const TUint32 aInt);

Description

Takes a TUint32 parameter and encodes it using the WSP specified UintVar method.

Parameters

const TUint32 aInt

number to be encoded.

Return value

HBufC8 *

Output, encoded HBufC8 buffer.

Leave codes

KErrNoMemory


TextStringL()

static IMPORT_C HBufC8 *TextStringL(const RString aText);

Description

Takes a RString parameter and encodes it using the WSP specified TextString method.

Parameters

const RString aText

string to be encoded.

Return value

HBufC8 *

Output, encoded HBufC8 buffer.

Leave codes

KErrNoMemory


TextStringL()

static IMPORT_C HBufC8 *TextStringL(const TDesC8 &aText);

Description

Takes a TDesC8 parameter and encodes it using the WSP specified TextString method.

Parameters

const TDesC8 &aText

string to be encoded.

Return value

HBufC8 *

Output, encoded HBufC8 buffer.

Leave codes

KErrNoMemory


DateL()

static IMPORT_C HBufC8 *DateL(const TDateTime aDate);

Description

Takes a TDateTime parameter and encodes it using the WSP specified Date encoding method.

Parameters

const TDateTime aDate

value to be encoded.

Return value

HBufC8 *

Output, encoded HBufC8 buffer.

Leave codes

KErrNoMemory