RRemCon Class Reference
class RRemCon : public RSessionBase
|
The abstract base class for RemCon session handles.
Public Member Functions
|
IMPORT_C
TInt
|
Connect
()
|
IMPORT_C
TInt
|
Connect
(const
TPlayerType
&, const
TPlayerSubType
&, const
TDesC8
&)
|
IMPORT_C
TInt
|
GetConnections
(
TSglQue
<
TRemConAddress
> &)
|
IMPORT_C void
|
NotifyConnectionsChange
(
TRequestStatus
&)
|
IMPORT_C
TInt
|
NotifyConnectionsChangeCancel
()
|
IMPORT_C void
|
Receive
(
TRequestStatus
&,
TRemConClientReceivePackage
&,
TDes8
&)
|
IMPORT_C
TInt
|
ReceiveCancel
()
|
IMPORT_C
TInt
|
RegisterInterestedAPIs
(const
TDesC8
&)
|
IMPORT_C void
|
Send
(
TRequestStatus
&,
TUid
,
TUint
,
TUint
&,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendCancel
()
|
IMPORT_C void
|
SendNotify
(
TRequestStatus
&,
TUid
,
TUint
,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C
TInt
|
SendUnreliable
(
TUid
,
TUint
,
TRemConMessageSubType
, const
TDesC8
&)
|
IMPORT_C
TVersion
|
Version
()
|
IMPORT_C
TInt
|
__DbgCheckHeap
(
TInt
)
|
IMPORT_C
TInt
|
__DbgFailNext
(
TInt
)
|
IMPORT_C
TInt
|
__DbgMarkEnd
(
TInt
)
|
IMPORT_C
TInt
|
__DbgMarkHeap
()
|
Inherited Functions
|
|
RHandleBase::Attributes()const
|
|
RHandleBase::BTraceId()const
|
|
RHandleBase::Close()
|
|
RHandleBase::DoExtendedClose()
|
|
RHandleBase::Duplicate(const RThread &,TOwnerType)
|
|
RHandleBase::FullName()const
|
|
RHandleBase::FullName(TDes &)const
|
|
RHandleBase::Handle()const
|
|
RHandleBase::HandleInfo(THandleInfo *)
|
|
RHandleBase::Name()const
|
|
RHandleBase::NotifyDestruction(TRequestStatus &)
|
|
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
|
|
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
|
|
RHandleBase::RHandleBase()
|
|
RHandleBase::RHandleBase(TInt)
|
|
RHandleBase::SetHandle(TInt)
|
|
RHandleBase::SetHandleNC(TInt)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
|
|
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
|
|
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
|
|
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
|
|
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
|
|
RSessionBase::Open(TInt,TOwnerType)
|
|
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
|
|
RSessionBase::Send(TInt)const
|
|
RSessionBase::Send(TInt,const TIpcArgs &)const
|
|
RSessionBase::SendReceive(TInt)const
|
|
RSessionBase::SendReceive(TInt,TRequestStatus &)const
|
|
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
|
|
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
|
|
RSessionBase::SetReturnedHandle(TInt)
|
|
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
|
|
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
|
|
RSessionBase::ShareAuto()
|
|
RSessionBase::ShareProtected()
|
Constructor & Destructor Documentation
RRemCon(TRemConClientType)
Member Functions Documentation
Connect()
IMPORT_C
TInt
|
Connect
|
(
|
)
|
|
Connect the handle to the server. Must be called before all other methods (except Version and Close).
Connect(const TPlayerType &, const TPlayerSubType &, const TDesC8 &)
Connect the handle to the server. Must be called before all other methods (except Version and Close).
Parameters
const
TPlayerType
& aClientType
|
The type of client player
|
const
TPlayerSubType
& aClientSubType
|
The sub-type of the client player
|
const
TDesC8
& aName
|
The name of client player
|
DoConnect()
TInt
|
DoConnect
|
(
|
)
|
[private]
|
Connects the session, starting the server if necessary. This involves two IPC calls, the first to connect the session to the server, the second to set the server-side session's type correctly (controller or target).
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 the collection- the addresses are on the client's heap.
Parameters
TSglQue
<
TRemConAddress
> & aConnections
|
A collection of remote addresses, representing all the currently extant connections. Must be empty when this function is called.
|
NotifyConnectionsChange(TRequestStatus &)
Notification for changes in the set of connections. This completes whenever the set of connections changes in some way. If they wish to know what specifically changed, the client must call GetConnections and do their own analysis of the results from that. Changes to the connection history of the system are logged internally so that the client will not 'miss' any changes by not reposting the notification quickly enough. However, if more than one bearer-level connection change occurs in the server before the notification is reposted by the client, then the following notification completion may 'cover' more than one actual state change.
NotifyConnectionsChangeCancel()
IMPORT_C
TInt
|
NotifyConnectionsChangeCancel
|
(
|
)
|
|
Cancels interest in the completion of an outstanding NotifyConnectionsChange operation.
Receive(TRequestStatus &, TRemConClientReceivePackage &, TDes8 &)
Receive a message (command or response) from the remote device. Note that RemCon server queues both commands and responses so that none are ever thrown away just because the client didn't have a Receive outstanding when they arrived.
ReceiveCancel()
IMPORT_C
TInt
|
ReceiveCancel
|
(
|
)
|
|
Cancels interest in the completion of an outstanding Receive operation.
RegisterInterestedAPIs(const TDesC8 &)
IMPORT_C
TInt
|
RegisterInterestedAPIs
|
(
|
const
TDesC8
&
|
aAPIs
|
)
|
|
Tells the server in which APIs the client is interested. The server will only deliver incoming commands of these APIs to the client.
Parameters
const
TDesC8
& aAPIs
|
A concatenated string of UIDs for the interfaces present.
|
Send(TRequestStatus &, TUid, TUint, TUint &, TRemConMessageSubType, const TDesC8 &)
Sends a message (command or response) to the remote device.
Parameters
TRequestStatus
& aStatus
|
TRequestStatus for asynchronous completion.
|
TUid
aInterfaceUid
|
The UID of the interface to which the message belongs.
|
TUint
aOperationId
|
The ID of the message. RemCon needs to know this, separately from the arbitrary data, so it can (a) match up any incoming response to this client (if the message is a command), and (b) match this message up to the target (if this message is a response).
|
TUint
& aNumRemotes
|
On success only, the number of remotes the message was successfully sent to (at the bearer level). If the message is a command from a connection-oriented controller, then on success aNumRemotes will be 1. [For consistency, this pattern holds if the message is a response, even though the information is redundant.] If the message is a command from a connectionless controller, then aNumRemotes will be zero or more, depending on what the TSP said should be done with the message and how many of the TSP-nominated bearers successfully sent the message.
|
TRemConMessageSubType
aSubType
|
|
const
TDesC8
& aData =
KNullDesC8
()
|
Data associated with the message.
|
SendCancel()
IMPORT_C
TInt
|
SendCancel
|
(
|
)
|
|
Cancels interest in the completion of an outstanding Send operation.
SendNotify(TRequestStatus &, TUid, TUint, TRemConMessageSubType, const TDesC8 &)
SendUnreliable(TUid, TUint, TRemConMessageSubType, const TDesC8 &)
SetClientType()
TInt
|
SetClientType
|
(
|
)
|
[private]
|
Does IPC with the server to set the type of the session from our member (set at construction time).
SetClientType(const TPlayerType &, const TPlayerSubType &, const TDesC8 &)
Version()
Getter for the version of the server.
__DbgCheckHeap(TInt)
IMPORT_C
TInt
|
__DbgCheckHeap
|
(
|
TInt
|
aCount
|
)
|
|
Checks that the number of allocated cells on the server's heap is correct. The server is panicked if not. In release builds, just returns KErrNone.
Parameters
TInt
aCount
|
The expected number of allocated heap cells.
|
__DbgFailNext(TInt)
IMPORT_C
TInt
|
__DbgFailNext
|
(
|
TInt
|
aCount
|
)
|
|
Simulates memory allocation failure in the server. In release builds, just returns KErrNone.
Parameters
TInt
aCount
|
The number of allocations after which memory allocation should fail.
|
__DbgMarkEnd(TInt)
IMPORT_C
TInt
|
__DbgMarkEnd
|
(
|
TInt
|
aCount
|
)
|
|
Marks the end of heap cell checking. Checks that the number of heap cells allocated since the last
__DbgMarkHeap()
is aCount; the most common value to pass here is zero. In release builds, just returns KErrNone.
Parameters
TInt
aCount
|
The expected number of allocated heap cells.
|
__DbgMarkHeap()
IMPORT_C
TInt
|
__DbgMarkHeap
|
(
|
)
|
|
Marks the start of heap cell checking in the server's heap. In release builds, just returns KErrNone.
Member Data Documentation
const TRemConClientType iClientType
TPckg< TUint > iNumRemotesPckg
TPckgBuf< TOperationInformation > iOpInfoPckg
TPckgBuf< TPlayerTypeInformation > iPlayerTypePckg
TPckg< TRemConClientReceivePackage > iReceivePckg
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.