You can retrieve a list of sensor channels that are available for a particular sensor type. Once you get the list of sensor channels that are active, you can perform any required operations such as configuring sensor channel properties, controlling sensor channels and so on.
The channelInfoList contains all the double tapping channels that are found. If several matching channels are found, you can select the required channel by examining the content of channel information objects inside channelInfoList.
This following code shows how to find double tapping channels for accelerometer sensor:
..... ...... /Construct a channel finder. CSensrvChannelFinder* channelFinder; channelFinder = CSensrvChannelFinder::NewL(); CleanupStack::PushL( channelFinder ); // to store list of found channels. RSensrvChannelInfoList channelInfoList; //Create and fill channel search criteria. //In this example double tapping channel is searched. TSensrvChannelInfo channelInfo; channelInfo.iChannelType = KSensrvChannelTypeIdAccelerometerDoubleTappingData; //Find the double tapping channel channelFinder->FindChannelsL( channelInfoList, channelInfo ); CleanupStack::PopAndDestroy( channelFinder ); // finder not needed any more if( channelInfoList.Count() != 1 ) { //The device does not support double tapping channel or //there are several double tapping channels. } else { //double tapping channel found } ..... ....
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.