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 ()
void AffectedChannels ( TSensrvChannelId , MSsyPropertyProvider *, RSensrvChannelList *)
void AvailabilityAffectedChannels ( TSensrvChannelId , MSsyPropertyProvider *, RSensrvChannelList *, TSensrvAvailability )
void BufferFilled ( TSensrvChannelId , TInt , TUint8 *&, TInt &)
CSensrvTransaction * ChannelChangeTransaction ()
void ChannelClosed ( TSensrvChannelId )
void ChannelOpened ( TSensrvChannelId , TInt , MSsyChannelDataProvider *, MSsyPropertyProvider *)
void Cleanup ()
void Destruct ()
void GetCallbackInterfaceL ( TUid , TAny *&)
TInt Initialize ()
CSensrvSsyMediator * NewL ( CSensrvPluginProxy *)
void PropertyChanged (const TSensrvChannelId , const RSensrvChannelList &, const TSensrvProperty &)
TAny ** RawInfos ()
void RegisterChannelsL ( RSensrvChannelInfoList &)
Protected Member Functions
void HandleNotifyFailure ()
void HandleTransaction ( CSensrvTransaction *)
Private Member Functions
CSensrvSsyMediator ()
void ConstructL ()
void GetAffectedChannels (const TSensrvChannelId &, MSsyPropertyProvider *, RSensrvChannelList *)
void GetAvailabilityAffectedChannels (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 *)

void AffectedChannels ( TSensrvChannelId aChannelId,
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)

void AvailabilityAffectedChannels ( TSensrvChannelId aChannelId,
MSsyPropertyProvider * aSensorPropertyProvider,
RSensrvChannelList * aAvailabilityAffectedChannels,
TSensrvAvailability aValue
)

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 &)

void BufferFilled ( TSensrvChannelId aChannelId,
TInt aWriteCount,
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)

void ChannelClosed ( TSensrvChannelId aChannelId )

Parameters

TSensrvChannelId aChannelId

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

void ChannelOpened ( TSensrvChannelId aChannelId,
TInt aErrorCode,
MSsyChannelDataProvider * aChannelDataProvider,
MSsyPropertyProvider * aSensorPropertyProvider
)

Parameters

TSensrvChannelId aChannelId
TInt aErrorCode
MSsyChannelDataProvider * aChannelDataProvider
MSsyPropertyProvider * aSensorPropertyProvider

Cleanup()

void Cleanup ( )

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()

void ConstructL ( ) [private]

2nd phase of construction

Since
S60 5.0

Destruct()

void Destruct ( )

Used to destruct object without calling destructor.

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

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

Gets all affected channels.

Since
S60 5.0

Parameters

const TSensrvChannelId & aChannelId The channel identifier
MSsyPropertyProvider * aSensorPropertyProvider The property provider.
RSensrvChannelList * aAffectedChannels

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

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

Gets all availability affected channels.

Since
S60 5.0

Parameters

const TSensrvChannelId & aChannelId The channel identifier
MSsyPropertyProvider * aSensorPropertyProvider The property provider.
RSensrvChannelList * aAvailabilityAffectedChannels
const TSensrvAvailability & aValue

GetCallbackInterfaceL(TUid, TAny *&)

void GetCallbackInterfaceL ( TUid aInterfaceUid,
TAny *& aInterface
)

Parameters

TUid aInterfaceUid
TAny *& aInterface

HandleNotifyFailure()

void HandleNotifyFailure ( ) [protected, virtual]

Handles notify failure

Since
S60 5.0

HandleTransaction(CSensrvTransaction *)

void HandleTransaction ( 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 * aTransaction The 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 * aProxy The 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 & aChannel Channel where the listener belongs to.
CSensrvChannelListener & aListener Listener of the process which is setting the property value.
const RSensrvChannelList & aAffectedChannels Return list of the channel which will be affected if the property value will be set.

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

void PropertyChanged ( const TSensrvChannelId aChannelId,
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 &)

void RegisterChannelsL ( 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.