MRemConBearerObserver Class Reference

class MRemConBearerObserver

Interface presented by RemCon down to bearers. The public methods are non-virtual and exported, so that they can be added to without breaking BC for existing (non-rebuilt) bearers.

Public Member Functions
IMPORT_C TIntBearerToInterface(TUid, const TDesC8 &, const TDesC8 &, TUid &, TUint &, TRemConMessageType &, TDes8 &)
IMPORT_C voidCommandExpired(TUint)
IMPORT_C TIntConnectConfirm(const TRemConAddress &, TInt)
IMPORT_C TIntConnectIndicate(const TRemConAddress &)
IMPORT_C voidDisconnectConfirm(const TRemConAddress &, TInt)
IMPORT_C voidDisconnectIndicate(const TRemConAddress &)
IMPORT_C TIntInterfaceToBearer(TUid, TUid, TUint, const TDesC8 &, TRemConMessageType, TDes8 &)
IMPORT_C TIntNewCommand(const TRemConAddress &)
IMPORT_C TIntNewCommand(const TRemConAddress &, const TRemConClientId &)
IMPORT_C TIntNewNotifyCommand(const TRemConAddress &)
IMPORT_C TIntNewNotifyCommand(const TRemConAddress &, const TRemConClientId &)
IMPORT_C TIntNewNotifyResponse(const TRemConAddress &)
IMPORT_C TIntNewResponse(const TRemConAddress &)
IMPORT_C TUintNewTransactionId()
IMPORT_C TIntRegisterLocalAddressedClientObserver(const TUid &)
IMPORT_C voidSetRemoteAddressedClient(const TUid &, const TRemConClientId &)
IMPORT_C TIntSupportedInterfaces(const TRemConClientId &, RArray< TUid > &)
IMPORT_C TIntSupportedOperations(const TRemConClientId &, TUid, RArray< TUint > &)
IMPORT_C TIntUnregisterLocalAddressedClientObserver(const TUid &)
Private Member Functions
TInt MrcboDoBearerToInterface(TUid, const TDesC8 &, const TDesC8 &, TUid &, TUint &, TRemConMessageType &, TDes8 &)
voidMrcboDoCommandExpired(TUint)
TInt MrcboDoConnectConfirm(const TRemConAddress &, TInt)
TInt MrcboDoConnectIndicate(const TRemConAddress &)
voidMrcboDoDisconnectConfirm(const TRemConAddress &, TInt)
voidMrcboDoDisconnectIndicate(const TRemConAddress &)
TInt MrcboDoInterfaceToBearer(TUid, TUid, TUint, const TDesC8 &, TRemConMessageType, TDes8 &)
TInt MrcboDoNewCommand(const TRemConAddress &)
TInt MrcboDoNewCommand(const TRemConAddress &, const TRemConClientId &)
TInt MrcboDoNewNotifyCommand(const TRemConAddress &)
TInt MrcboDoNewNotifyCommand(const TRemConAddress &, const TRemConClientId &)
TInt MrcboDoNewNotifyResponse(const TRemConAddress &)
TInt MrcboDoNewResponse(const TRemConAddress &)
TUint MrcboDoNewTransactionId()
TInt MrcboDoRegisterLocalAddressedClientObserver(const TUid &)
voidMrcboDoSetRemoteAddressedClient(const TUid &, const TRemConClientId &)
TInt MrcboDoSupportedInterfaces(const TRemConClientId &, RArray< TUid > &)
TInt MrcboDoSupportedOperations(const TRemConClientId &, TUid, RArray< TUint > &)
TInt MrcboDoUnregisterLocalAddressedClientObserver(const TUid &)

Member Functions Documentation

BearerToInterface(TUid, const TDesC8 &, const TDesC8 &, TUid &, TUint &, TRemConMessageType &, TDes8 &)

IMPORT_C TIntBearerToInterface(TUidaBearerUid,
const TDesC8 &aInterfaceData,
const TDesC8 &aBearerData,
TUid &aInterfaceUid,
TUint &aOperationId,
TRemConMessageType &aMsgType,
TDes8 &aData
)const

Called by a bearer to convert a message from the bearer's format to that of an outer-layer API. The bearer observer finds a converter to perform this.

Parameters

