RRootServ Class Reference

class RRootServ : public RSessionBase

The client interface to the Rootserver. Allows e.g. the Comms Reference Configurator application to configure the Comms Process with desired modules and bindings.

Inherits from

Public Member Functions
IMPORT_C TIntAddMBufAllocInfo(const TRSAddMBufAllocInfoContainer &)
IMPORT_C voidBind(TRequestStatus &, TRSBindingInfo &)
IMPORT_C voidCancelBind(TRSSubModuleAddress &, TRSSubModuleAddress &)
IMPORT_C voidCancelLoadCpm(const TCFModuleName &)
IMPORT_C voidCancelUnbind(TRSSubModuleAddress &, TRSSubModuleAddress &)
IMPORT_C voidCancelUnloadCpm(const TCFModuleName &)
IMPORT_C voidClose()
IMPORT_C TIntConnect()
IMPORT_C TIntEnumerateBindings(const TCFSubModuleAddress &, TRSIter &, TRSBindingInfo &)
IMPORT_C TIntEnumerateModules(TRSIter &, TCFModuleName &)
IMPORT_C TIntEnumerateSubModules(const TCFModuleName &, TRSIter &, TCFSubModuleName &)
IMPORT_C TIntGetModuleInfo(const TCFModuleName &, TRSModuleInfo &)
IMPORT_C TBoolIsCallerConfigurationAuthority()
IMPORT_C voidLoadCpm(TRequestStatus &, const TRSStartModuleParams &, const TDesC8 &)
IMPORT_C voidSendMessage(TRequestStatus &, const TCFModuleName &, TInt, TDes8 &)
IMPORT_C TIntSendMessage(const TCFModuleName &, TInt, TDes8 &)
IMPORT_C TIntSetMBufPoolSize(TUint)
IMPORT_C TIntSetMBufPoolSize(TUint, TUint)
IMPORT_C TIntShutdown()
IMPORT_C voidUnbind(TRequestStatus &, TRSUnBindingInfo &)
IMPORT_C voidUnloadCpm(TRequestStatus &, const TCFModuleName &, TRSUnLoadType)
IMPORT_C TVersionVersion()
IMPORT_C TInt__DbgCheckHeap(TInt)
IMPORT_C TInt__DbgCheckMbuf(TInt)
IMPORT_C TInt__DbgFailNext(TInt)
IMPORT_C TInt__DbgFailNextMbuf(TInt)
IMPORT_C TInt__DbgMarkEnd(TInt)
IMPORT_C TInt__DbgMarkHeap()
IMPORT_C TInt__DbgMbufFreeSpace()
IMPORT_C TInt__DbgMbufTotalSpace()
IMPORT_C TInt__DbgSetMbufPoolLimit(TInt)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
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
Inherited Attributes
RHandleBase::iHandle

Member Functions Documentation

AddMBufAllocInfo(const TRSAddMBufAllocInfoContainer &)

IMPORT_C TIntAddMBufAllocInfo(const TRSAddMBufAllocInfoContainer &aMBufSizeAllocInfo)
Adds information to the MBufManager about how it should allocate MBufs of a given.
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

const TRSAddMBufAllocInfoContainer & aMBufSizeAllocInfodefines the mbuf size alloc info

Bind(TRequestStatus &, TRSBindingInfo &)

IMPORT_C voidBind(TRequestStatus &aStatus,
TRSBindingInfo &aBindInfo
)
Binds two modules. Several types of binding are available: EHierarchical is the standard top-bottom binding in the protocol hierarchy. If this type is specified, iName1 of TRSBindingInfo is considered top-level module of the binding and iName2 is considered the bottom-level part. Also, this type of binding allows the top-level module to be a server. ECustom is a "Horizontal" binding between two CPM's. Typical use is when a CPM employs another CPM for doing some processing and communicates via the standard message queues. TRSBindingInfo
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function.
TRSBindingInfo & aBindInfoThe information regarding the binding request.

CancelBind(TRSSubModuleAddress &, TRSSubModuleAddress &)

IMPORT_C voidCancelBind(TRSSubModuleAddress &aName1,
TRSSubModuleAddress &aName2
)

Cancels asynchronous binding of two modules. There is no guarantee the binding is canceled. A best effort is made and the asynchronous request waiting for the module to load returns KErrCanceled on success. TRSSubModuleAddress

Parameters

TRSSubModuleAddress & aName1Name of module which is binding to aName2.
TRSSubModuleAddress & aName2Name of module which is binding to aName1.

CancelLoadCpm(const TCFModuleName &)

IMPORT_C voidCancelLoadCpm(const TCFModuleName &aName)

Cancels asynchronous loading of a comms Provider Module. There is no guarantee the module loading is canceled. A best effort is made and the asynchronous request waiting for the module to load returns with KErrCanceled on success. TCFModuleName

Parameters

