Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <wapmessage.h>
Link against: wapmsgcli.lib

Class CWapBoundCLWSPService

class CWapBoundCLWSPService : public CBase;

Description

Bound Connectionless WSP

Derivation

Members

Defined in CWapBoundCLWSPService:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CWapBoundCLWSPService* NewL();

Description

Allocates and creates a new CWapBoundCLWSPService object.

Return value

CWapBoundCLWSPService *

A new CWapBoundCLWSPService object.

Leave codes

System

wide error codes.


NewL(const TUid &)

IMPORT_C static CWapBoundCLWSPService* NewL(const TUid &aImplementation);

Description

Allocates and creates a new CWapBoundCLWSPService object.

Parameters

const TUid &aImplementation

Return value

CWapBoundCLWSPService *

A new CWapBoundCLWSPService object.

Leave codes

System

wide error codes.


~CWapBoundCLWSPService()

IMPORT_C virtual ~CWapBoundCLWSPService();

Description

Destructor


CWapBoundCLWSPService()

protected: IMPORT_C CWapBoundCLWSPService();

Description


ConstructL()

protected: IMPORT_C void ConstructL();

Description

[Top]


Member functions


Connect(Wap::TBearer,Wap::TPort,TBool)

virtual TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort, TBool aSecure)=0;

Description

Connects to the WAP stack, opening an endpoint that can be used for S-Unit-MethodInvoke and S-Unit-MethodResult primitives.

Parameters

Wap::TBearer aBearer

The bearer to listen on (use EAll for all bearers)

Wap::TPort aPort

The port to listen on. If set to 0, a local port will be chosen for the client's first CWapBoundCLWSPService::MethodInvoke(Wap::TBearer,const TDesC8 &,Wap::TPort,TUint,const TDesC &,const TDesC8 &,const TDesC8 &,const TUint8)

TBool aSecure

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


MethodInvoke(Wap::TBearer,const TDesC8 &,Wap::TPort,TUint,const TDesC &,const TDesC8 &,const TDesC8 &,const TUint8)

virtual TInt MethodInvoke(Wap::TBearer aBearer, const TDesC8 &aRemoteHost, Wap::TPort aRemotePort, TUint aMethod, const TDesC &aURI, const TDesC8 &aReqHeaders, const TDesC8 &aReqBody, const TUint8 aTransactionId)=0;

Description

Sends a request to a remote endpoint.

Parameters

Wap::TBearer aBearer

The bearer to be used, if the bound connection was opened with EAll

const TDesC8 &aRemoteHost

The address of the remote host to which to send the request. The format of the address is bearer-specific.

Wap::TPort aRemotePort

The port on the remote host to which the request will be sent

TUint aMethod

const TDesC16 &aURI

const TDesC8 &aReqHeaders

const TDesC8 &aReqBody

const TUint8 aTransactionId

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


MethodResult(TDes8 &,TDes8 &,TPckgBuf< TUint8 > &,TWSPStatus &,TRequestStatus &,TUint32)

virtual TInt MethodResult(TDes8 &aReqHeaders, TDes8 &aReqBody, TPckgBuf< TUint8 > &aTransactionIdPckg, TWSPStatus &aWspStatus, TRequestStatus &aReqStatus, TUint32 aTimeout)=0;

Description

Waits for a datagram to be received.

Parameters

TDes8 &aReqHeaders

TDes8 &aReqBody

TPckgBuf< TUint8 > &aTransactionIdPckg

TWSPStatus &aWspStatus

TRequestStatus &aReqStatus

Asynchonrous status word, used to signal when a data size is known

TUint32 aTimeout

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


CancelReq()

virtual void CancelReq()=0;

Description

Cancels a previously requested asynchronous CWapBoundCLWSPService::MethodResult(TDes8 &,TDes8 &,TPckgBuf< TUint8 > &,TWSPStatus &,TRequestStatus &,TUint32) notification.

If a datagram arrives at the local host, it will be discarded.


GetLocalPort(Wap::TPort &)

virtual TInt GetLocalPort(Wap::TPort &aPort)=0;

Description

Gets the local port of this endpoint.

This is useful if the port was chosen automatically.

Parameters

Wap::TPort &aPort

On return, the port number

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


GetLocalAddress(HBufC8 *&)

virtual TInt GetLocalAddress(HBufC8 *&aLocalHost)=0;

Description

Gets the local address of this endpoint.

Parameters

HBufC8 *&aLocalHost

On return, the address of the local host. Clients must pass in a reference to a NULL HBufC8 pointer. The function allocates a new HBufC8 buffer to hold the address, and passes ownership of the buffer to the client.

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


GetBearer(Wap::TBearer &)

virtual TInt GetBearer(Wap::TBearer &)=0;

Description

Gets the bearer on which a received datagram arrived.

Useful when EAll was specified in CWapBoundCLWSPService::Connect(Wap::TBearer,Wap::TPort,TBool)

Parameters

Wap::TBearer &

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.


GetServerAddress(HBufC8 *&)

virtual TInt GetServerAddress(HBufC8 *&aServerAddress)=0;

Description

Gets the remote server address.

Parameters

HBufC8 *&aServerAddress

On return, the address of the remote server. Clients must pass in a reference to a NULL HBufC8 pointer. The function allocates a new HBufC8 buffer to hold the address, and passes ownership of the buffer to the client.

Return value

TInt

KErrNone on successful completion, or one of the system error codes on failure.