Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:


Member functions


ShortInt(const TUint8)

IMPORT_C static 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(const TUint32)

IMPORT_C static 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(const TUint32)

IMPORT_C static 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(const RString)

IMPORT_C static 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(const TDesC8 &)

IMPORT_C static 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(const TDateTime)

IMPORT_C static 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