const TCFModuleName & aNameName of module which is loading.

CancelUnbind(TRSSubModuleAddress &, TRSSubModuleAddress &)

IMPORT_C voidCancelUnbind(TRSSubModuleAddress &aName1,
TRSSubModuleAddress &aName2
)

Cancels asynchronous unbinding of two modules. There is no guarantee the unbinding is canceled. A best effort is made and the asynchronous request waiting for the module to load returns KErrCanceled on success. TRSSubModuleAddress

Parameters

TRSSubModuleAddress & aName1Name of module which is unbinding from aName2.
TRSSubModuleAddress & aName2Name of module which is unbinding from aName1.

CancelUnloadCpm(const TCFModuleName &)

IMPORT_C voidCancelUnloadCpm(const TCFModuleName &aName)

Cancel asynchronous unloading of a comms Provider Module. There is no guarantee the module unloading is canceled. A best effort is made and the asynchronous request waiting for the module to load returns KErrCanceled on success. TCFModuleName

Parameters

const TCFModuleName & aNameName of module which is unloading.

Close()

IMPORT_C voidClose()

Tells server that this session is being closed

Connect()

IMPORT_C TIntConnect()

Use this function to open a session to the Root Server. Default number of message slots is defined in KDefaultMessageSlots. As with any server, the connection should be closed after use. RHandleBase provides the necessary Close() function, which should be called when the server session is no longer required.

EnumerateBindings(const TCFSubModuleAddress &, TRSIter &, TRSBindingInfo &)

IMPORT_C TIntEnumerateBindings(const TCFSubModuleAddress &aSubModuleAddr,
TRSIter &aPosition,
TRSBindingInfo &aBinding
)

Gets information about the bindings on one module. The client can enumerate bindings one at a time, with the first message specifying the iReset flag (in the TRSEnumerateBindInfo struct) true, and subsequent requests for all bind infos specify this as false, in which case the Root Server will write from where it left off from the last request. TCFSubModuleAddress TRSIter TRSBindingInfo

Parameters

const TCFSubModuleAddress & aSubModuleAddrThe address of the SubModule in question
TRSIter & aPositionPosition in enumeration. Correlator for the Rootserver.
TRSBindingInfo & aBindingOn succesful return contains binding information.

EnumerateModules(TRSIter &, TCFModuleName &)

IMPORT_C TIntEnumerateModules(TRSIter &aPosition,
TCFModuleName &aModuleName
)
Through repeated calls returns the list of names of running Comms Provider Modules. Notes:
  • The current position in an enumeration is maintained for each client session, meaning that to perform two consecutive enumerations two RRootServ's must be used.

  • The order in which the modules are returned is undefined.

  • The enumeration returned is not a snapshot from the start, i.e. if modules are loaded or unloaded during the enumeration then a module could be skipped or returned twice. TRSIter TCFModuleName

Parameters

TRSIter & aPositionPosition in enumeration.
TCFModuleName & aModuleName

EnumerateSubModules(const TCFModuleName &, TRSIter &, TCFSubModuleName &)

IMPORT_C TIntEnumerateSubModules(const TCFModuleName &aModuleName,
TRSIter &aPosition,
TCFSubModuleName &aSubModuleName
)

Returns a list of running Comms Provider Modules. The client can enumerate sub-modules one at a time by providing a TCFSubModuleName. The enumerator aPosition is a correlator for Rootserver use. TCFModuleName TRSIter TCFSubModuleName

Parameters

const TCFModuleName & aModuleNameName of module.
TRSIter & aPositionPosition in enumeration, correlator for the Rootserver.
TCFSubModuleName & aSubModuleNameA name to be returned

GetModuleInfo(const TCFModuleName &, TRSModuleInfo &)

IMPORT_C TIntGetModuleInfo(const TCFModuleName &aName,
TRSModuleInfo &aModuleInfo
)

Gets information about one module. TCFModuleName TRSModuleInfo

Parameters

const TCFModuleName & aNameName of module to query.
TRSModuleInfo & aModuleInfoInformation about the module state.

IsCallerConfigurationAuthority()

IMPORT_C TBoolIsCallerConfigurationAuthority()const

Tests whether the calling process is deemed to be the RootServer Configurator. While multiple instances of the configurator process may connect only the first (at one time) can take the role of being the authority for configuration; others might watch but should not take action.

LoadCpm(TRequestStatus &, const TRSStartModuleParams &, const TDesC8 &)

IMPORT_C voidLoadCpm(TRequestStatus &aStatus,
const TRSStartModuleParams &aParams,
const TDesC8 &aIniData
)
Launch a new Comms Provider Module. The name of the new CPM instance (aParams.iParams.iName) must be unique and must be used in any further communication concerning this CPM instance, such as binding. The contents of the initialisation data parameter (aIniData) are specific to the module. It could be empty, contain the contents of an associated INI file or contain some other data specified by the specific CPM implementation. Attempts to load a CPM with a name equal to that of an existing CPM is not possible. It is required that the DLL contains the CPM secondary UID of 0x101f7418. TRSStartModuleParams
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function.
const TRSStartModuleParams & aParamsParameters needed to load the Provider Module.
const TDesC8 & aIniDataModule specific ini data.

