CSensrvSsyMediator Class Reference

class CSensrvSsyMediator : public CSensrvMediatorBase

Mediates control flow from server main thread to plugin thread

Since
S60 5.0

Inherits from

Public Member Functions
~CSensrvSsyMediator()
voidAffectedChannels(TSensrvChannelId, MSsyPropertyProvider *, RSensrvChannelList *)
voidAvailabilityAffectedChannels(TSensrvChannelId, MSsyPropertyProvider *, RSensrvChannelList *, TSensrvAvailability)
voidBufferFilled(TSensrvChannelId, TInt, TUint8 *&, TInt &)
CSensrvTransaction *ChannelChangeTransaction()
voidChannelClosed(TSensrvChannelId)
voidChannelOpened(TSensrvChannelId, TInt, MSsyChannelDataProvider *, MSsyPropertyProvider *)
voidCleanup()
voidDestruct()
voidGetCallbackInterfaceL(TUid, TAny *&)
TInt Initialize()
CSensrvSsyMediator *NewL(CSensrvPluginProxy *)
voidPropertyChanged(const TSensrvChannelId, const RSensrvChannelList &, const TSensrvProperty &)
TAny **RawInfos()
voidRegisterChannelsL(RSensrvChannelInfoList &)
Protected Member Functions
voidHandleNotifyFailure()
voidHandleTransaction(CSensrvTransaction *)
Private Member Functions
CSensrvSsyMediator()
voidConstructL()
voidGetAffectedChannels(const TSensrvChannelId &, MSsyPropertyProvider *, RSensrvChannelList *)
voidGetAvailabilityAffectedChannels(const TSensrvChannelId &, MSsyPropertyProvider *, RSensrvChannelList *, const TSensrvAvailability &)
TBool PolicyCheck(CSensrvChannel &, CSensrvChannelListener &, const RSensrvChannelList &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSensrvMediatorBase::BaseConstructL(CSensrvPluginProxy *)
CSensrvMediatorBase::BaseDestruct()
CSensrvMediatorBase::CSensrvMediatorBase()
CSensrvMediatorBase::CompleteRequest(TInt)
CSensrvMediatorBase::DoCancel()
CSensrvMediatorBase::Notify(CSensrvTransaction *)
CSensrvMediatorBase::RemoveAllTransactions()
CSensrvMediatorBase::RemoveSingleTransaction(CSensrvTransaction *)
CSensrvMediatorBase::RunError(TInt)
CSensrvMediatorBase::RunL()
CSensrvMediatorBase::SessionTerminated(CSensrvSession *)
CSensrvMediatorBase::~CSensrvMediatorBase()
Inherited Enumerations
CActive:TPriority
Private Attributes
CSensrvTransaction *iChannelChangeTransaction
TAny *iRawInfos
CSsyControl *iSsyControl
TBool iUnloading
Inherited Attributes
CActive::iStatus
CSensrvMediatorBase::iInitialized
CSensrvMediatorBase::iMutex
CSensrvMediatorBase::iProxy
CSensrvMediatorBase::iQueue
CSensrvMediatorBase::iThread

Constructor & Destructor Documentation

CSensrvSsyMediator()

CSensrvSsyMediator()[private]

C++ constructor

Since
S60 5.0

~CSensrvSsyMediator()

~CSensrvSsyMediator()[virtual]

Destructor.

Member Functions Documentation

AffectedChannels(TSensrvChannelId, MSsyPropertyProvider *, RSensrvChannelList *)

voidAffectedChannels(TSensrvChannelIdaChannelId,
MSsyPropertyProvider *aSensorPropertyProvider,
RSensrvChannelList *aAffectedChannels
)

Get all the affected channels

Since
S60 5.0

Parameters

TSensrvChannelId aChannelId
MSsyPropertyProvider * aSensorPropertyProvider
RSensrvChannelList * aAffectedChannels

AvailabilityAffectedChannels(TSensrvChannelId, MSsyPropertyProvider *, RSensrvChannelList *, TSensrvAvailability)

voidAvailabilityAffectedChannels(TSensrvChannelIdaChannelId,
MSsyPropertyProvider *aSensorPropertyProvider,
RSensrvChannelList *aAvailabilityAffectedChannels,
TSensrvAvailabilityaValue
)

Get all the availability property affected channels

Since
S60 5.0

Parameters

TSensrvChannelId aChannelId
MSsyPropertyProvider * aSensorPropertyProvider
RSensrvChannelList * aAvailabilityAffectedChannels
TSensrvAvailability aValue

BufferFilled(TSensrvChannelId, TInt, TUint8 *&, TInt &)

voidBufferFilled(TSensrvChannelIdaChannelId,
TIntaWriteCount,
TUint8 *&aNewBuffer,
TInt &aNewCount
)

Parameters

TSensrvChannelId aChannelId
TInt aWriteCount
TUint8 *& aNewBuffer
TInt & aNewCount

ChannelChangeTransaction()

CSensrvTransaction *ChannelChangeTransaction()[inline]

Get ETransTypeMediatorChannelsChanged transaction pointer

Since
S60 5.0

ChannelClosed(TSensrvChannelId)

voidChannelClosed(TSensrvChannelIdaChannelId)

Parameters

TSensrvChannelId aChannelId

ChannelOpened(TSensrvChannelId, TInt, MSsyChannelDataProvider *, MSsyPropertyProvider *)

voidChannelOpened(TSensrvChannelIdaChannelId,
TIntaErrorCode,
MSsyChannelDataProvider *aChannelDataProvider,
MSsyPropertyProvider *aSensorPropertyProvider
)

Parameters

TSensrvChannelId aChannelId
TInt aErrorCode
MSsyChannelDataProvider * aChannelDataProvider
MSsyPropertyProvider * aSensorPropertyProvider

Cleanup()

voidCleanup()

Notifies this SSY mediator that cleanup is needed. Since deletion must of SSY mediator must be done in SSY thread to avoid possible complications with various SSY implementations, proxy will not delete the SSY mediator directly, but use this method instead.

Since
S60 5.0

ConstructL()

voidConstructL()[private]

2nd phase of construction

Since
S60 5.0

Destruct()

voidDestruct()

Used to destruct object without calling destructor.

GetAffectedChannels(const TSensrvChannelId &, MSsyPropertyProvider *, RSensrvChannelList *)

voidGetAffectedChannels(const TSensrvChannelId &aChannelId,
MSsyPropertyProvider *aSensorPropertyProvider,
RSensrvChannelList *aAffectedChannels
)[private]

Gets all affected channels.

Since
S60 5.0

Parameters

const TSensrvChannelId & aChannelIdThe channel identifier
MSsyPropertyProvider * aSensorPropertyProviderThe property provider.
RSensrvChannelList * aAffectedChannels

GetAvailabilityAffectedChannels(const TSensrvChannelId &, MSsyPropertyProvider *, RSensrvChannelList *, const TSensrvAvailability &)

voidGetAvailabilityAffectedChannels(const TSensrvChannelId &aChannelId,
MSsyPropertyProvider *aSensorPropertyProvider,
RSensrvChannelList *aAvailabilityAffectedChannels,
const TSensrvAvailability &aValue
)[private]

Gets all availability affected channels.

Since
S60 5.0

Parameters

const TSensrvChannelId & aChannelIdThe channel identifier
MSsyPropertyProvider * aSensorPropertyProviderThe property provider.
RSensrvChannelList * aAvailabilityAffectedChannels
const TSensrvAvailability & aValue

GetCallbackInterfaceL(TUid, TAny *&)

voidGetCallbackInterfaceL(TUidaInterfaceUid,
TAny *&aInterface
)

Parameters

TUid aInterfaceUid
TAny *& aInterface

HandleNotifyFailure()

voidHandleNotifyFailure()[protected, virtual]

Handles notify failure

Since
S60 5.0

HandleTransaction(CSensrvTransaction *)

voidHandleTransaction(CSensrvTransaction *aTransaction)[protected, virtual]

Handles transaction. Handling depends on mediator type, so this must be implemented in inheriting class.

Since
S60 5.0

Parameters

CSensrvTransaction * aTransactionThe transaction to be handled.

Initialize()

TInt Initialize()[virtual]

Initializes the mediator. Must be called from thread this mediator mediates. If child class overloads this, base implementation must be called also.

Since
S60 5.0

NewL(CSensrvPluginProxy *)

CSensrvSsyMediator *NewL(CSensrvPluginProxy *aProxy)[static]

Two phase constructor

Since
S60 5.0
Exceptions
KErrNoMemory

Out of memory

Parameters

CSensrvPluginProxy * aProxyThe proxy controlling related plugin.

PolicyCheck(CSensrvChannel &, CSensrvChannelListener &, const RSensrvChannelList &)

TBool PolicyCheck(CSensrvChannel &aChannel,
CSensrvChannelListener &aListener,
const RSensrvChannelList &aAffectedChannels
)[private]

Checks that the client has enough priority to change the value of the property.

If there are no affected channels for this property, then check is always passed. If there are affected channels, then check is passed if the priority of the client is highest among the all clients of affected channels.

Since
S60 5.0

Parameters

CSensrvChannel & aChannelChannel where the listener belongs to.
CSensrvChannelListener & aListenerListener of the process which is setting the property value.
const RSensrvChannelList & aAffectedChannelsReturn list of the channel which will be affected if the property value will be set.

PropertyChanged(const TSensrvChannelId, const RSensrvChannelList &, const TSensrvProperty &)

voidPropertyChanged(const TSensrvChannelIdaChannelId,
const RSensrvChannelList &aAffectedChannels,
const TSensrvProperty &aProperty
)

Parameters

const TSensrvChannelId aChannelId
const RSensrvChannelList & aAffectedChannels
const TSensrvProperty & aProperty

RawInfos()

TAny **RawInfos()[inline]

Get raw channel infos pointer.

Since
S60 5.0

RegisterChannelsL(RSensrvChannelInfoList &)

voidRegisterChannelsL(RSensrvChannelInfoList &aChannelInfoList)

Parameters

RSensrvChannelInfoList & aChannelInfoList

Member Data Documentation

CSensrvTransaction * iChannelChangeTransaction

CSensrvTransaction *iChannelChangeTransaction[private]

Transaction for notifying channel registration changes. It is stored and reused to ensure it always exists, as the transaction is initiated by SSY. Own.

TAny * iRawInfos

TAny *iRawInfos[private]

Raw channel infos count and data. Allocated always on server main heap. Own.

CSsyControl * iSsyControl

CSsyControl *iSsyControl[private]

SSY plugin control interface. Own. Note that this is allocated in SSY thread heap, instead of server heap like SSY mediator.

TBool iUnloading

TBool iUnloading[private]

Indicates that unloading is requested.