CSensrvChannelFinder Class Reference

Link against: SensrvClient.lib


#include <
sensrvchannelfinder.h>

Detailed Description

The CSensrvChannelFinder class provides an API that allows clients to discover the sensor channels supported by Sensor Services and receive notifications when channels are installed and uninstalled.

The channel specific header files e.g. for orientation, acceleration, proximity, will document whether a secure id, vendor id or a set of capabilities, if any, is required by the client to be able to view a channel or receive notifications for it. See the channel specific header files for these requirements.

On instantiation of this class a session connection to the Sensor Server is made. The Sensor server is a transient server and is started, if not already running, when a session connection is made. The sensor server is shutdown when a device-configured timeout period expires after the last session connection has been dropped. The Sensor Server will not shutdown if there is a session connection to it.

Each item in RSensrvChannelInfoList returned by FindChannelsL() contains a channel Id which is only valid for the lifetime of the sensor server. If a client requires that this id remains unchanged then the client must ensure that an instance of either CSensrvChannelFinder or CSensrvChannel remains instantiated. This keeps a session connection with the server open which prevents the sensor server from shutting down.

See also:
CSensrvChannel
Dll sensrvclient.lib
Since:
S60 5.0

Public Member Functions

virtual void FindChannelsL (RSensrvChannelInfoList &aChannelList, const TSensrvChannelInfo &aSearchParameters)=0
 Retrieves a list of channels that meet the supplied search parameters.
virtual void SetChannelListenerL (MSensrvChannelListener *aChannelListener, const TSensrvChannelInfo &aSearchParameters)=0
 Listens for channels that meet the supplied search parameters.
 CSensrvChannelFinder ()
 Default constructor.

Static Public Member Functions

static IMPORT_C CSensrvChannelFinderNewL ()
 Two-phased constructor.
static IMPORT_C CSensrvChannelFinderNewLC ()
 Two-phased constructor.

Constructor & Destructor Documentation

CSensrvChannelFinder::CSensrvChannelFinder  ) 
 

Default constructor.


Member Function Documentation

virtual void CSensrvChannelFinder::FindChannelsL RSensrvChannelInfoList aChannelList,
const TSensrvChannelInfo aSearchParameters
[pure virtual]
 

Retrieves a list of channels that meet the supplied search parameters.

Only channels for which the client has the required secure id, vendor id and capabilities will be returned. See class description for further information.

Since:
S60 5.0
Parameters:
aChannelList List of all channels matching the supplied search parameters. Each TSensrvChannelInfo instance in the list can be used to open a channel. Empty list is returned if no matching channels are found.
aSearchParameters Parameters for which matching channels are to be found. To omit a field from the search use zero (if integer) or empty string (if descriptor). If all fields are zero or empty string all channels provided by the system will be returned. ChannelId, DataItemSize and Reserved data will be ignored if set.
Leave:
One of the system-wide error codes
static IMPORT_C CSensrvChannelFinder* CSensrvChannelFinder::NewL  )  [static]
 

Two-phased constructor.

Since:
S60 5.0
Returns:
Pointer to created CSensrvChannelFinder object
Leave:
KErrNoMemory
Leave:
One of the system-wide error codes
static IMPORT_C CSensrvChannelFinder* CSensrvChannelFinder::NewLC  )  [static]
 

Two-phased constructor.

Since:
S60 5.0
Returns:
Pointer to created CSensrvChannelFinder object that is placed on the cleanup stack.
Leave:
KErrNoMemory
Leave:
One of the system-wide error codes
virtual void CSensrvChannelFinder::SetChannelListenerL MSensrvChannelListener aChannelListener,
const TSensrvChannelInfo aSearchParameters
[pure virtual]
 

Listens for channels that meet the supplied search parameters.

Only channels for which the client has the required secure id, vendor id and capabilities will be returned. See class description. Listening can be stopped by providing a NULL parameter for the aChannelListener argument.

Since:
S60 5.0
Parameters:
aChannelListener Pointer to channel listener callback instance. The channel listener must be valid until the CSensrvChannelFinder object is destroyed or listening has been stopped. Listening can be stopped using a NULL parameter.
aSearchParameters Parameters for which matching channel notifications are to be provided. To omit a field from the search use zero (if integer) or empty string (if descriptor). If all fields are zero or empty string all channels provided by the system will be returned. ChannelId, DataItemSize and Reserved data will be ignored if set.
Leave:
KErrAlreadyExists if channel listener has already been set
Leave:
One of the system-wide error codes

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top