CSensrvChannel Class Reference
class CSensrvChannel : public CBase |
Implements channel related handling.
Private Member Functions |
---|
| CSensrvChannel(const TSensrvChannelInfo &, CSensrvPluginProxy &) |
void | CloseIfNeeded() |
void | ConstructL() |
void | DeleteListener(CSensrvSession *) |
CSensrvChannelListener * | FindListener(CSensrvSession *) |
RSensrvChannelList * | GetAffectedChannels() |
RSensrvChannelList * | GetAvailabilityAffectedChannels(TSensrvAvailability) |
TInt
| GetHighestChannelPriority(const RSensrvChannelList *, TSensrvChannelId &) |
TInt
| GetHighestListenerPriorityOfAffectedChannels(TInt &) |
TInt
| GetLowestChannelPriority(const RSensrvChannelList *, TSensrvChannelId &) |
void | HandleAvailabilityChange(const TSensrvProperty &) |
void | HandleAvailabilityChange(const TSensrvAvailability &) |
void | HandleDependencyOnClose(const TInt &) |
void | HandleDependencyOnOpen() |
void | HandleNextTransaction() |
void | HandleSetPropertySuccessIndOnCreateOrDelete() |
void | HandleSetPropertySuccessIndOnPropertyChange() |
TInt
| HandleStartListeningTransaction(CSensrvTransaction &) |
TInt
| HandleStopListeningTransaction(CSensrvTransaction &, TBool &) |
TSensrvResourceChannelInfo::TSensrvChannelGroup
| ReadChannelGroup() |
TInt
| SetAvailability(TSensrvChannelId, TSensrvProperty &, TSensrvAvailability, const TSecurityInfo &) |
TInt
| SetChannelAvailability(TSensrvChannelId, TSensrvChannelId, TSensrvProperty &) |
TInt
| SetChannelAvailability(TSensrvChannelId, TSensrvProperty &, TSensrvAvailability) |
void | SetChannelAvailable() |
void | SetChannelUnavailable() |
void | UpdateSetPropertySuccessIndToChannelListeners(CSensrvChannel &, TInt, TInt) |
Constructor & Destructor Documentation
CSensrvChannel(const TSensrvChannelInfo &, CSensrvPluginProxy &)
~CSensrvChannel()
~CSensrvChannel | ( | ) | [virtual] |
Member Functions Documentation
Buffer()
Gets data buffer pointer. Called from SSY thread.
ChannelClosed()
Indicates channel has been closed by SSY Called from SSY thread only.
ChannelGroup()
Gets channel group Called from server thread.
ChannelOpened(TInt, MSsyChannelDataProvider *, MSsyPropertyProvider *)
Indicates channel has been opened by SSY Called from SSY thread only.
Parameters
TInt aErrorCode | Indicates any error that occurred during channel opening. |
MSsyChannelDataProvider * aDataProvider | Pointer to channel data provider instance |
MSsyPropertyProvider * aSensorPropertyProvider | Pointer to sensor property provider instance |
CloseIfNeeded()
void | CloseIfNeeded | ( | ) | [private] |
Closes the channel to SSY if there are no listeners.
CompleteTransaction(CSensrvTransaction *)
Completes transaction after it has been handled by SSY. Only called from server thread.
ConditionEvaluatorL()
Creates a new condition evaluator or returns an existing one.
ConstructL()
void | ConstructL | ( | ) | [private] |
2nd phase of construction
DataAvailableTransaction()
Gets the persistent ETransTypeMediatorNewDataAvailable transaction. Called from SSY thread.
DataItemSize()
TInt
| DataItemSize | ( | ) | const [inline] |
Gets the data item size Called from server thread.
DataProvider()
Gets data provider pointer. Called from SSY thread.
DeleteListener(CSensrvSession *)
DispatchMessage(CSensrvMessage &)
Handles client message. Message completion responsibility transfers. Called only within server thread.
FindListener(CSensrvSession *)
Finds a listener by session.
ForceBufferFilled()
Forces buffer filled at SSY
ForceBufferFilledTransaction()
Gets the persistent ETransTypeMediatorForceBufferFilled transaction. Called from server thread.
ForceChannelCloseTransaction()
Gets the persistent ETransTypeMediatorForceChannelClose transaction. Called from SSY thread.
GetAffectedChannels()
Gets the affected channel list from SSY
GetAffectedClients(RArray< TInt > &, TSecureId)
Get clients of this channel. The client identified by aCallerSecureId is not added to the affected clients list.
Parameters
RArray< TInt > & aAffectedClients | On return contains client processes priorities for this channel. |
TSecureId aCallerSecureId | Identifies the listener which is filtered away. |
GetAvailabilityAffectedChannels(TSensrvAvailability)
Gets the affected channel list from SSY
GetHighestChannelPriority(const RSensrvChannelList *, TSensrvChannelId &)
Get channel from affected channels list with the highest priority
GetHighestListenerPriority(TInt &)
TInt
| GetHighestListenerPriority | ( | TInt & | aHighestPriority | ) | |
Gets the highest priority listener and its multiples from this channel.
Parameters
TInt & aHighestPriority | Stores the highest priority. |
GetHighestListenerPriorityOfAffectedChannels(TInt &)
TInt
| GetHighestListenerPriorityOfAffectedChannels | ( | TInt & | aHighestPriority | ) | [private] |
Gets the highest priority listener and its multiples from all affected channels.
Parameters
TInt & aHighestPriority | Stores the highest priority. |
GetListener(CSensrvSession *)
Gets listener for session.
GetLowestChannelPriority(const RSensrvChannelList *, TSensrvChannelId &)
Get channel from affected channels list with the lowest priority
HandleAvailabilityChange(const TSensrvProperty &)
Handles channel availability property change
HandleAvailabilityChange(const TSensrvAvailability &)
Handles channel availability property change
HandleDependencyOnClose(const TInt &)
void | HandleDependencyOnClose | ( | const TInt & | aPriority | ) | [private] |
Handles dependent channels on channel close
HandleDependencyOnOpen()
void | HandleDependencyOnOpen | ( | ) | [private] |
Handles dependent channels on channel open
HandleNextTransaction()
void | HandleNextTransaction | ( | ) | [private] |
Handles next transaction in queue. If first transaction is still executing or the queue is empty, does nothing.
HandleSetPropertySuccessIndOnCreateOrDelete()
void | HandleSetPropertySuccessIndOnCreateOrDelete | ( | ) | [private] |
Handles set property success indications on listener creation or deletion
HandleSetPropertySuccessIndOnPropertyChange()
void | HandleSetPropertySuccessIndOnPropertyChange | ( | ) | [private] |
Handles set property success indications on property change
HandleSsyNotifyFailure()
void | HandleSsyNotifyFailure | ( | ) | |
Handles notify failure at SSY
HandleStartListeningTransaction(CSensrvTransaction &)
Handles start data and condition listening transactions
HandleStopListeningTransaction(CSensrvTransaction &, TBool &)
Handles stop data and condition listening transactions
Parameters
CSensrvTransaction & aTransaction | Reference to the transaction. |
TBool & aSsyTransactionNeeded | Returns ETrue if SSY transaction is needed. |
ListenerCount()
TInt
| ListenerCount | ( | ) | const [inline] |
Gets the listener count. Called from server thread.
MaxBufferingCount()
TInt
| MaxBufferingCount | ( | ) | [inline] |
Gets maximum allowed buffering count. Called from server thread.
NewL(const TSensrvResourceChannelInfo &, CSensrvPluginProxy &)
Two phase constructor
- Since
- S60 5.0
- Exceptions
-
KErrNoMemory |
Out of memory
|
PropertyChangedTransaction()
Gets the persistent ETransTypeMediatorPropertyChanged transaction. Called from SSY thread.
PropertyProvider()
Gets property provider pointer. Called from SSY thread.
Proxy()
Gets parent proxy reference. Called from both threads.
RecalculateBufferingCount()
TInt
| RecalculateBufferingCount | ( | ) | |
Recalculates buffering count, if there is more than one client.
SessionTerminated(CSensrvSession *)
Cleans up session related data.
SetAvailability(TSensrvChannelId, TSensrvProperty &, TSensrvAvailability, const TSecurityInfo &)
Sets dependent channel availability
SetChannelAvailability(TSensrvChannelId, TSensrvChannelId, TSensrvProperty &)
Sets dependent channel availability
SetChannelAvailability(TSensrvChannelId, TSensrvProperty &, TSensrvAvailability)
Sets dependent channel availability
SetChannelAvailable()
void | SetChannelAvailable | ( | ) | [private] |
Handles channel availability property change to availabe
SetChannelUnavailable()
void | SetChannelUnavailable | ( | ) | [private] |
Handles channel availability property change to unavailabe
State()
Gets channel state. Called from both threads.
StoreChangedProperty(const TSensrvProperty &, const CSensrvSession *)
Store a changed property provided by SSY. Called from SSY thread only.
Parameters
const TSensrvProperty & aProperty | Property that has changed |
const CSensrvSession * aIgnoreSession | Do not store change for this session. Can be NULL. |
TakePropertySetControl(CSensrvChannelListener *)
Takes the property set control. Required priority checks must be done by client before using this method.
TakenPropertySetControl()
Gets the listener that has taken the property set control.
UpdateSetPropertySuccessIndToChannelListeners(CSensrvChannel &, TInt, TInt)
void | UpdateSetPropertySuccessIndToChannelListeners | ( | CSensrvChannel & | aChannel, |
| TInt | aHighestOfAffectedChannels, |
| TInt | aMultiplesOnAffectedChannels |
| ) | [private, static] |
Updated set property success indication to channel listeners
Parameters
CSensrvChannel & aChannel | Channel to update |
TInt aHighestOfAffectedChannels | Highest priority of affected channels |
TInt aMultiplesOnAffectedChannels | Multiples of highest priority listeners |
Member Enumerations Documentation
Enum TSensrvChannelState
Enumerators
EChannelStateClosed | |
EChannelStateOpen | |
EChannelStateListening | |
Member Data Documentation
CSensrvChannelBuffer * iChannelBuffer
TSensrvResourceChannelInfo
iChannelInfo
Channel info of this channel.
CSensrvTransactionQueue * iChannelQueue
Transaction queue for transactions targeting this channel. Own. iChannelQueue owns the queued transactions.
CSensrvConditionEvaluator * iConditionEvaluator
Condition evaluator plugin. Own.
CSensrvChannelListener * iCurrentSetPropertyControl
The channel listener that has taken the property set control. Not own.
CSensrvTransaction * iDataAvailableTransaction
Transaction for notifying new data from SSY to Server. It is stored and reused to both avoid repeatedly constructing and deleting it and to ensure it always exists, as the transaction is initiated by SSY. Own.
MSsyChannelDataProvider * iDataProvider
Data provider residing in SSY thread heap. Can safely be accessed only from SSY thread. Not Own, owned by SSY.
CSensrvTransaction * iForceBufferFilledTransaction
Transaction for notifying buffer filled must be forced. It is stored and reused to avoid repeatedly constructing and deleting it. Own.
CSensrvTransaction * iForceChannelCloseTransaction
Transaction for notifying channel close must be forced. It is stored and reused to ensure it always exists, as the transaction is initiated by SSY. Own.
TBool
iForcingBufferFilled
TBool
| iForcingBufferFilled | [private] |
Indicates outstanding explicit buffer fill request.
TInt
iHighestListenerPriority
TInt
| iHighestListenerPriority | [private] |
Highest listener priority of the channel.
TInt
iHighestListenerPriorityMultiples
TInt
| iHighestListenerPriorityMultiples | [private] |
Multiples of highest listener priority. If there are no listeners on this channel, value is zero. If there is single listener with the highest priority, value is one, etc.
TSensrvChannelId
iId
Channel identifier of this channel.
RPointerArray< CSensrvChannelListener > iListenerList
Channel listener array for open clients Listed listeners are owned.
TInt
iMaxBufferingCount
TInt
| iMaxBufferingCount | [private] |
Indicates maximum buffering count.
CSensrvTransaction * iPropertyChangedTransaction
Transaction for notifying property change from SSY to Server Own.
MSsyPropertyProvider * iPropertyProvider
Sensor property provider residing in SSY thread heap. Can safely be accessed only from SSY thread. Not Own, owned by SSY.
CSensrvPluginProxy & iProxy
TSensrvChannelState
iState
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.