CWapBoundCLPushService Class Reference

#include <wapmessage.h>

Link against: wapmsgcli.lib

class CWapBoundCLPushService : public CBase

Inherits from

  • CWapBoundCLPushService
Public Member Functions
virtual ~CWapBoundCLPushService()
pure virtual TInt AwaitPush(TDes8 &, TDes8 &, TPckgBuf< TUint8 > &, TRequestStatus &)
pure virtual voidCancelAwaitPush()
pure virtual TInt Connect(Wap::TBearer, Wap::TPort, TBool, TInetAddr)
pure virtual TInt Connect(Wap::TBearer, Wap::TPort, TBool)
pure virtual TInt GetBearer(Wap::TBearer &)
pure virtual TInt GetLocalAddress(HBufC8 *&)
pure virtual TInt GetLocalPort(Wap::TPort &)
pure virtual TInt GetServerAddress(HBufC8 *&)
IMPORT_C CWapBoundCLPushService *NewL()
IMPORT_C CWapBoundCLPushService *NewL(const TUid &)
Protected Member Functions
CWapBoundCLPushService()
IMPORT_C voidConstructL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Detailed Description

Bound Connectionless Push Listens for WAP Push messages from any sender.

The class is an ECom plug-in interface. Clients use NewL() to request an implementation of the interface, and then call the interface's virtual functions to access the implementation's services.

The use of the plug-in architecture allows different implementations to use different underlying WAP stacks.

Functions can return system wide error codes, and also API-specific errors as defined in wapmsgerr.h.

Constructor & Destructor Documentation

CWapBoundCLPushService ( )

IMPORT_CCWapBoundCLPushService()[protected]

~CWapBoundCLPushService ( )

IMPORT_C~CWapBoundCLPushService()[virtual]

Destructor

Member Function Documentation

AwaitPush ( TDes8 &, TDes8 &, TPckgBuf< TUint8 > &, TRequestStatus & )

TInt AwaitPush(TDes8 &aPushHeaders,
TDes8 &aPushBody,
TPckgBuf< TUint8 > &aPushIdPckg,
TRequestStatus &aReqStatus
)[pure virtual]

Requests an asynchronous notification upon arrival of the next push message on the listening connection.

The request completes upon receipt of the message, filling the buffers with as much received data as possible. A return code indicates whether further data remains. The call must be re-issued for subsequent messages or to receive remaining data from a previous push message.

Parameters
aPushHeadersA client-allocated buffer that, on completion, is filled with the push message's header data
aPushBodyA client-allocated buffer that, on completion, is filled with the push message's body data
aPushIdPckgOn completion, an integer ID that uniquely specifies the push message
aReqStatusAsynchonrous status word, used by the service provider to notify the client when a push message has arrived. EMoreData is returned if more pushed data is available.
Return Value
KErrNone on successful completion, or one of the system error codes on failure.

CancelAwaitPush ( )

voidCancelAwaitPush()[pure virtual]

Cancels a previous push message request.

If a push message arrives, the client will not be notified.

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

TInt Connect(Wap::TBeareraBearer,
Wap::TPortaPort,
TBoolaSecure,
TInetAddraInetAddr
)[pure virtual]

Connects to the WAP stack, opening an endpoint that can be used to listen for Push messages from any sender.

This overload of Connect() allows an IP address associated with a network interface to be specified. In multihomed systems, this can be used to specify the network interface to which the endpoint should be bound.

All CWapBoundCLPushService implementations must automatically close this endpoint upon destruction.

Parameters
aBearerThe bearer to listen on. Use EAll to specify all bearers.
aPortThe port to listen on. If set to 0, a local port will be chosen for the client's first SendTo()
aSecureSecurity flag to indicate whether WTLS should be used or not
aInetAddrThe address of the adapter to use
Return Value
KErrNone on successful completion, or one of the system error codes on failure.

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

TInt Connect(Wap::TBeareraBearer,
Wap::TPortaPort,
TBoolaSecure
)[pure virtual]

Connects to the WAP stack, opening an endpoint that can be used to listen for Push messages from any sender.

All CWapBoundCLPushService implementations must automatically close this endpoint upon destruction.

Parameters
aBearerThe bearer to listen on. Use EAll to specify all bearers.
aPortThe port to listen on. If set to 0, a local port will be chosen for the client's first SendTo()
aSecureSecurity flag to indicate whether WTLS should be used or not
Return Value
KErrNone on successful completion, or one of the system error codes on failure.

ConstructL ( )

IMPORT_C voidConstructL()[protected]

GetBearer ( Wap::TBearer & )

TInt GetBearer(Wap::TBearer &aBearer)[pure virtual]

Gets the bearer on which a received datagram arrived.

This is useful when EAll was specified as the bearer in Connect().

Parameters
aBearerOn return, the bearer
Return Value
KErrNone on successful completion, or one of the system error codes on failure.

GetLocalAddress ( HBufC8 *& )

TInt GetLocalAddress(HBufC8 *&aLocalHost)[pure virtual]

Gets the local address of this endpoint.

Parameters
aLocalHostOn 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
KErrNone on successful completion, or one of the system error codes on failure.

GetLocalPort ( Wap::TPort & )

TInt GetLocalPort(Wap::TPort &aPort)[pure virtual]

Gets the local port of this endpoint.

This is useful if the port was chosen automatically.

Parameters
aPortOn return, the port number
Return Value
KErrNone on successful completion, or one of the system error codes on failure.

GetServerAddress ( HBufC8 *& )

TInt GetServerAddress(HBufC8 *&aRemoteHost)[pure virtual]

Gets the address of the remote server.

This function cannot be called when there is an outstanding AwaitPush().

Parameters
aRemoteHostOn return, the address of the remote 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
KErrNone on successful completion, KErrNotSupported if not implemented, or one of the system error codes on failure.

NewL ( )

IMPORT_C CWapBoundCLPushService *NewL()[static]

Bound Connection-less Push Allocates and creates a new CWapBoundCLPushService object.

Return Value
A new CWapBoundCLPushService object.
Leave Codes
Systemwide error codes.

NewL ( const TUid & )

IMPORT_C CWapBoundCLPushService *NewL(const TUid &aImplementation)[static]

Allocates and creates a new CWapBoundCLPushService object.

Return Value
A new CWapBoundCLPushService object.
Leave Codes
Systemwide error codes.