CSensrvPluginProxy Class Reference
class CSensrvPluginProxy : public CBase |
Manages single plugin and transactions related to it
Constructor & Destructor Documentation
CSensrvPluginProxy(CSensrvProxyManager &, TUid)
Parameters
CSensrvProxyManager & aParent | Reference to proxy manager. |
TUid aImplementationUid | Implementation UID required to load plugin. |
~CSensrvPluginProxy()
~CSensrvPluginProxy | ( | ) | [virtual] |
Member Functions Documentation
AddChannelChangeListener()
void | AddChannelChangeListener | ( | ) | |
Increments dynamic channel change listener count
ChannelInfoList()
Gets a reference for plugin channel info array. Called from both threads.
CleanupInitializePlugin(TAny *)
void | CleanupInitializePlugin | ( | TAny * | aAny | ) | [private, static] |
Cleanupitem callback for plugin initialization
Parameters
TAny * aAny | The proxy pointer |
CleanupPlugin()
Cleans up the plugin, its thread and SSY mediator. Only called from server thread.
CompleteTransaction(CSensrvTransaction *)
Completes transaction after it has been handled by SSY. Only called from server thread.
ConstructL()
void | ConstructL | ( | ) | [private] |
Second phase of construction.
DispatchMessage(CSensrvMessage &, TSensrvChannelId)
Handles client message. Message completion responsibility transfers. Called only within server thread.
DynamicChannelInfoList()
Gets a reference for plugin dynamic channel info array. Called from both threads.
EnqueueDelayedInitializeTransaction()
TInt
| EnqueueDelayedInitializeTransaction | ( | ) | [private] |
Enqueues delayd initialization if load queue is empty Only called from server thread.
FindChannel(const TSensrvChannelInfo &, const RSensrvResourceChannelInfoList &)
Finds channel from info list that matches to given channel info
FindChannel(const RSensrvChannelInfoList &, const TSensrvChannelInfo &)
Finds channel from info list that matches to given channel info
GetChannelForId(TSensrvChannelId)
Gets the channel object that handles the specified channel.
GetChannelInfoForId(TSensrvChannelId)
Gets channel info matching specified channel id
GetTotalListenerCount()
TInt
| GetTotalListenerCount | ( | ) | [private] |
Gets listener count of all channels Called only from server thread.
HandleNextTransaction()
void | HandleNextTransaction | ( | ) | [private] |
Handle next queued transaction in specified queue. If there was an error, transaction is completed with error. Only called from server thread.
HandleSsyNotifyFailure()
void | HandleSsyNotifyFailure | ( | ) | |
Handles notify failure at SSY
HandleTransactionTimeout()
void | HandleTransactionTimeout | ( | ) | |
Transaction timeout handling.
ImplementationUid()
const TUid | ImplementationUid | ( | ) | const [inline] |
Gets plugin implementation UID Called from SSY thread.
InitializeChannelData(const CImplementationInformation &)
Initializes plugin channel data.
InitializePluginL()
Initializes plugin thread and mediators. Also queues load transaction. Called only within server thread.
- Since
- S60 5.0
- Exceptions
-
Normal |
Symbian error code
|
IsChannelSupported(TSensrvChannelId)
Check if this proxy supports specified channel Called only within server thread.
IsInitialized()
TBool
| IsInitialized | ( | ) | const [inline] |
Gets proxy initialization status Called from server thread
IsMarkedForDeletion()
TBool
| IsMarkedForDeletion | ( | ) | const [inline] |
Checks if proxy is marked for deletion Called from server thread
Mutex()
Gets reference to the mutex controlling access to shared resources between server and plugin threads.
NewL(CSensrvProxyManager &, TUid)
Two phase constructor
- Since
- S60 5.0
- Exceptions
-
KErrNoMemory |
Out of memory
|
Parameters
CSensrvProxyManager & aParent | Reference to proxy manager. |
TUid aImplementationUid | Implementation UID required to load plugin. |
PluginState()
Gets plugin state. Called from both threads.
PreviousSsyLoadFailed()
TBool
| PreviousSsyLoadFailed | ( | ) | const [inline] |
Checks SSY load fail indicator
ProxyManager()
Gets reference to the proxy manager Called from both threads.
QueueTransaction(CSensrvTransaction *, TBool)
Queues new transaction to proxy's queue. Ownership of the transaction transfers to queue. If queue is empty, also calls HandleNextTransaction. Only called from server thread.
Parameters
CSensrvTransaction * aTransaction | The transaction to queue |
TBool aLast | If ETrue, transaction is added to the end of the queue |
RemoveChannelChangeListener()
void | RemoveChannelChangeListener | ( | ) | |
Decrements dynamic channel change listener count
RemovedChannelsInfoList()
Gets a reference for plugin removed channels info array. Called from both threads.
ServerMediator()
Gets pointer to server mediator. Called from both threads.
SessionTerminated(CSensrvSession *)
Cleans up session related data.
SetDeletionFlag()
void | SetDeletionFlag | ( | ) | [inline] |
Marks proxy for deletion Called from server thread
SetPluginState(TPluginState)
Sets plugin state. Called only from server thread.
SsyMediator()
Gets pointer to SSY mediator. Called from both threads.
SsyThreadFunction(TAny *)
TInt
| SsyThreadFunction | ( | TAny * | aParameter | ) | [private, static] |
SSY thread main method. Only called from SSY thread.
Parameters
TAny * aParameter | CSensrvPluginProxy pointer. |
SsyThreadTerminated()
void | SsyThreadTerminated | ( | ) | |
Called by thread monitor when it detects that SSY thread is no longer running or has explicitly killed it.
StartUnloadTimerIfNeeded()
void | StartUnloadTimerIfNeeded | ( | ) | |
Check if plugin has no clients, and start unload timer if so.
StopUnloadTimer()
void | StopUnloadTimer | ( | ) | [inline] |
Stop unload timer if it is active
TimerFired(TInt)
void | TimerFired | ( | TInt | aTimerId | ) | |
Called when the unload timer fires. Cleanus up the SSY
Parameters
TInt aTimerId | Timer identifier to id which timer fired. |
TransactionHandledAtSsy(CSensrvTransaction *)
Notifies proxy that a transaction has been handled by plugin. Called only from server thread.
TransactionMonitor()
Gets a reference to transaction monitor. Called from both threads.
UpdateChannelInfoLists()
TInt
| UpdateChannelInfoLists | ( | ) | [private] |
Grabs raw channel info data from SSY mediator and Updates channel info and removed channel info lists.
Member Enumerations Documentation
Enum TPluginState
Enumeration from plugin states.
Enumerators
EPluginStateUninitialized | |
EPluginStateThreadInitializing | |
EPluginStateThreadInitialized | |
EPluginStateLoaded | |
EPluginStateUnloading | |
EPluginStateUnloaded | |
Member Data Documentation
TInt
iChannelChangeListenerCount
TInt
| iChannelChangeListenerCount | [private] |
Channel change listener counter
RSensrvResourceChannelInfoList
iChannelInfoList
Active channels provided by the plugin
RPointerArray< CSensrvChannel > iChannelList
List of channels opened at least for one client. Own. (the channels in list)
TBool
iDeletionFlag
TBool
| iDeletionFlag | [private] |
If true, proxy is marked for deletion and will be deleted soon.
RSensrvResourceChannelInfoList
iDynamicChannelInfoList
Dynamic channels provided by the plugin
TUid
iImplementationUid
TUid
| iImplementationUid | [private] |
Implementation UID needed to load plugin.
TBool
iIsInitialized
TBool
| iIsInitialized | [private] |
Indicates that this proxy has finished its initialization. Note that this doesn't mean channels are actually available or that plugins are loaded successfully.
CSensrvTransactionQueue * iLoadWaitQueue
Holds load transaction and channel related transactions until plugin has finished loading. Queued transactions are owned by the queue. Own.
RMutex
iMutex
Used to control access to data shared by server and plugin threads.
TPluginState
iPluginState
Stores the state of plugin controlled by this proxy.
TBool
iPreviousSsyLoadFailed
TBool
| iPreviousSsyLoadFailed | [private] |
Indicator of previous SSY load fail. If ETrue, the load attempt was failed.
CSensrvProxyManager & iProxyManager
Reference to proxy manager Own.
RSensrvResourceChannelInfoList
iRemovedChannelsInfoList
Channels that have been provided by the plugin at one time, but have subsequently been removed. Removed channels are stored so that original channel ids can be recovered should they be re-registered.
CSensrvServerMediator * iServerMediator
Mediator used to pass transactions from plugin thread to main thread Own.
CSensrvSsyMediator * iSsyMediator
Mediator used to pass transactions from main thread to plugin thread Own technically, but actual deletion is done in static SsyThreadFunction, after SSY active scheduler loop terminates.
CSensrvThreadMonitor * iThreadMonitor
Monitors plugin threads existence. Own.
CSensrvTransactionMonitor * iTransactionMonitor
Monitors transactions Own.
CSensrvTimer * iUnloadTimer
Timer used to unload plugin if it has no clients for a certain period of time. Own.
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.