CModule Class Reference
class CModule : public CActive
|
Manages the state of a CPM or comms-server and handles the asynchronous message queueuing.
Public Member Functions
|
|
~CModule
()
|
TBool
|
CheckDiscoveryMsgFinishedL
(const
TCFMessage
&)
|
void
|
Dequeue
()
|
void
|
DoDiscoverL
(
TUint
&)
|
void
|
DoShutdownL
()
|
void
|
DoStartTaskL
(
CTask
*)
|
void
|
EndAllTasks
(const
TInt
)
|
void
|
EndTask
(const
TUint
&, const
TInt
)
|
TInt
|
EnumerateSubModules
(const
TInt
&,
TCFSubModuleNameF
&)
|
TBool
|
GetBindTaskL
(const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &, const
TCFSubModuleAddress
&, const
TCFSubModuleAddress
&, const
TCFBindType
,
CTask
*&)
|
TBool
|
GetUnbindTaskL
(const
TCFSubModuleAddress
&, const
TCFSubModuleAddress
&, const
TBool
,
CTask
*&)
|
TBool
|
HasSubModule
(const
TCFSubModuleNameF
&)
|
const
TBool
&
|
Initialising
()
|
const
TCFModuleNameF
&
|
Name
()
|
CModule
*
|
NewL
(
MBindManagerNotify
*, const
TCFModuleNameF
&,
TransactionId
&, const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &)
|
TInt
|
NumSubModules
()
|
TInt
|
ReserveSpaceInSendQueue
()
|
void
|
SendL
(const
TCFMessage
&)
|
void
|
SetInitialising
(const
TBool
)
|
const
TCFSubModuleAddress
&
|
SubModuleNameRefL
(const
TCFSubModuleAddress
&)
|
Constructor & Destructor Documentation
CModule(MBindManagerNotify *, TransactionId &, const TCFModuleNameF &)
Member Functions Documentation
CheckDiscoveryMsgFinishedL(const TCFMessage &)
ConstructL(const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &)
void
|
ConstructL
|
(
|
const RCFChannel::TMsgQueues &
|
aInputQueues,
|
|
const RCFChannel::TMsgQueues &
|
aOutputQueues
|
|
)
|
[private]
|
Second phase constructor for
CModule
-
leave
-
KErrNoMemory
Parameters
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
|
Dequeue()
Remove this from the linked list
DoCancel()
void
|
DoCancel
|
(
|
)
|
[protected, virtual]
|
DoDiscoverL(TUint &)
void
|
DoDiscoverL
|
(
|
TUint
&
|
aTaskId
|
)
|
|
Creates a task to send a discovery request to the module and sends the message itself
-
leave
-
KErrNoMemory
Parameters
TUint
& aTaskId
|
filled in with the id of the new task
|
DoStartTaskL(CTask *)
void
|
DoStartTaskL
|
(
|
CTask
*
|
aTask
|
)
|
|
Sends the task's message and adds it the the task in progress list
-
leave
-
KErrNoMemory
Parameters
CTask
* aTask
|
the task to process
|
EndAllTasks(const TInt)
void
|
EndAllTasks
|
(
|
const
TInt
|
aStatus
|
)
|
|
Called by bindmanager to end all tasks for this module. Called on receipt of a moduleEnded request
Parameters
const
TInt
aStatus
|
the status code with which the tasks will be ended
|
EndTask(const TUint &, const TInt)
void
|
EndTask
|
(
|
const
TUint
&
|
aTaskId,
|
|
const
TInt
|
aStatus
|
|
)
|
|
Called by bindmanager to indicate that the task with the specified id has completed
Parameters
const
TUint
& aTaskId
|
id of the finished task
|
const
TInt
aStatus
|
the status code with which the task has ended
|
EnumerateSubModules(const TInt &, TCFSubModuleNameF &)
Enumerate all known submodules.
Parameters
const
TInt
& aPosition
|
The position in the array of submodulenames.
|
TCFSubModuleNameF
& aSubModuleName
|
The name to be returned
|
GetBindTaskL(const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &, const TCFSubModuleAddress &, const TCFSubModuleAddress &, const TCFBindType, CTask *&)
Either creates a task to send a bind request or returns an existing task if a matching one already exists
-
leave
-
KErrNoMemory
Parameters
const RCFChannel::TMsgQueues & aInputQueues
|
queues for comms between the modules being bound
|
const RCFChannel::TMsgQueues & aOutputQueues
|
queues for comms between the modules being bound
|
const
TCFSubModuleAddress
& aSubModule1
|
first submodule being bound
|
const
TCFSubModuleAddress
& aSubModule2
|
second submodule being bound
|
const
TCFBindType
aType
|
the type of binding
|
CTask
*& aTask
|
set to point to the task
|
GetNextTransactionId()
TUint
|
GetNextTransactionId
|
(
|
)
|
[private]
|
Generate a transaction id 'unique' to this module. Uses a straightforward 32 bit count so will wrap eventually.
GetUnbindTaskL(const TCFSubModuleAddress &, const TCFSubModuleAddress &, const TBool, CTask *&)
Either creates a task to send an unbind request or returns an existing task if a matching one already exists
-
leave
-
KErrNoMemory
HasSubModule(const TCFSubModuleNameF &)
Searches for a specified submodule name within this module
Initialising()
const
TBool
&
|
Initialising
|
(
|
)
|
const
|
Accessor method for the module initialisation state
Name()
Accessor method for the module name
NewL(MBindManagerNotify *, const TCFModuleNameF &, TransactionId &, const RCFChannel::TMsgQueues &, const RCFChannel::TMsgQueues &)
Generates a new
CModule
object
-
leave
-
KErrNoMemory
Parameters
MBindManagerNotify
* aNotifier
|
bindmanager object to report events to
|
const
TCFModuleNameF
& aModule
|
name of module
|
TransactionId
& aTransactionId
|
xx
|
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
|
NumSubModules()
TInt
|
NumSubModules
|
(
|
)
|
const
|
Returns the number of submodules within this module
ReserveSpaceInSendQueue()
TInt
|
ReserveSpaceInSendQueue
|
(
|
)
|
|
RunL()
void
|
RunL
|
(
|
)
|
[protected, virtual]
|
Active object RunL method, called when data becomes available on the receive queue
-
leave
-
SendL(const TCFMessage &)
Public method to send a message to a comms server or CPM
-
leave
-
KErrNoMemory
Parameters
const
TCFMessage
& aMessage
|
the message to be sent
|
SetInitialising(const TBool)
void
|
SetInitialising
|
(
|
const
TBool
|
aInitialising
|
)
|
|
Set method for the module initialisation state
Parameters
const
TBool
aInitialising
|
set true if module is initialising
|
SubModuleNameRefL(const TCFSubModuleAddress &)
Provides a reference to a local copy of the submodule name passed as a parameter which is guaranteed to last the lifetime of the cmodule
-
leave
-
KErrNoMemory
Member Data Documentation
TCFSubModuleNameF * iDiscoveryArray
TBool
iInitialising
TBool
|
iInitialising
|
[private]
|
MBindManagerNotify * iNotifier
CCommsChannelSendQueue * iSendQueue
RArray< TCFSubModuleAddress > iSubModuleAddrs
RArray< TCFSubModuleNameF > iSubModuleNames
TDblQue< CTask > iTaskList
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.