CRemConInterfaceSelector Class Reference

class CRemConInterfaceSelector : public CBase

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

Inherits from

  • CRemConInterfaceSelector
Public Member Functions
~CRemConInterfaceSelector()
voidBulkError(TInt)
voidBulkReceiveComplete(TUid, TUint, const TDesC8 &)
voidBulkSessionConnectL()
IMPORT_C voidConnectBearer(TRequestStatus &)
IMPORT_C TIntConnectBearerCancel()
IMPORT_C TBoolControllerOpened()
IMPORT_C voidDisconnectBearer(TRequestStatus &)
IMPORT_C TIntDisconnectBearerCancel()
voidError(TInt)
IMPORT_C TIntGetConnections(TSglQue< TRemConAddress > &)
IMPORT_C voidGoConnectionOrientedL(const TRemConAddress &)
IMPORT_C voidGoConnectionlessL()
IMPORT_C CRemConInterfaceSelector *NewL()
IMPORT_C voidNotifyConnectionsChange(TRequestStatus &)
IMPORT_C TIntNotifyConnectionsChangeCancel()
IMPORT_C voidOpenControllerL()
IMPORT_C voidOpenTargetL()
IMPORT_C voidOpenTargetL(TPlayerType, TPlayerSubType, const TDesC8 &)
voidReceiveComplete(TUid, TUint, TRemConMessageSubType, const TRemConAddress &, const TDesC8 &, TRemConClientType)
IMPORT_C voidRegisterErrorObserver(MRemConErrorObserver *)
IMPORT_C voidRegisterInterfaceL(CRemConInterfaceBase &)
voidRegisterInterfaceL(CRemConInterfaceBase &, RRemConInterfaceFeatures &)
IMPORT_C voidSend(TRequestStatus &, TUid, TUint, TUint &, TRemConMessageType, const TDesC8 &)
IMPORT_C voidSend(TRequestStatus &, TUid, TUint, TUint &, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)
IMPORT_C voidSendBulk(TRequestStatus &, TUid, TUint, const TDesC8 &)
IMPORT_C TIntSendBulkCancel()
IMPORT_C TIntSendBulkUnreliable(TUid, TUint, const TDesC8 &)
IMPORT_C TIntSendCancel(TRemConMessageType)
IMPORT_C voidSendNotify(TRequestStatus &, TUid, TUint, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)
IMPORT_C TIntSendUnreliable(TUid, TUint, TRemConMessageType, const TDesC8 &)
IMPORT_C TIntSendUnreliable(TUid, TUint, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)
IMPORT_C TBoolTargetOpened()
Private Member Functions
CRemConInterfaceSelector()
voidAssertSession(RRemCon *, TInt)
voidBulkCleanup()
TBool BulkOpened()
voidConstructL()
voidEstablishBulkThreadBindingL()
voidOpenTargetCommonL()
voidRegisterInterestedApisL(TRemConClientType)
voidRegisterInterfaceCommonL(CRemConInterfaceBase &, const TDesC8 &)
TInt StaticBulkCleanup(TAny *)
TInt TryToReconnect()
TInt TryToReconnectBulk()
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()
Private Attributes
TRemConAddress iAddress
RSpecificThreadCallBack *iBulkCleanupCall
RHeap *iBulkHeap
TUint iBulkMaxDataLength
CBulkReceiver *iBulkReceiver
RRemConBulk *iBulkSession
RThread iBulkThread
TUint iControlMaxDataLength
CReceiver *iControllerReceiver
RRemConController *iControllerSession
MRemConErrorObserver *iErrorObserver
CRemConInterfaceDetailsArray *iInterfaces
RNestableLock *iLock
RRemCon *iNotificationSession
RHeap *iSharedThreadHeap
CReceiver *iTargetReceiver
RRemConTarget *iTargetSession

Constructor & Destructor Documentation

CRemConInterfaceSelector()

CRemConInterfaceSelector()[private]

~CRemConInterfaceSelector()

IMPORT_C~CRemConInterfaceSelector()

Destructor.

Member Functions Documentation

AssertSession(RRemCon *, TInt)

voidAssertSession(RRemCon *aSess,
TIntaPanicCode
)const [private]

Parameters

RRemCon * aSess
TInt aPanicCode