SendMessage(TRequestStatus &, const TCFModuleName &, TInt, TDes8 &)

IMPORT_C voidSendMessage(TRequestStatus &aStatus,
const TCFModuleName &aName,
TIntaType,
TDes8 &aData
)

Sends a message to the module TCFMessageType for message/data types supported by ESOCK directly CNetMessage

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function.
const TCFModuleName & aName
TInt aTypea type determining the type of data in aData param
TDes8 & aDataa data specific to the message and it's type given by aType. All aData is expected to be CNetMessage based serialised instance

SendMessage(const TCFModuleName &, TInt, TDes8 &)

IMPORT_C TIntSendMessage(const TCFModuleName &aName,
TIntaType,
TDes8 &aData
)

Sends a message to the module TCFMessageType for message/data types supported by ESOCK directly CNetMessage

Parameters

const TCFModuleName & aName
TInt aTypea type determining the type of data in aData param
TDes8 & aDataa data specific to the message and it's type given by aType. All aData is expected to be CNetMessage based serialised instance

SetMBufPoolSize(TUint)

IMPORT_C TIntSetMBufPoolSize(TUintaPoolSize)
Set the size of the MBuf pool. This function can only be called before the first server module is loaded.
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TUint aPoolSizeDefines the new size of the Comms buffer pool in number of bytes.

SetMBufPoolSize(TUint, TUint)

IMPORT_C TIntSetMBufPoolSize(TUintaInitPoolSize,
TUintaMaxPoolSize
)
Set the size of the MBuf pool. This function can only be called before the first server module is loaded.
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TUint aInitPoolSizeDefines the maximum size of the new Comms Buffer Pool can grow to
TUint aMaxPoolSize

Shutdown()

IMPORT_C TIntShutdown()
Shuts down RootServer
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Unbind(TRequestStatus &, TRSUnBindingInfo &)

IMPORT_C voidUnbind(TRequestStatus &aStatus,
TRSUnBindingInfo &aUnBindInfo
)
Unbinds two modules. All bindings between the two modules are unbound and the states for each module are updated in the object. TRSUnBindingInfo
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function.
TRSUnBindingInfo & aUnBindInfoHolds the unbinding info.

UnloadCpm(TRequestStatus &, const TCFModuleName &, TRSUnLoadType)

IMPORT_C voidUnloadCpm(TRequestStatus &aStatus,
const TCFModuleName &aName,
TRSUnLoadTypeaType
)
Unloads a Comms Provider Module. TCFModuleName TRSUnLoadType
capability
NetworkControl The Security ID of the caller will be checked to ensure that this request came from the comms configurator

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function.
const TCFModuleName & aNameName of module to unload
TRSUnLoadType aTypeType of unload (optional/graceful/ungraceful).

Version()

IMPORT_C TVersionVersion()const

Returns the client side version number. Use this function to get the version number. The version number may be incremented in future releases of the Root Server. If extra features are added in such releases, the version number may be used by application programs as a basis for assessing the capabilities of the Root Server.

__DbgCheckHeap(TInt)

IMPORT_C TInt__DbgCheckHeap(TIntaCount)

Sets a heap mark in the root server

Parameters

TInt aCount

__DbgCheckMbuf(TInt)

IMPORT_C TInt__DbgCheckMbuf(TIntasize)

Sets the Mbuf pool limit

Parameters

TInt asize

__DbgFailNext(TInt)

IMPORT_C TInt__DbgFailNext(TIntaCount)

Sets a heap mark in the root server

Parameters

TInt aCount

__DbgFailNextMbuf(TInt)

IMPORT_C TInt__DbgFailNextMbuf(TIntaCount)

Sets a Mbuf mark in the root server

Parameters

TInt aCount

__DbgMarkEnd(TInt)

IMPORT_C TInt__DbgMarkEnd(TIntaCount)

Sets a heap mark in the root server

Parameters

TInt aCount

__DbgMarkHeap()

IMPORT_C TInt__DbgMarkHeap()

Sets a heap mark in the root server

__DbgMbufFreeSpace()

IMPORT_C TInt__DbgMbufFreeSpace()

Gets the amount of free space in the MBuf manager

__DbgMbufTotalSpace()

IMPORT_C TInt__DbgMbufTotalSpace()

Gets the amount of free space in the MBuf manager

__DbgSetMbufPoolLimit(TInt)

IMPORT_C TInt__DbgSetMbufPoolLimit(TIntasize)

Sets the Mbuf pool limit

Parameters

TInt asize