RRemCon Class Reference

class RRemCon : public RSessionBase

The abstract base class for RemCon session handles.

Inherits from

Public Member Functions
IMPORT_C TIntConnect()
IMPORT_C TIntConnect(const TPlayerType &, const TPlayerSubType &, const TDesC8 &)
IMPORT_C TIntGetConnections(TSglQue< TRemConAddress > &)
IMPORT_C voidNotifyConnectionsChange(TRequestStatus &)
IMPORT_C TIntNotifyConnectionsChangeCancel()
IMPORT_C voidReceive(TRequestStatus &, TRemConClientReceivePackage &, TDes8 &)
IMPORT_C TIntReceiveCancel()
IMPORT_C TIntRegisterInterestedAPIs(const TDesC8 &)
IMPORT_C voidSend(TRequestStatus &, TUid, TUint, TUint &, TRemConMessageSubType, const TDesC8 &)
IMPORT_C TIntSendCancel()
IMPORT_C voidSendNotify(TRequestStatus &, TUid, TUint, TRemConMessageSubType, const TDesC8 &)
IMPORT_C TIntSendUnreliable(TUid, TUint, TRemConMessageSubType, const TDesC8 &)
IMPORT_C TVersionVersion()
IMPORT_C TInt__DbgCheckHeap(TInt)
IMPORT_C TInt__DbgFailNext(TInt)
IMPORT_C TInt__DbgMarkEnd(TInt)
IMPORT_C TInt__DbgMarkHeap()
Protected Member Functions
RRemCon(TRemConClientType)
Private Member Functions
TInt DoConnect()
TInt SetClientType()
TInt SetClientType(const TPlayerType &, const TPlayerSubType &, const TDesC8 &)
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()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
const TRemConClientTypeiClientType
TPckg< TUint >iNumRemotesPckg
TPckgBuf< TOperationInformation >iOpInfoPckg
TPckgBuf< TPlayerTypeInformation >iPlayerTypePckg
TPckg< TRemConClientReceivePackage >iReceivePckg
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RRemCon(TRemConClientType)

RRemCon(TRemConClientTypeaType)[protected]

Parameters

TRemConClientType aTypeThe type of the session.

Member Functions Documentation

Connect()

IMPORT_C TIntConnect()

Connect the handle to the server. Must be called before all other methods (except Version and Close).

Connect(const TPlayerType &, const TPlayerSubType &, const TDesC8 &)

IMPORT_C TIntConnect(const TPlayerType &aClientType,
const TPlayerSubType &aClientSubType,
const TDesC8 &aName
)

Connect the handle to the server. Must be called before all other methods (except Version and Close).

Parameters

const TPlayerType & aClientTypeThe type of client player
const TPlayerSubType & aClientSubTypeThe sub-type of the client player
const TDesC8 & aNameThe 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 > &)

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 the collection- the addresses are on the client's heap.

Parameters

TSglQue< TRemConAddress > & aConnectionsA collection of remote addresses, representing all the currently extant connections. Must be empty when this function is called.

NotifyConnectionsChange(TRequestStatus &)

IMPORT_C voidNotifyConnectionsChange(TRequestStatus &aStatus)

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.

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.

NotifyConnectionsChangeCancel()

IMPORT_C TIntNotifyConnectionsChangeCancel()

Cancels interest in the completion of an outstanding NotifyConnectionsChange operation.

Receive(TRequestStatus &, TRemConClientReceivePackage &, TDes8 &)

IMPORT_C voidReceive(TRequestStatus &aStatus,
TRemConClientReceivePackage &aReceivePackage,
TDes8 &aData
)

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.

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.
TRemConClientReceivePackage & aReceivePackageA struct containing the received message.
TDes8 & aDataData associated with the message.

ReceiveCancel()

IMPORT_C TIntReceiveCancel()

Cancels interest in the completion of an outstanding Receive operation.

RegisterInterestedAPIs(const TDesC8 &)

IMPORT_C TIntRegisterInterestedAPIs(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 & aAPIsA concatenated string of UIDs for the interfaces present.

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

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

Sends a message (command or response) to the remote device.

Parameters

TRequestStatus & aStatusTRequestStatus for asynchronous completion.
TUid aInterfaceUidThe UID of the interface to which the message belongs.
TUint aOperationIdThe 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 & aNumRemotesOn 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 TIntSendCancel()

Cancels interest in the completion of an outstanding Send operation.

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

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

Sends a notify command to the remote device.

RRemCon::Send()

Parameters

TRequestStatus & aStatus
TUid aInterfaceUid
TUint aOperationId
TRemConMessageSubType aSubType
const TDesC8 & aData =  KNullDesC8()

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

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

Parameters

TUid aInterfaceUid
TUint aOperationId
TRemConMessageSubType aSubType
const TDesC8 & aData =  KNullDesC8()

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 &)

TInt SetClientType(const TPlayerType &aClientType,
const TPlayerSubType &aClientSubType,
const TDesC8 &aName
)[private]

Parameters

const TPlayerType & aClientType
const TPlayerSubType & aClientSubType
const TDesC8 & aName

Version()

IMPORT_C TVersionVersion()const

Getter for the version of the server.

__DbgCheckHeap(TInt)

IMPORT_C TInt__DbgCheckHeap(TIntaCount)

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 aCountThe expected number of allocated heap cells.

__DbgFailNext(TInt)

IMPORT_C TInt__DbgFailNext(TIntaCount)

Simulates memory allocation failure in the server. In release builds, just returns KErrNone.

Parameters

TInt aCountThe number of allocations after which memory allocation should fail.

__DbgMarkEnd(TInt)

IMPORT_C TInt__DbgMarkEnd(TIntaCount)

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 aCountThe 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

const TRemConClientTypeiClientType[private]

TPckg< TUint > iNumRemotesPckg

TPckg< TUint >iNumRemotesPckg[private]

Used by Send.

TPckgBuf< TOperationInformation > iOpInfoPckg

TPckgBuf< TOperationInformation >iOpInfoPckg[private]

TPckgBuf< TPlayerTypeInformation > iPlayerTypePckg

TPckgBuf< TPlayerTypeInformation >iPlayerTypePckg[private]

TPckg< TRemConClientReceivePackage > iReceivePckg

TPckg< TRemConClientReceivePackage >iReceivePckg[private]

Used by Receive.