TUid aBearerUidThe UID of the bearer.
const TDesC8 & aInterfaceDataData identifying the interface in bearer-specific format.
const TDesC8 & aBearerDataThe message encoded in the bearer's format.
TUid & aInterfaceUidOn success, the UID of the outer layer API to which the message belongs.
TUint & aOperationIdOn success, the operation ID of the message.
TRemConMessageType & aMsgTypeOn success, the type of the message.
TDes8 & aDataOn success, the operation-specific data of the message.

CommandExpired(TUint)

IMPORT_C voidCommandExpired(TUintaTransactionId)

Called by a bearer when a command is no longer valid and should be removed from RemCon's queues

Parameters

TUint aTransactionIdThe transaction ID of the expired command

ConnectConfirm(const TRemConAddress &, TInt)

IMPORT_C TIntConnectConfirm(const TRemConAddress &aAddr,
TIntaError
)

Called by a bearer to indicate completion of an outgoing connection request (CRemConBearerPlugin::ConnectRequest).

Parameters

const TRemConAddress & aAddrThe address of the connection in question.
TInt aErrorThe success status of the connection establishment. If KErrNone, the connection was established. If non-KErrNone, the connection was not established.

ConnectIndicate(const TRemConAddress &)

IMPORT_C TIntConnectIndicate(const TRemConAddress &aAddr)

Called by a bearer when an incoming connection has been established.

Parameters

const TRemConAddress & aAddrThe address of the connection.

DisconnectConfirm(const TRemConAddress &, TInt)

IMPORT_C voidDisconnectConfirm(const TRemConAddress &aAddr,
TIntaError
)

Called by a bearer to indicate completion of a disconnection request (CRemConBearerPlugin::Disconnect).

Parameters

const TRemConAddress & aAddrThe address of the connection in question.
TInt aErrorThe success status of the disconnection. If KErrNone, the disconnection occurred. If non-KErrNone, the connection still exists.

DisconnectIndicate(const TRemConAddress &)

IMPORT_C voidDisconnectIndicate(const TRemConAddress &aAddr)

Called by a bearer when a connection has been disconnected from the remote end. The bearer should only call this function if either (a) ConnectIndicate has already been called for the connection aAddr (and KErrNone returned by RemCon), or (b) ConnectConfirm has been called with KErrNone for the connection aAddr (and KErrNone has been returned by RemCon).

Parameters

const TRemConAddress & aAddrThe RemCon address of the connection.

InterfaceToBearer(TUid, TUid, TUint, const TDesC8 &, TRemConMessageType, TDes8 &)

IMPORT_C TIntInterfaceToBearer(TUidaBearerUid,
TUidaInterfaceUid,
TUintaOperationId,
const TDesC8 &aData,
TRemConMessageTypeaMsgType,
TDes8 &aBearerData
)const

Called by a bearer to convert a message from an outer-layer API format to the bearer's format. The bearer observer finds a converter to perform this.

Parameters

TUid aBearerUidThe UID of the bearer.
TUid aInterfaceUidThe UID of the outer layer API to which the message belongs.
TUint aOperationIdThe operation ID of the message.
const TDesC8 & aDataThe operation-specific data of the message.
TRemConMessageType aMsgTypeThe type of the message.
TDes8 & aBearerDataOn success, the message encoded in the bearer's format.

MrcboDoBearerToInterface(TUid, const TDesC8 &, const TDesC8 &, TUid &, TUint &, TRemConMessageType &, TDes8 &)

TInt MrcboDoBearerToInterface(TUidaBearerUid,
const TDesC8 &aInterfaceData,
const TDesC8 &aBearerData,
TUid &aInterfaceUid,
TUint &aOperationId,
TRemConMessageType &aMsgType,
TDes8 &aData
)const [private, pure virtual]

Parameters

TUid aBearerUid
const TDesC8 & aInterfaceData
const TDesC8 & aBearerData
TUid & aInterfaceUid
TUint & aOperationId
TRemConMessageType & aMsgType
TDes8 & aData

MrcboDoCommandExpired(TUint)

voidMrcboDoCommandExpired(TUintaTransactionId)[private, pure virtual]

Parameters

TUint aTransactionId

MrcboDoConnectConfirm(const TRemConAddress &, TInt)

TInt MrcboDoConnectConfirm(const TRemConAddress &aAddr,
TIntaError
)[private, pure virtual]

Parameters

const TRemConAddress & aAddr
TInt aError

MrcboDoConnectIndicate(const TRemConAddress &)