BulkCleanup()

voidBulkCleanup()[private]

BulkError(TInt)

voidBulkError(TIntaError)

Only called internally, by the Active Object which sucks messages out of RemCon Bulk Server. This is called in the case of a session error.

Parameters

TInt aError

BulkOpened()

TBool BulkOpened()const [private]

BulkReceiveComplete(TUid, TUint, const TDesC8 &)

voidBulkReceiveComplete(TUidaInterfaceUid,
TUintaOperationId,
const TDesC8 &aData
)

Only called internally, by the Active Object which sucks messages out of RemCon. Note that the message type is not given- it is interpolated from the type of the session doing the receiving.

Parameters

TUid aInterfaceUidInterface UID of the new message.
TUint aOperationIdOperation ID of the new message.
const TDesC8 & aDataData associated with the new message.

BulkSessionConnectL()

voidBulkSessionConnectL()

Only called internally, by the Active Object which sucks messages out of RemCon (bulk server).

ConnectBearer(TRequestStatus &)

IMPORT_C voidConnectBearer(TRequestStatus &aStatus)

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

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.

ConnectBearerCancel()

IMPORT_C TIntConnectBearerCancel()

Cancels interest in the completion of a ConnectBearer request. KErrNone.

ConstructL()

voidConstructL()[private]

ControllerOpened()

IMPORT_C TBoolControllerOpened()const

To determine if a controller session has been opened. EFalse if no session has been opened, ETrue otherwise.

DisconnectBearer(TRequestStatus &)

IMPORT_C voidDisconnectBearer(TRequestStatus &aStat)

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

Parameters

TRequestStatus & aStat

DisconnectBearerCancel()

IMPORT_C TIntDisconnectBearerCancel()

Cancels interest in the completion of a DisconnectBearer request. KErrNone.

Error(TInt)

voidError(TIntaError)

Only called internally, by the Active Object which sucks messages out of RemCon. This is called in the case of a session error.

Parameters

TInt aError

EstablishBulkThreadBindingL()

voidEstablishBulkThreadBindingL()[private]

GetConnections(TSglQue< TRemConAddress > &)

IMPORT_C TIntGetConnections(TSglQue< TRemConAddress > &aConnections)

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. Error.

Parameters

TSglQue< TRemConAddress > & aConnectionsA collection of remote addresses, representing all the currently extant connections.

GoConnectionOrientedL(const TRemConAddress &)

IMPORT_C voidGoConnectionOrientedL(const TRemConAddress &aConnection)

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

Parameters

const TRemConAddress & aConnectionThe remote to talk to.

GoConnectionlessL()

IMPORT_C voidGoConnectionlessL()

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

NewL()

IMPORT_C CRemConInterfaceSelector *NewL()[static]

Factory method. Ownership of a new CRemConInterfaceSelector.

NotifyConnectionsChange(TRequestStatus &)

IMPORT_C voidNotifyConnectionsChange(TRequestStatus &aStatus)

Notification for changes in the set of connections.

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.

NotifyConnectionsChangeCancel()

IMPORT_C TIntNotifyConnectionsChangeCancel()

Cancels interest in the completion of an outstanding NotifyConnectionsChange operation. KErrNone.

OpenControllerL()

IMPORT_C voidOpenControllerL()

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

KErrInUse If a controller session is already open.

OpenTargetCommonL()

voidOpenTargetCommonL()[private]

OpenTargetL()

IMPORT_C voidOpenTargetL()

Opens a target session to RemCon. leave

KErrInUse If a target session is already open.

OpenTargetL(TPlayerType, TPlayerSubType, const TDesC8 &)

IMPORT_C voidOpenTargetL(TPlayerTypeaPlayerType,
TPlayerSubTypeaPlayerSubType,
const TDesC8 &aPlayerName
)

Opens a target session to RemCon. leave

KErrInUse If a target session is already open.

Parameters

TPlayerType aPlayerTypeThe type of player
TPlayerSubType aPlayerSubTypeThe sub-type of the player
const TDesC8 & aPlayerNameThe name of the player in UTF-8.

ReceiveComplete(TUid, TUint, TRemConMessageSubType, const TRemConAddress &, const TDesC8 &, TRemConClientType)

