MSsyCallback Class Reference

class MSsyCallback

Baseclass for a callback instance. SSY communicates with a sensor server through this interface.

Member Functions Documentation

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

voidBufferFilled(TSensrvChannelIdaChannelId,
TIntaWriteCount,
TUint8 *&aNewBuffer,
TInt &aNewCount
)[pure virtual]

SSY notifies a sensor server that a write buffer is filled. SSY receives a new buffer and its size as a reference parameter.

Since
S60 5.0

Parameters

TSensrvChannelId aChannelIdIdenfies the channel this notification is related to.
TInt aWriteCountNumber of objects written to buffer. A negative number indicates Symbian OS error code. If there is error channel will be closed by the sensor server, and the contents of aNewBuffer and aNewCount return parameters are undefined.
TUint8 *& aNewBufferPointer to a new data buffer
TInt & aNewCountIndicates a new data buffer size as a count of the data objects

ChannelClosed(TSensrvChannelId)

voidChannelClosed(TSensrvChannelIdaChannelId)[pure virtual]

Response to the channel close request. SSY call this function when channel is closed after the channel close request.

Since
S60 5.0

Parameters

TSensrvChannelId aChannelIdChannel Id of the channel for which this response is delivered.

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

voidChannelOpened(TSensrvChannelIdaChannelId,
TIntaErrorCode,
MSsyChannelDataProvider *aChannelDataProvider,
MSsyPropertyProvider *aSensorPropertyProvider
)[pure virtual]

Response to the channel open request. SSY calls this function when SSY initiatation is done after the channel open request.

Since
S60 5.0

Parameters

TSensrvChannelId aChannelIdChannel Id of the channel for which this response is delivered.
TInt aErrorCodeSymbian OS error code for the operation.
MSsyChannelDataProvider * aChannelDataProviderPointer to channel data provider instance. Must be a non-NULL, unless there was an error.
MSsyPropertyProvider * aSensorPropertyProviderPointer to sensor property provider instance. Must be non-NULL, unless there was an error.

GetCallbackInterfaceL(TUid, TAny *&)

voidGetCallbackInterfaceL(TUidaInterfaceUid,
TAny *&aInterface
)[pure virtual]

Returns a pointer to a specified interface - to allow future extension of this class without breaking binary compatibility

Since
S60 5.0

Parameters

TUid aInterfaceUidIdentifier of the interface to be retrieved
TAny *& aInterfaceA reference to a pointer that retrieves the specified interface.

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

voidPropertyChanged(const TSensrvChannelIdaChannelId,
const RSensrvChannelList &aAffectedChannels,
const TSensrvProperty &aProperty
)[pure virtual]

SSY notifies that a sensor property value has changed and it has effect to specific channels which are listed in the parameter.

Since
S60 5.0

Parameters

const TSensrvChannelId aChannelIdChannel Id to be linked to this property changes message
const RSensrvChannelList & aAffectedChannelsChannel Ids of the channels that are linked to the changed property. If the property change was initiated by sensor server using MSsyPropertyProvider::SetPropertyL, the channel linked to that property provider must not be added to this list. If this omission would leave aAffectedChannels list empty, there is no need to call PropertyChanged at all.
const TSensrvProperty & aPropertyNew values of the all changed properties.

RegisterChannelsL(RSensrvChannelInfoList &)

voidRegisterChannelsL(RSensrvChannelInfoList &aChannelInfoList)[pure virtual]

Register all channels implemented by SSY. Must initially be called during CSsyControl construction or it cannot be ensured that first clients will find the channels provided by SSY.

This method must also be called after CSsyControl construction, if the set of channels provided by SSY changes. All currently provided channels must be listed at each re-registration.

Note: If this method is called multiple times in rapid succession, it is not guaranteed that clients will get notifications about all intermediate changes. However, it is guaranteed that clients will know the final registered set.

Since
S60 5.0

Parameters

RSensrvChannelInfoList & aChannelInfoListChannel info list where SSY must add all channel info objects of channels it provides. The sensor server assigns the channel id to all channel info objects in the list. If a channel is exact match to a previously registered channel, it will be assigned the same channel id as previously. If the list is empty, this method leaves with KErrArgument, as SSY with no channels is not usable.