Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <remconinterfaceselector.h>
Link against: remconinterfacebase.lib

Class CRemConInterfaceSelector

class CRemConInterfaceSelector : public CBase;

Description

CRemConInterfaceSelector is only instantiable via its NewL function. It is not derivable.

Derivation

Members

Defined in CRemConInterfaceSelector:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CRemConInterfaceSelector* NewL();

Description

Factory method.

Return value

CRemConInterfaceSelector *

Ownership of a new CRemConInterfaceSelector.


~CRemConInterfaceSelector()

IMPORT_C ~CRemConInterfaceSelector();

Description

Destructor.

[Top]


Member functions


RegisterInterfaceL(CRemConInterfaceBase &)

IMPORT_C void RegisterInterfaceL(CRemConInterfaceBase &aInterface);

Description

Register the interface with the selector. This is called by the interface's BaseConstructL. Takes ownership of aInterface. This function is not to be called outside of remconinterfacebase.dll. It is available for compatibility with previous versions, but it is intended to be called only by CRemConInterfaceBase::BaseConstructL(). CRemConInterfaceBase-derived classes should indirectly perform a RegisterInterfaceL, by calling CRemConInterfaceBase::BaseConstructL() from their construction functions.

Parameters

CRemConInterfaceBase &aInterface

The interface.


RegisterErrorObserver(MRemConErrorObserver *)

IMPORT_C void RegisterErrorObserver(MRemConErrorObserver *aObserver);

Description

Register an error observer. This is provided to allow the client to discover when an error has occurred passively.

Parameters

MRemConErrorObserver *aObserver

An error observer to be notified on a passive error. NULL to stop receiving notifications.


OpenControllerL()

IMPORT_C void OpenControllerL();

Description

Opens a controller session to RemCon. The session is connectionless until such time as GoConnectionOriented may be called.

Leave codes

KErrInUse

If a controller session is already open.


GoConnectionOrientedL(const TRemConAddress &)

IMPORT_C void GoConnectionOrientedL(const TRemConAddress &aConnection);

Description

Makes the controller session (which must already exist- use OpenControllerL) connection-oriented.

Parameters

const TRemConAddress &aConnection

The remote to talk to.


GoConnectionlessL()

IMPORT_C void GoConnectionlessL();

Description

Makes the controller session (which must already exist- use OpenControllerL) connectionless.


ConnectBearer(TRequestStatus &)

IMPORT_C void ConnectBearer(TRequestStatus &aStatus);

Description

Brings up a bearer-level connection. The controller session must already exist (use OpenControllerL) and be connection-oriented.

Parameters

TRequestStatus &aStatus

TRequestStatus for asynchronous completion.


ConnectBearerCancel()

IMPORT_C TInt ConnectBearerCancel();

Description

Cancels interest in the completion of a ConnectBearer request.

Return value

TInt

KErrNone.


DisconnectBearer(TRequestStatus &)

IMPORT_C void DisconnectBearer(TRequestStatus &aStat);

Description

Destroys a bearer-level connection. The controller session must already exist (use OpenControllerL) and be connection-oriented.

Parameters

TRequestStatus &aStat


DisconnectBearerCancel()

IMPORT_C TInt DisconnectBearerCancel();

Description

Cancels interest in the completion of a DisconnectBearer request.

Return value

TInt

KErrNone.


OpenTargetL()

IMPORT_C void OpenTargetL();

Description

Opens a target session to RemCon.

Leave codes

KErrInUse

If a target session is already open.


Send(TRequestStatus &,TUid,TUint,TUint &,TRemConMessageType,const TDesC8 &)

IMPORT_C void Send(TRequestStatus &aStatus, TUid aInterfaceUid, TUint aOperationId, TUint &aNumRemotes, TRemConMessageType aMsgType, const TDesC8 &aData=KNullDesC8());

Description

Sends a message to the remote device(s). There should be only one command and response outstanding at any one time. Send cannot be called again until aStatus is completed.

Parameters

TRequestStatus &aStatus

TRequestStatus for asynchronous completion.

TUid aInterfaceUid

The UID of the concrete (outer-layer) interface sending the message.

TUint aOperationId

The interface-specific operation identifier.

TUint &aNumRemotes

On success, the number of remotes the message was successfully sent to.

TRemConMessageType aMsgType

Whether the message is a command or a response.

const TDesC8 &aData

Any associated message data in interface-specific format.

Panic codes

RemConClient

4 If a send is already outstanding


Send(TRequestStatus &,TUid,TUint,TUint &,TRemConMessageType,TRemConMessageSubType,const TDesC8 &)

IMPORT_C void Send(TRequestStatus &aStatus, TUid aInterfaceUid, TUint aOperationId, TUint &aNumRemotes, TRemConMessageType aMsgType, TRemConMessageSubType aMsgSubType, const TDesC8 &aData=KNullDesC8());

Description

Sends a message to the remote device(s).

Parameters

TRequestStatus &aStatus

TRequestStatus for asynchronous completion.

TUid aInterfaceUid

The UID of the concrete (outer-layer) interface sending the message.

TUint aOperationId

The interface-specific operation identifier.

TUint &aNumRemotes

On success, the number of remotes the message was successfully sent to.

TRemConMessageType aMsgType

Whether the message is a command or a response.

TRemConMessageSubType aMsgSubType

The subtype of the command of response

const TDesC8 &aData

Any associated message data in interface-specific format.


SendCancel(TRemConMessageType)

IMPORT_C TInt SendCancel(TRemConMessageType aMsgType);

Description

Cancels interest in the completion of a Send request.

Parameters

TRemConMessageType aMsgType

The type of the message, the completion of the send of which we are not interested in. This is needed because a single CRemConInterfaceSelector may have two sends outstanding at once, one on a controller session and another on a target session.

Return value

TInt

KErrNone.


GetConnections(TSglQue< TRemConAddress > &)

IMPORT_C TInt GetConnections(TSglQue< TRemConAddress > &aConnections);

Description

Getter for the current set of connections in the system (not just those associated with this session). The client is responsible for cleaning up aConnections- the addresses will be on the heap.

Parameters

TSglQue< TRemConAddress > &aConnections

A collection of remote addresses, representing all the currently extant connections.

Return value

TInt

Error.


NotifyConnectionsChange(TRequestStatus &)

IMPORT_C void NotifyConnectionsChange(TRequestStatus &aStatus);

Description

Notification for changes in the set of connections.

Parameters

TRequestStatus &aStatus

TRequestStatus for asynchronous completion.


NotifyConnectionsChangeCancel()

IMPORT_C TInt NotifyConnectionsChangeCancel();

Description

Cancels interest in the completion of an outstanding NotifyConnectionsChange operation.

Return value

TInt

KErrNone.


TargetOpened()const

IMPORT_C TBool TargetOpened() const;

Description

To determine if a target session has been opened.

Return value

TBool

EFalse if no session has been opened, ETrue otherwise.


ControllerOpened()const

IMPORT_C TBool ControllerOpened() const;

Description

To determine if a controller session has been opened.

Return value

TBool

EFalse if no session has been opened, ETrue otherwise.