voidReceiveComplete(TUidaInterfaceUid,
TUintaOperationId,
TRemConMessageSubTypeaMsgSubType,
const TRemConAddress &aRemoteAddress,
const TDesC8 &aData,
TRemConClientTypeaType
)

Only called internally, by the Active Object which sucks messages out of RemCon. Note that the message type is not given- it is interpolated from the type of the session doing the receiving.

Parameters

TUid aInterfaceUidInterface UID of the new message.
TUint aOperationIdOperation ID of the new message.
TRemConMessageSubType aMsgSubTypeThe message subtype.
const TRemConAddress & aRemoteAddressThe address of the remote which sent the message.
const TDesC8 & aDataData associated with the new message.
TRemConClientType aTypeThe type of session which received the message (from which the type of the message can be interpolated).

RegisterErrorObserver(MRemConErrorObserver *)

IMPORT_C voidRegisterErrorObserver(MRemConErrorObserver *aObserver)

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

Parameters

MRemConErrorObserver * aObserverAn error observer to be notified on a passive error. NULL to stop receiving notifications.

RegisterInterestedApisL(TRemConClientType)

voidRegisterInterestedApisL(TRemConClientTypeaType)[private]

Parameters

TRemConClientType aType

RegisterInterfaceCommonL(CRemConInterfaceBase &, const TDesC8 &)

voidRegisterInterfaceCommonL(CRemConInterfaceBase &aInterface,
const TDesC8 &aFeatures
)[private]

Parameters

CRemConInterfaceBase & aInterface
const TDesC8 & aFeatures

RegisterInterfaceL(CRemConInterfaceBase &)

IMPORT_C voidRegisterInterfaceL(CRemConInterfaceBase &aInterface)

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 & aInterfaceThe interface.

RegisterInterfaceL(CRemConInterfaceBase &, RRemConInterfaceFeatures &)

voidRegisterInterfaceL(CRemConInterfaceBase &aInterface,
RRemConInterfaceFeatures &aRemConInterfaceFeatures
)

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 & aInterfaceThe interface.
RRemConInterfaceFeatures & aRemConInterfaceFeaturesThe operation IDs of the interface. Ownership is retained by the caller. Any necessary data will be copied by the interface selector.

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

IMPORT_C voidSend(TRequestStatus &aStatus,
TUidaInterfaceUid,
TUintaOperationId,
TUint &aNumRemotes,
TRemConMessageTypeaMsgType,
const TDesC8 &aData =  KNullDesC8()
)

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. panic

RemConClient 4 If a send is already outstanding

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.
TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
TUint & aNumRemotesOn success, the number of remotes the message was successfully sent to.
TRemConMessageType aMsgTypeWhether the message is a command or a response.
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

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

IMPORT_C voidSend(TRequestStatus &aStatus,
TUidaInterfaceUid,
TUintaOperationId,
TUint &aNumRemotes,
TRemConMessageTypeaMsgType,
TRemConMessageSubTypeaMsgSubType,
const TDesC8 &aData =  KNullDesC8()
)

Sends a message to the remote device(s).

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.
TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
TUint & aNumRemotesOn success, the number of remotes the message was successfully sent to.
TRemConMessageType aMsgTypeWhether the message is a command or a response.
TRemConMessageSubType aMsgSubTypeThe subtype of the command of response
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

SendBulk(TRequestStatus &, TUid, TUint, const TDesC8 &)

IMPORT_C voidSendBulk(TRequestStatus &aStatus,
TUidaInterfaceUid,
TUintaOperationId,
const TDesC8 &aData =  KNullDesC8()
)

This method is for internal sub-system use only and should be not be used otherwise. Sends a message to the remote device(s) through the bulk path. There should be only one response outstanding at any one time. Send cannot be called again until aStatus is completed. panic

RemConClient 4 If a send is already outstanding

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.
TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

SendBulkCancel()

IMPORT_C TIntSendBulkCancel()

This method is for internal sub-system use only and should be not be used otherwise. Cancels interest in the completion of a BulkSend request. KErrNone.

SendBulkUnreliable(TUid, TUint, const TDesC8 &)

IMPORT_C TIntSendBulkUnreliable(TUidaInterfaceUid,
TUintaOperationId,
const TDesC8 &aData =  KNullDesC8()
)