TInt MrcboDoConnectIndicate(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoDisconnectConfirm(const TRemConAddress &, TInt)

voidMrcboDoDisconnectConfirm(const TRemConAddress &aAddr,
TIntaError
)[private, pure virtual]

Parameters

const TRemConAddress & aAddr
TInt aError

MrcboDoDisconnectIndicate(const TRemConAddress &)

voidMrcboDoDisconnectIndicate(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoInterfaceToBearer(TUid, TUid, TUint, const TDesC8 &, TRemConMessageType, TDes8 &)

TInt MrcboDoInterfaceToBearer(TUidaBearerUid,
TUidaInterfaceUid,
TUintaOperationId,
const TDesC8 &aData,
TRemConMessageTypeaMsgType,
TDes8 &aBearerData
)const [private, pure virtual]

Parameters

TUid aBearerUid
TUid aInterfaceUid
TUint aOperationId
const TDesC8 & aData
TRemConMessageType aMsgType
TDes8 & aBearerData

MrcboDoNewCommand(const TRemConAddress &)

TInt MrcboDoNewCommand(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoNewCommand(const TRemConAddress &, const TRemConClientId &)

TInt MrcboDoNewCommand(const TRemConAddress &aAddr,
const TRemConClientId &aClient
)[private, pure virtual]

Parameters

const TRemConAddress & aAddr
const TRemConClientId & aClient

MrcboDoNewNotifyCommand(const TRemConAddress &)

TInt MrcboDoNewNotifyCommand(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoNewNotifyCommand(const TRemConAddress &, const TRemConClientId &)

TInt MrcboDoNewNotifyCommand(const TRemConAddress &aAddr,
const TRemConClientId &aClient
)[private, pure virtual]

Parameters

const TRemConAddress & aAddr
const TRemConClientId & aClient

MrcboDoNewNotifyResponse(const TRemConAddress &)

TInt MrcboDoNewNotifyResponse(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoNewResponse(const TRemConAddress &)

TInt MrcboDoNewResponse(const TRemConAddress &aAddr)[private, pure virtual]

Parameters

const TRemConAddress & aAddr

MrcboDoNewTransactionId()

TUint MrcboDoNewTransactionId()[private, pure virtual]

TransactionId.

MrcboDoRegisterLocalAddressedClientObserver(const TUid &)

TInt MrcboDoRegisterLocalAddressedClientObserver(const TUid &aBearerUid)[private, pure virtual]

Parameters

const TUid & aBearerUid

MrcboDoSetRemoteAddressedClient(const TUid &, const TRemConClientId &)

voidMrcboDoSetRemoteAddressedClient(const TUid &aBearerUid,
const TRemConClientId &aId
)[private, pure virtual]

Parameters

const TUid & aBearerUid
const TRemConClientId & aId

MrcboDoSupportedInterfaces(const TRemConClientId &, RArray< TUid > &)

TInt MrcboDoSupportedInterfaces(const TRemConClientId &aId,
RArray< TUid > &aUids
)[private, pure virtual]

Parameters

const TRemConClientId & aId
RArray< TUid > & aUids

MrcboDoSupportedOperations(const TRemConClientId &, TUid, RArray< TUint > &)

TInt MrcboDoSupportedOperations(const TRemConClientId &aId,
TUidaInterfaceUid,
RArray< TUint > &aOperations
)[private, pure virtual]

Parameters

const TRemConClientId & aId
TUid aInterfaceUid
RArray< TUint > & aOperations

MrcboDoUnregisterLocalAddressedClientObserver(const TUid &)

TInt MrcboDoUnregisterLocalAddressedClientObserver(const TUid &aBearerUid)[private, pure virtual]

Parameters

const TUid & aBearerUid

NewCommand(const TRemConAddress &)

IMPORT_C TIntNewCommand(const TRemConAddress &aAddr)

Called when an incoming command from a remote is ready to be picked up by RemCon.

Parameters

const TRemConAddress & aAddrThe address the command came from.

NewCommand(const TRemConAddress &, const TRemConClientId &)

IMPORT_C TIntNewCommand(const TRemConAddress &aAddr,
const TRemConClientId &aClient
)

Called when an incoming command from a remote is ready to be picked up by RemCon.

This overload is provided for the case where the bearer supports command addressing.

Parameters

const TRemConAddress & aAddrThe address the command came from.
const TRemConClientId & aClient

NewNotifyCommand(const TRemConAddress &)

IMPORT_C TIntNewNotifyCommand(const TRemConAddress &aAddr)

Called when an incoming notify command from a remote is ready to be picked up by RemCon. A Notify command is different to a normal command in that it doesn't follow the standard request / response sequence. Instead a notify is registered to retrieve the current state value in an interim response, then when the state has changed relative the interim response a second response is sent containing the new, changed, state.

Depending on the semantics of the bearer protocol it may be able to map its state observation commands to plain RemCon commands, however for a reliable mechanism without polling this NotifyCommand is provided.

Parameters

const TRemConAddress & aAddrThe address the command came from.

NewNotifyCommand(const TRemConAddress &, const TRemConClientId &)

IMPORT_C TIntNewNotifyCommand(const TRemConAddress &aAddr,
const TRemConClientId &aClient
)

Called when an incoming notify command from a remote is ready to be picked up by RemCon. A Notify command is different to a normal command in that it doesn't follow the standard request / response sequence. Instead a notify is registered to retrieve the current state value in an interim response, then when the state has changed relative the interim response a second response is sent containing the new, changed, state.

Depending on the semantics of the bearer protocol it may be able to map its state observation commands to plain RemCon commands, however for a reliable mechanism without polling this NotifyCommand is provided.

This overload is provided for the case where the bearer supports command addressing.

Parameters

const TRemConAddress & aAddrThe address the command came from.
const TRemConClientId & aClient

NewNotifyResponse(const TRemConAddress &)

IMPORT_C TIntNewNotifyResponse(const TRemConAddress &aAddr)

Called when an incoming notify response from a remote is ready to be picked up by RemCon.

Parameters

const TRemConAddress & aAddrThe address the response came from.

NewResponse(const TRemConAddress &)

IMPORT_C TIntNewResponse(const TRemConAddress &aAddr)

Called when an incoming response from a remote is ready to be picked up by RemCon.

Parameters

const TRemConAddress & aAddrThe address the response came from.

NewTransactionId()

IMPORT_C TUintNewTransactionId()

Called by a bearer when a new command has come in. RemCon returns a cookie (a transaction id), guaranteed to be unique, which the bearer may use for its own identification purposes.

RegisterLocalAddressedClientObserver(const TUid &)

IMPORT_C TIntRegisterLocalAddressedClientObserver(const TUid &aBearerUid)

Called by the bearer to indicate it would like to be informed when the locally addressed client changes.

Parameters

const TUid & aBearerUid

SetRemoteAddressedClient(const TUid &, const TRemConClientId &)

IMPORT_C voidSetRemoteAddressedClient(const TUid &aBearerUid,
const TRemConClientId &aId
)

Called by the bearer to inform RemCon that remote user action means that this bearer will now route addressed commands to the specified client. This is valid until either the bearer calls SetRemoteAddressedPlayer again or RemCon calls SetLocalAddressedPlayer.

Parameters

const TUid & aBearerUidThe Uid of this bearer
const TRemConClientId & aIdThe client to which this bearer will route addressed commands.

SupportedInterfaces(const TRemConClientId &, RArray< TUid > &)

IMPORT_C TIntSupportedInterfaces(const TRemConClientId &aId,
RArray< TUid > &aUids
)

Called by the bearer when it want to retrieve which interfaces are supported by a specific client.

Parameters

const TRemConClientId & aIdA unique identifier for this client
RArray< TUid > & aUidsAn RArray to be populated with the supported UIDs. On return with KErrNone this array is populated with the UIDs of the interfaces which this client supports. Ownership of the RArray remains with the caller. Any existing entries in the array will be removed.

SupportedOperations(const TRemConClientId &, TUid, RArray< TUint > &)

IMPORT_C TIntSupportedOperations(const TRemConClientId &aId,
TUidaInterfaceUid,
RArray< TUint > &aOperations
)

Called by the bearer when it wants to retrieve which operations within the interface are supported by this client. Note that this information is not available for all interface and client combinations.

Parameters

const TRemConClientId & aIdA unique identifier for this client
TUid aInterfaceUidThe interface to return the supported operations for
RArray< TUint > & aOperationsAn RArray to be populated with the supported operations. On return with KErrNone this array is populated with the operation ids of each supported operations within the requested interface. Ownership of the RArray remains with the caller. Any existing entries in the array will be removed.

UnregisterLocalAddressedClientObserver(const TUid &)

IMPORT_C TIntUnregisterLocalAddressedClientObserver(const TUid &aBearerUid)

Called by the bearer to indicate it would no longer like to be informed when the locally addressed client changes.

Parameters

const TUid & aBearerUid