CBindManager Class Reference
class CBindManager : public CBase |
Nested Classes and Structures
Public Member Functions |
---|
| ~CBindManager() |
void | BindSubmodulesL(TRequestStatus &, const TRSBindType, const TCFSubModuleAddress &, const TCFSubModuleAddress &, TInt, TInt) |
TInt
| Cancel(TRequestStatus &) |
void | CreateModuleL(TRequestStatus &, const TCFModuleNameF &, const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &) |
TInt
| EnumerateBindings(const TCFSubModuleAddress &, TBool, TBindingInfo &) |
TInt
| EnumerateSubModules(const TCFModuleNameF &, TInt, TCFSubModuleNameF &) |
void | JobTimedOut(const TCFModuleNameF &, const TUint) |
void | ModuleEndedL(const TCFModuleNameF &) |
CBindManager * | NewL(MRootServerNotify &) |
TInt
| NumSubModules(const TCFModuleNameF &, TInt &) |
void | ReceivedMessage(const TCFModuleNameF &, const TCFMessage &) |
void | SendL(const TCFModuleNameF &, const RMessage2 &) |
void | TaskCompleted(CModule &, const CTask &, TInt) |
void | UnbindAllAndShutDownL(TRequestStatus &, const TCFModuleNameF &, TCFShutdownType) |
void | UnbindAlreadyDeadL(TRequestStatus &, const TCFModuleNameF &) |
void | UnbindSubmodulesL(TRequestStatus &, const TCFSubModuleAddress &, const TCFSubModuleAddress &) |
Constructor & Destructor Documentation
Member Functions Documentation
BindSubmodulesL(TRequestStatus &, const TRSBindType, const TCFSubModuleAddress &, const TCFSubModuleAddress &, TInt, TInt)
Called by rootserver to bind two submodules. If the request is valid the bindmanager will send a Bind message to the module associated with each submodule (which may be the same for both) and will complete the request when a valid response is received from both, or timeout occurs. If a cancelled bind request exists for the same modules and type, then it is reactivated with the new aStatus.
- leave
- KErrNoMemory
- leave
- ERSModuleUnknown
- leave
- ERSSubModuleUnknown
- leave
- ERSModuleNotReady
- leave
- ERSAlreadyBound
- leave
- ERSBindingInProgress
Parameters
TRequestStatus & aStatus | status which will be completed when finished |
const TRSBindType aType | type of binding defined by rootserver |
const TCFSubModuleAddress & aUpperSubmodule | first submodule to bind - the upper module in hierarchical bindings |
const TCFSubModuleAddress & aLowerSubmodule | second submodule to bind |
TInt aForwardQLength | xxx |
TInt aReverseQLength | xx |
Cancel(TRequestStatus &)
Called by rootserver to cancel the request with the specified TRequestStatus. The bindmanager will continue to process responses from the modules and update the internal state information accordingly.
ConstructL()
void | ConstructL | ( | ) | [private] |
ConvertRSBindType(const TRSBindType, TCFBindType &, TCFBindType &)
Convert a rootserver style binding type to the equivalent comms framework type
Parameters
const TRSBindType aType | a RootServer binding type |
TCFBindType & aUpperBindType | comms framework bind type for upper submodule |
TCFBindType & aLowerBindType | comms framework bind type for lower submodule |
CreateModuleL(TRequestStatus &, const TCFModuleNameF &, const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &)
void | CreateModuleL | ( | TRequestStatus & | aStatus, |
| const TCFModuleNameF & | aModule, |
| const RCFChannel::TMsgQueues & | aInputQueues, |
| const RCFChannel::TMsgQueues & | aOutputQueues |
| ) | |
Called by rootserver to inform the bindmanager of a new module and the queues to be used for communicating with it. The bindmanager will send a Discovery message to the module and will not complete the request until a valid DiscoveryResp is received or timeout occurs.
- leave
- KErrNoMemory
- leave
- ERSModuleAlreadyExist
Parameters
TRequestStatus & aStatus | status which will be completed when finished |
const TCFModuleNameF & aModule | name of module to create |
const RCFChannel::TMsgQueues & aInputQueues | queues on which messages should sent to the module |
const RCFChannel::TMsgQueues & aOutputQueues | queues on which messages will be received from the module |
EnumerateBindings(const TCFSubModuleAddress &, TBool, TBindingInfo &)
Enumerates bindings by returning one at a time until there is no more.
EnumerateSubModules(const TCFModuleNameF &, TInt, TCFSubModuleNameF &)
Return a list of sub modules, starting at the point specified by aFrom
Parameters
const TCFModuleNameF & aModuleName | The module to enumerate submodules from |
TInt aPosition | Start writing submodules names from here |
TCFSubModuleNameF & aName | The descriptor to write to |
FindBindInfo(const TCFSubModuleAddress &, const TCFSubModuleAddress &)
If a bind exists between the two specified modules, then return a pointer to it.
GetModulePtrL(const TCFModuleNameF &)
Search method to find a cmodule ptr from a module name
- leave
- ERSModuleUnknown
GetModulePtrL(const TCFSubModuleAddress &)
Search method to find a cmodule ptr from a submodule address
- leave
- ERSModuleUnknown
- leave
- ERSSubModuleUnknown
JobTimedOut(const TCFModuleNameF &, const TUint)
Called by a cjob for each taskid when it times out. It informs the associated module.
Parameters
const TCFModuleNameF & aModuleName | the name of the module associated with the task |
const TUint aTaskId | the id of the task |
ModuleEndedL(const TCFModuleNameF &)
Called by rootserver to indicate that a module thread has exited and therefore any information stored about it should be deleted.
- leave
- KErrNoMemory
- leave
- ERSModuleUnknown
- leave
- ERSBindingExists indicates that a binding still exists for the module and should be removed by calling UnbindAlreadyDeadL to avoid an inconsistent state in module to which it is bound
NewL(MRootServerNotify &)
Parameters
MRootServerNotify & aRootServerNotifier | Callback object when an unknown message is received |
NumSubModules(const TCFModuleNameF &, TInt &)
Return the number of submodules which exist for the specified module
Parameters
const TCFModuleNameF & aName | module to count submodules for |
TInt & aNumSubs | number of submodules for module |
ReceivedMessage(const TCFModuleNameF &, const TCFMessage &)
Called by a cmodule when a message with no associated task is received. The bindmanager passes the message to the rootserver.
Parameters
const TCFModuleNameF & aModule | the name of the module which received the message |
const TCFMessage & aNewMsg | the received message |
SendL(const TCFModuleNameF &, const RMessage2 &)
TaskCompleted(CModule &, const CTask &, TInt)
Called by a cmodule when a task is completed. Bindmanager passes the information to all jobs and bindinfos
Parameters
CModule & aModule | the cmodule which owns the completed task |
const CTask & aTask | the task which has finished |
TInt aStatus | the status returned by the completed task |
UnbindAllAndShutDownL(TRequestStatus &, const TCFModuleNameF &, TCFShutdownType)
Called by rootserver to unbind all submodules from a specific module and then send a shutdown message. The bindmanager will send a pair of Unbind messages for each existing binding followed by a shutdown only to the module specified. The request will complete when a valid response is received for each message or timeout occurs.
- leave
- KErrNoMemory
- leave
- ERSModuleUnknown
- leave
- ERSModuleNotReady
- leave
- ERSBindingInProgress
UnbindAllModuleL(TRequestStatus &, const TCFModuleNameF &, const TBool, CJob *&)
Send Unbind requests for every binding involving the specified module. If the ModuleIsDead parameter is true then no messages will be sent to the named target module.
- leave
- KErrNoMemory
- leave
- ERSModuleUnknown
- leave
- ERSSubModuleUnknown
- leave
- ERSBindingInProgress
Parameters
TRequestStatus & aStatus | status which will be completed when finished |
const TCFModuleNameF & aModule | name of module to unbind |
const TBool aModuleIsDead | indicates whether the target module is dead, and therefore should not be sent any messages |
CJob *& pJob | var parameter which will be set to point to a new job if one is created |
UnbindAlreadyDeadL(TRequestStatus &, const TCFModuleNameF &)
Called by rootserver to unbind all submodules from a specific module where the module is known to be dead. The bindmanager will send Unbind unbind messages for each existing binding, except when the destination is the dead module. The request will complete when a valid response is received for each message or timeout occurs.
- leave
- KErrNoMemory
- leave
- ERSModuleUnknown
- leave
- ERSBindingInProgress
UnbindSubmodulesL(TRequestStatus &, const TCFSubModuleAddress &, const TCFSubModuleAddress &)
Called by rootserver to unbind two submodules. If the request is valid the bindmanager will send an Unbind message to the module associated with each submodule (which may be the same for both) and will complete the request when a valid response is received from both, or timeout occurs.
- leave
- KErrNoMemory
- leave
- ERSBindingUnknown
- leave
- ERSModuleUnknown
- leave
- ERSSubModuleUnknown
- leave
- ERSBindingInProgress
Member Enumerations Documentation
Enum TBMBindState
Main singleton class providing Bind Manager functionality to the rootserver. This class handles bind and unbind messaging through comms framework queues and interfaces with the RootServer using asynch TReqestStatus objects.
Enumerators
EBindInProgress | |
EBindError | |
EBound | |
EUnbindInProgress | |
EUnbindError | |
EUnbound | |
Member Type Definitions Documentation
Typedef RBindingInfoArray
Member Data Documentation
TDblQue< CBindInfo > iBindList
TInt
iEnumBindingsIdx
TInt
| iEnumBindingsIdx | [private] |
Index for enumeration of bindings
TDblQue< CModule > iModuleList
CPersistentSubModuleAddressCon * iModuleNameStor
MRootServerNotify * iNotify
TransactionId
iTransactionId
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.