Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: capcodec.h
Link against: CapCodec.dll

Class CCapCodec

CCapCodec

Support

Supported from 6.0

Description

Defines a WSP capability set. Connection-oriented WSP sessions allow a client (initiator) and WAP Server (responder) to do a one-way negotiation of capabilities. Applications use this class to create and retrieve such capability sets.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCapCodecDefines a WSP capability set

Defined in CCapCodec:
AddAliasAddress(), AddCodePage(), AddExtendedMethod(), AddUnknownCap(), ClientSDUSize(), EAckHeaders, EAll, EConfPush, EProtOptions, EPush, ESessionResume, GetAliasAddress(), GetCodePage(), GetExtendedMethod(), GetProtocolOptions(), GetPushMOR(), GetServerSDUSize(), GetUnknownCap(), MethodMOR(), NewL(), NumAliasAddress(), NumCodePages(), NumExtendedMethods(), NumUnkownCap(), Reset(), SetClientSDUSize(), SetMethodMOR(), SetProtocolOptions(), SetPushMOR(), SetServerSDUSize(), ~CCapCodec()

Inherited from CBase:
operator new()

See also:


Creation and destruction


NewL()

static CCapCodec* NewL();

Description

Creates a CCapCodec object.

Return value

CCapCodec*


NewL()

static CCapCodec* NewL(const TDesC8& aEncodeBuf);

Description

Creates a CCapCodec object and initialises the capability set.

Parameters

const TDesC8& aEncodeBuf

An encoded capabilities buffer retrieved from the server using a RWSPCOConn::GetSessionData() call

Return value

CCapCodec*


~CCapCodec()

~CCapCodec();

Description

Destructor.

[Top]


Member functions


AddAliasAddress()

TInt AddAliasAddress(const TAliasAddress& aAddress);

Description

Adds an Alias capability.

Parameters

const TAliasAddress& aAddress

Return value

TInt

KErrNone if success, otherwise a non-zero value


AddCodePage()

TInt AddCodePage(TDes8& aCodePage,const TUint8 aVal);

Description

Adds a Code Page capability.

Parameters

TDes8& aCodePage

The Code Page to add. Note that the buffer length must be sufficient for the function to append a byte.

const TUint8 aVal

The value associated with the Code Page

Return value

TInt

KErrNone if success, otherwise a non-zero value


AddExtendedMethod()

TInt AddExtendedMethod(TDes8& aMethod,const TUint8 aVal);

Description

Adds an Extended Method capability.

Parameters

TDes8& aMethod

The method to add. Note that the buffer length must be sufficient for the function to append a byte.

const TUint8 aVal

The value associated with the method

Return value

TInt

KErrNone if success, otherwise a non-zero value


AddUnknownCap()

TInt AddUnknownCap(TDes8& aName,const TDesC8& aValue);

Description

Adds an Unknown Capability.

Parameters

TDes8& aName

Name of the Unknown Capability to add. Note that the buffer length must be sufficient for the function to append a byte.

const TDesC8& aValue

Value of the Unknown Capability to add. Note that the buffer length must be sufficient for the function to append a byte.

Return value

TInt

KErrNone if success, otherwise a non-zero value


ClientSDUSize()

void ClientSDUSize(TUint32& aSize) const;

Description

Gets the Client SDU size capability.

Parameters

TUint32& aSize

On return, the Client SDU size.


GetAliasAddress()

TInt GetAliasAddress(const TInt aIndex, TAliasAddress& aAddress) const;

Description

Gets an Alias capability. Call NumAliasAddress() to get the number of available Aliases.

Parameters

const TInt aIndex

Index of the Alias to get. Valid range is 0 to (NumAliasAddress() - 1).

TAliasAddress& aAddress

On return, the Alias.

Return value

TInt

KErrNone if successful. KErrTooBig ifaIndex is out of range or aMethod is too small


GetCodePage()

TInt GetCodePage(const TInt aIndex,TDes8& aCodePage,TUint8& aVal) const;

Description

Gets a Code Page capability. Call NumCodePages() to get the number of available Code Pages.

Parameters

const TInt aIndex

Index of the Code Page to get. Valid range is 0 to (NumCodePages() - 1).

TDes8& aCodePage

