CObexConnector Class Reference

class CObexConnector : public CBase

Base type for OBEX connectors To make an OBEX protocol connector: Derive from this class and override the pure virtual functions with the relevent implementation

Inherits from

Constructor & Destructor Documentation

CObexConnector(MObexTransportNotify &)

IMPORT_C CObexConnector ( MObexTransportNotify & aObserver )

Constructor.

Parameters

MObexTransportNotify & aObserver The MObexTransportNotify object to notify of transport-related events. This object will typically be the concrete CObexTransportControllerBase.

~CObexConnector()

IMPORT_C ~CObexConnector ( )

Destructor. Currently does no work (NB BaseConstructL currently does no work either). If BaseConstructL ever allocates memory into iFuture1, we'll need to free it here. But by then licensee connectors' vtables will already have been built, *pointing at CBase's destructor*. We need this destructor here so that iFuture1, if it's ever allocated, will be freed correctly.

Member Functions Documentation

AcceptL()

void AcceptL ( ) [pure virtual]

This function is called as a result of an Obex server accept being issued. This function will start a transport object listening for a connect from the transport layer of an Obex client, if the transport layer has not already been established.

In both cases, if successful, the connector will notify its owner that the transport is up. Otherwise the connector may 'error' the owner or leave as appropriate. MObexTransportNotify::TransportUp() MObexTransportNotify::Error()

BaseConstructL()

IMPORT_C void BaseConstructL ( ) [protected]

This function is a placeholder for future use. If iFuture1 variable is used it will need this function for any allocation required.

To prevent binary compatibility breaks if the iFuture1 variable is used, this function must be called from the NewL of derived classes.

BringTransportDown()

TBool BringTransportDown ( ) [pure virtual]

This function takes down the transport link. If there are reasons why the transport link cannot be taken down, then the function should return EFalse.

CancelAccept()

void CancelAccept ( ) [pure virtual]

This function cancels actions taken as a result of the AcceptL() request

AcceptL()

CancelConnect()

void CancelConnect ( ) [pure virtual]

This function cancels actions taken as a result of the ConnectL() request ConnectL()

ConnectL()

void ConnectL ( ) [pure virtual]

This function is called as a result of an Obex client connect being issued. This function may either 1. attempt to make a transport level connection with the transport level of an Obex server. For example, in the case of socket based transports, a socket is opened and a socket connect is issued. 2. check that a transport link exists. For example in the case of the usb standard transport the connection may already be there In both cases, if successful, the connector will notify its owner that the transport is up. Otherwise the connector may 'error' the owner or leave as appropriate.

MObexTransportNotify::TransportUp() MObexTransportNotify::Error()

GetInterface(TUid)

IMPORT_C TAny * GetInterface ( TUid aUid ) [protected, virtual]

This function is part of the extension pattern and must be implemented by all derived instantiable classes. By default this returns null. Any derived class that is required to extend its interface and that of this base class returns its new interface in the form of an M class, that it extends, if and only if the corresponding TUid , aUid, is received. Otherwise the function calls the base class implementation, returning NULL.

Parameters

TUid aUid The uid associated with the M Class that is being implemented

Observer()

IMPORT_C MObexTransportNotify & Observer ( ) [protected]

Accessor for the observer (an MObexTransportNotify ).

SignalTransportError()

void SignalTransportError ( ) [pure virtual]

This function is a notification from the obex protocol layer that a transport error has occured. Set any transport specific error condition flags in this function.

Member Data Documentation

TAny * iFuture1

TAny * iFuture1 [private]

MObexTransportNotify & iObserver

MObexTransportNotify & iObserver [private]