This method is for internal sub-system use only and should be not be used otherwise. Sends a message to the remote device(s) through the bulk path, without waiting for the send to complete.

Parameters

TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

SendCancel(TRemConMessageType)

IMPORT_C TIntSendCancel(TRemConMessageTypeaMsgType)

Cancels interest in the completion of a Send request. KErrNone.

Parameters

TRemConMessageType aMsgTypeThe 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.

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

IMPORT_C voidSendNotify(TRequestStatus &aStatus,
TUidaInterfaceUid,
TUintaOperationId,
TRemConMessageTypeaMsgType,
TRemConMessageSubTypeaMsgSubType,
const TDesC8 &aData =  KNullDesC8()
)

Sends a

Parameters

TRequestStatus & aStatus
TUid aInterfaceUid
TUint aOperationId
TRemConMessageType aMsgType
TRemConMessageSubType aMsgSubType
const TDesC8 & aData =  KNullDesC8()

SendUnreliable(TUid, TUint, TRemConMessageType, const TDesC8 &)

IMPORT_C TIntSendUnreliable(TUidaInterfaceUid,
TUintaOperationId,
TRemConMessageTypeaMsgType,
const TDesC8 &aData =  KNullDesC8()
)

This method is for internal sub-system use only and should be not be used otherwise. Sends a message to the remote device(s), without waiting for the send to complete

Parameters

TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
TRemConMessageType aMsgTypeWhether the message is a command or a response.
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

SendUnreliable(TUid, TUint, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)

IMPORT_C TIntSendUnreliable(TUidaInterfaceUid,
TUintaOperationId,
TRemConMessageTypeaMsgType,
TRemConMessageSubTypeaMsgSubType,
const TDesC8 &aData =  KNullDesC8()
)

This method is for internal sub-system use only and should be not be used otherwise. Sends a message to the remote device(s), without waiting for the send to complete

Parameters

TUid aInterfaceUidThe UID of the concrete (outer-layer) interface sending the message.
TUint aOperationIdThe interface-specific operation identifier.
TRemConMessageType aMsgTypeWhether the message is a command or a response.
TRemConMessageSubType aMsgSubTypeThe subtype of the command of response
const TDesC8 & aData =  KNullDesC8()Any associated message data in interface-specific format.

StaticBulkCleanup(TAny *)

TInt StaticBulkCleanup(TAny *aSelf)[private, static]

Parameters

TAny * aSelf

TargetOpened()

IMPORT_C TBoolTargetOpened()const

To determine if a target session has been opened. EFalse if no session has been opened, ETrue otherwise.

TryToReconnect()

TInt TryToReconnect()[private]

TryToReconnectBulk()

TInt TryToReconnectBulk()[private]

Member Data Documentation

TRemConAddress iAddress

TRemConAddress iAddress[private]

RSpecificThreadCallBack * iBulkCleanupCall

RSpecificThreadCallBack *iBulkCleanupCall[private]

RHeap * iBulkHeap

RHeap *iBulkHeap[private]

TUint iBulkMaxDataLength

TUint iBulkMaxDataLength[private]

CBulkReceiver * iBulkReceiver

CBulkReceiver *iBulkReceiver[private]

RRemConBulk * iBulkSession

RRemConBulk *iBulkSession[private]

RThread iBulkThread

RThread iBulkThread[private]

TUint iControlMaxDataLength

TUint iControlMaxDataLength[private]

For all registered interfaces, this is the size of the biggest operation-associated data lump.

CReceiver * iControllerReceiver

CReceiver *iControllerReceiver[private]

RRemConController * iControllerSession

RRemConController *iControllerSession[private]

MRemConErrorObserver * iErrorObserver

MRemConErrorObserver *iErrorObserver[private]

CRemConInterfaceDetailsArray * iInterfaces

CRemConInterfaceDetailsArray *iInterfaces[private]

RNestableLock * iLock

RNestableLock *iLock[private]

RRemCon * iNotificationSession

RRemCon *iNotificationSession[private]

RHeap * iSharedThreadHeap

RHeap *iSharedThreadHeap[private]

CReceiver * iTargetReceiver

CReceiver *iTargetReceiver[private]

RRemConTarget * iTargetSession

RRemConTarget *iTargetSession[private]