On return, the Code Page. The buffer is caller-allocated.

TUint8& aVal

On return, the value associated with the Code Page

Return value

TInt

KErrNone if successful. KErrTooBig ifaIndex is out of range or aMethod is too small


GetExtendedMethod()

TInt GetExtendedMethod(const TInt aIndex,TDes8& aMethod,TUint8& aVal) const;

Description

Gets an Extended Method capability. CallNumExtendedMethods() to get the number of available Extended Methods.

Parameters

const TInt aIndex

Index of the Extended Method to get. Valid range is 0 to (NumExtendedMethods() - 1).

TDes8& aMethod

On return, the Extended Method. The buffer is caller-allocated.

TUint8& aVal

On return, the value associated with the Extended Method

Return value

TInt

KErrNone if successful. KErrTooBig ifaIndex is out of range or aMethod is too small


GetProtocolOptions()

void GetProtocolOptions(TUint32& aProtOptions);

Description

Gets the Protocol Options capability.

Parameters

TUint32& aProtOptions

On return, the Protocol Options capability. For values, seeEProtOptions.


GetPushMOR()

void GetPushMOR(TUint8& aVal) const;

Description

Gets the Push Maximum Outstanding Requests capability.

Parameters

TUint8& aVal


GetServerSDUSize()

void GetServerSDUSize(TUint32& aSize) const;

Description

Gets the Server SDU size capability.

Parameters

TUint32& aSize


GetUnknownCap()

TInt GetUnknownCap(const TInt aIndex,TDes8& aName,TDes8& aValue) const;

Description

Gets an Unknown Capability. Call NumUnkownCap() to get the number of available Unknown Capabilities.

Parameters

const TInt aIndex

Index of the Unknown Capability to get. Valid range is 0 to (NumUnkownCap() - 1).

TDes8& aName

On return, the Unknown Capability name. The buffer is caller-allocated.

TDes8& aValue

On return, the value associated with the Unknown Capability

Return value

TInt

KErrNone if successful. KErrTooBig ifaIndex is out of range or aMethod is too small


MethodMOR()

void MethodMOR(TUint8& aVal) const;

Description

Gets the Method Maximum Outstanding Requests capability.

Parameters

TUint8& aVal


NumAliasAddress()

void NumAliasAddress(TInt& aNumAddresses) const;

Description

Gets the number of Aliases.

Parameters

TInt& aNumAddresses


NumCodePages()

void NumCodePages(TInt& aNumCodePages) const;

Description

Gets the number of Code Pages.

Parameters

TInt& aNumCodePages


NumExtendedMethods()

void NumExtendedMethods(TInt& aNumExtendedMethods) const;

Description

Gets the number of Extended Methods.

Parameters

TInt& aNumExtendedMethods


NumUnkownCap()

void NumUnkownCap(TInt& aNumUnknown) const;

Description

Gets the number of Unknown Capabilities.

Parameters

TInt& aNumUnknown


Reset()

void Reset();

Description

Resets capability set to default values.


SetClientSDUSize()

void SetClientSDUSize(const TUint32 aSize);

Description

Sets the Client SDU size capability.

Parameters

const TUint32 aSize


SetMethodMOR()

void SetMethodMOR(const TUint8 aVal);

Description

Sets the Method Maximum Outstanding Requests capability.

Parameters

const TUint8 aVal


SetProtocolOptions()

void SetProtocolOptions(const TUint32 aProtOptions);

Description

Sets the Protocol Options capability.

Parameters

const TUint32 aProtOptions

Protocol Options capability bitmask. For values, seeEProtOptions.


SetPushMOR()

void SetPushMOR(const TUint8 aVal);

Description

Sets the Push Maximum Outstanding Requests capability.

Parameters

const TUint8 aVal


SetServerSDUSize()

void SetServerSDUSize(const TUint32 aSize);

Description

Gets the Server SDU size capability.

Parameters

const TUint32 aSize

[Top]


Enum EProtOptions

EProtOptions

Description

Protocol Options capability values.

EAckHeaders

0x10 Acknowledgement Headers

ESessionResume

0x20 Session Resume Facility

EPush

0x40 Push Facility

EConfPush

0x80 Confirmed Push Facility

EAll

All