CRemConInterfaceSelector Class Reference
class CRemConInterfaceSelector : public CBase
|
Public Member Functions
|
|
~CRemConInterfaceSelector
()
|
void
|
BulkError
(
TInt
)
|
void
|
BulkReceiveComplete
(
TUid
,
TUint
, const
TDesC8
&)
|
void
|
BulkSessionConnectL
()
|
IMPORT_C void
|
ConnectBearer
(
TRequestStatus
&)
|
IMPORT_C
TInt
|
ConnectBearerCancel
()
|
IMPORT_C
TBool
|
ControllerOpened
()
|
IMPORT_C void
|
DisconnectBearer
(
TRequestStatus
&)
|
IMPORT_C
TInt
|
DisconnectBearerCancel
()
|
void
|
Error
(
TInt
)
|
IMPORT_C
TInt
|
GetConnections
(
TSglQue
<
TRemConAddress
> &)
|
IMPORT_C void
|
GoConnectionOrientedL
(const
TRemConAddress
&)
|
IMPORT_C void
|
GoConnectionlessL
()
|
IMPORT_C
CRemConInterfaceSelector
*
|
NewL
()
|
IMPORT_C void
|
NotifyConnectionsChange
(
TRequestStatus
&)
|
IMPORT_C
TInt
|
NotifyConnectionsChangeCancel
()
|
IMPORT_C void
|
OpenControllerL
()
|
IMPORT_C void
|
OpenTargetL
()
|
IMPORT_C void
|
OpenTargetL
(
TPlayerType
,
TPlayerSubType
, const
TDesC8
&)
|
void
|
ReceiveComplete
(
TUid
,
TUint
,
TRemConMessageSubType
, const
TRemConAddress
&, const
TDesC8
&,
TRemConClientType
)
|
IMPORT_C void
|
RegisterErrorObserver
(
MRemConErrorObserver
*)
|
IMPORT_C void
|
RegisterInterfaceL
(
CRemConInterfaceBase
&)
|
void
|
RegisterInterfaceL
(
CRemConInterfaceBase
&,
RRemConInterfaceFeatures
&)
|
IMPORT_C void
|
Send
(
TRequestStatus
&,
TUid
,
TUint
,
TUint
&,
TRemConMessageType
, const
TDesC8
&)
|
IMPORT_C void
|
Send
(
TRequestStatus
&,
TUid
,
TUint
,
TUint
&,
TRemConMessageType
,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C void
|
SendBulk
(
TRequestStatus
&,
TUid
,
TUint
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendBulkCancel
()
|
IMPORT_C
TInt
|
SendBulkUnreliable
(
TUid
,
TUint
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendCancel
(
TRemConMessageType
)
|
IMPORT_C void
|
SendNotify
(
TRequestStatus
&,
TUid
,
TUint
,
TRemConMessageType
,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendUnreliable
(
TUid
,
TUint
,
TRemConMessageType
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendUnreliable
(
TUid
,
TUint
,
TRemConMessageType
,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C
TBool
|
TargetOpened
()
|
Constructor & Destructor Documentation
CRemConInterfaceSelector()
CRemConInterfaceSelector
|
(
|
)
|
[private]
|
~CRemConInterfaceSelector()
IMPORT_C
|
~CRemConInterfaceSelector
|
(
|
)
|
|
Member Functions Documentation
AssertSession(RRemCon *, TInt)
void
|
AssertSession
|
(
|
RRemCon
*
|
aSess,
|
|
TInt
|
aPanicCode
|
|
)
|
const [private]
|
BulkCleanup()
void
|
BulkCleanup
|
(
|
)
|
[private]
|
BulkError(TInt)
void
|
BulkError
|
(
|
TInt
|
aError
|
)
|
|
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.
BulkOpened()
TBool
|
BulkOpened
|
(
|
)
|
const [private]
|
BulkReceiveComplete(TUid, TUint, const TDesC8 &)
void
|
BulkReceiveComplete
|
(
|
TUid
|
aInterfaceUid,
|
|
TUint
|
aOperationId,
|
|
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
aInterfaceUid
|
Interface UID of the new message.
|
TUint
aOperationId
|
Operation ID of the new message.
|
const
TDesC8
& aData
|
Data associated with the new message.
|
BulkSessionConnectL()
void
|
BulkSessionConnectL
|
(
|
)
|
|
Only called internally, by the Active Object which sucks messages out of RemCon (bulk server).
This should be run from the thread in which the bulk interfaces are to run.
ConnectBearer(TRequestStatus &)
Brings up a bearer-level connection. The controller session must already exist (use OpenControllerL) and be connection-oriented.
ConnectBearerCancel()
IMPORT_C
TInt
|
ConnectBearerCancel
|
(
|
)
|
|
Cancels interest in the completion of a ConnectBearer request.
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
ControllerOpened()
IMPORT_C
TBool
|
ControllerOpened
|
(
|
)
|
const
|
To determine if a controller session has been opened.
DisconnectBearer(TRequestStatus &)
Destroys a bearer-level connection. The controller session must already exist (use OpenControllerL) and be connection-oriented.
DisconnectBearerCancel()
IMPORT_C
TInt
|
DisconnectBearerCancel
|
(
|
)
|
|
Cancels interest in the completion of a DisconnectBearer request.
Error(TInt)
void
|
Error
|
(
|
TInt
|
aError
|
)
|
|
Only called internally, by the Active Object which sucks messages out of RemCon. This is called in the case of a session error.
EstablishBulkThreadBindingL()
void
|
EstablishBulkThreadBindingL
|
(
|
)
|
[private]
|
GetConnections(TSglQue< TRemConAddress > &)
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.
|
GoConnectionOrientedL(const TRemConAddress &)
IMPORT_C void
|
GoConnectionOrientedL
|
(
|
const
TRemConAddress
&
|
aConnection
|
)
|
|
Makes the controller session (which must already exist- use OpenControllerL) connection-oriented.
GoConnectionlessL()
IMPORT_C void
|
GoConnectionlessL
|
(
|
)
|
|
Makes the controller session (which must already exist- use OpenControllerL) connectionless.
NotifyConnectionsChange(TRequestStatus &)
Notification for changes in the set of connections.
NotifyConnectionsChangeCancel()
IMPORT_C
TInt
|
NotifyConnectionsChangeCancel
|
(
|
)
|
|
Cancels interest in the completion of an outstanding NotifyConnectionsChange operation.
OpenControllerL()
IMPORT_C void
|
OpenControllerL
|
(
|
)
|
|
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()
void
|
OpenTargetCommonL
|
(
|
)
|
[private]
|
OpenTargetL()
IMPORT_C void
|
OpenTargetL
|
(
|
)
|
|
Opens a target session to RemCon.
-
leave
-
KErrInUse If a target session is already open.
OpenTargetL(TPlayerType, TPlayerSubType, const TDesC8 &)
Opens a target session to RemCon.
-
leave
-
KErrInUse If a target session is already open.
Opens a target session to RemCon.
If any bulk interfaces have been registered on this interface selector the the thread in which the first bulk interface was created must be ready to run and not blocked waiting for the completion of this function. Failure to do so will lead to deadlock.
-
leave
-
KErrInUse If a target session is already open.
ReceiveComplete(TUid, TUint, TRemConMessageSubType, const TRemConAddress &, const TDesC8 &, TRemConClientType)
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
aInterfaceUid
|
Interface UID of the new message.
|
TUint
aOperationId
|
Operation ID of the new message.
|
TRemConMessageSubType
aMsgSubType
|
The message subtype.
|
const
TRemConAddress
& aRemoteAddress
|
The address of the remote which sent the message.
|
const
TDesC8
& aData
|
Data associated with the new message.
|
TRemConClientType
aType
|
The type of session which received the message (from which the type of the message can be interpolated).
|
RegisterErrorObserver(MRemConErrorObserver *)
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.
|
RegisterInterestedApisL(TRemConClientType)
RegisterInterfaceCommonL(CRemConInterfaceBase &, const TDesC8 &)
RegisterInterfaceL(CRemConInterfaceBase &)
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.
RegisterInterfaceL(CRemConInterfaceBase &, RRemConInterfaceFeatures &)
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.
|
RRemConInterfaceFeatures
& aRemConInterfaceFeatures
|
The 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 &)
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
& 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 =
KNullDesC8
()
|
Any associated message data in interface-specific format.
|
Send(TRequestStatus &, TUid, TUint, TUint &, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)
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 =
KNullDesC8
()
|
Any associated message data in interface-specific format.
|
SendBulk(TRequestStatus &, TUid, TUint, const TDesC8 &)
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
& 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.
|
const
TDesC8
& aData =
KNullDesC8
()
|
Any associated message data in interface-specific format.
|
SendBulkCancel()
IMPORT_C
TInt
|
SendBulkCancel
|
(
|
)
|
|
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.
SendBulkUnreliable(TUid, TUint, const TDesC8 &)
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
aInterfaceUid
|
The UID of the concrete (outer-layer) interface sending the message.
|
TUint
aOperationId
|
The interface-specific operation identifier.
|
const
TDesC8
& aData =
KNullDesC8
()
|
Any associated message data in interface-specific format.
|
SendCancel(TRemConMessageType)
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.
|
SendNotify(TRequestStatus &, TUid, TUint, TRemConMessageType, TRemConMessageSubType, const TDesC8 &)
SendUnreliable(TUid, TUint, TRemConMessageType, const TDesC8 &)
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
aInterfaceUid
|
The UID of the concrete (outer-layer) interface sending the message.
|
TUint
aOperationId
|
The interface-specific operation identifier.
|
TRemConMessageType
aMsgType
|
Whether 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 &)
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
aInterfaceUid
|
The UID of the concrete (outer-layer) interface sending the message.
|
TUint
aOperationId
|
The interface-specific operation identifier.
|
TRemConMessageType
aMsgType
|
Whether the message is a command or a response.
|
TRemConMessageSubType
aMsgSubType
|
The 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]
|
TargetOpened()
IMPORT_C
TBool
|
TargetOpened
|
(
|
)
|
const
|
To determine if a target session has been opened.
TryToReconnect()
TInt
|
TryToReconnect
|
(
|
)
|
[private]
|
Resurrects sessions in case of server death.
For the target and controller session we try to open a new session. If this succeeds we can then set the old session to point to the new one after closing our old defunct session.
On success we are left with happy functioning handles. On failure we are left with defunct handles, which are still valid but will complete all requests with KErrServerTerminated.
This means that we won't cause an application to get a bad handle panic if it hasn't done anything wrong.
TryToReconnectBulk()
TInt
|
TryToReconnectBulk
|
(
|
)
|
[private]
|
Resurrects bulk sessions in case of server death.
For the bulk session we try to open a new session. If this succeeds we can then set the old session to point to the new one after closing our old defunct session.
On success we are left with happy functioning handles. On failure we are left with defunct handles, which are still valid but will complete all requests with KErrServerTerminated.
This means that we won't cause an application to get a bad handle panic if it hasn't done anything wrong.
Member Data Documentation
RSpecificThreadCallBack * iBulkCleanupCall
RHeap * iBulkHeap
RHeap
*
|
iBulkHeap
|
[private]
|
TUint
iBulkMaxDataLength
TUint
|
iBulkMaxDataLength
|
[private]
|
CBulkReceiver * iBulkReceiver
RRemConBulk * iBulkSession
TUint
iControlMaxDataLength
TUint
|
iControlMaxDataLength
|
[private]
|
For all registered interfaces, this is the size of the biggest operation-associated data lump.
CReceiver * iControllerReceiver
RRemConController * iControllerSession
MRemConErrorObserver * iErrorObserver
CRemConInterfaceDetailsArray * iInterfaces
RRemCon * iNotificationSession
RRemCon
*
|
iNotificationSession
|
[private]
|
RHeap * iSharedThreadHeap
RHeap
*
|
iSharedThreadHeap
|
[private]
|
CReceiver * iTargetReceiver
RRemConTarget * iTargetSession
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.