sensorfw
TapSensorChannelInterface Class Reference

Client interface for accessing accelerometer based tap events. More...

#include <tapsensor_i.h>

Inheritance diagram for TapSensorChannelInterface:
AbstractSensorChannelInterface

List of all members.

Public Types

enum  TapSelection { Single = 1, Double, SingleDouble }
 Tap type selection. More...

Signals

void dataAvailable (const Tap &data)
 Sent when new tap event has occurred.

Public Member Functions

 TapSensorChannelInterface (const QString &path, int sessionId)
 Constructor.
void setTapType (TapSelection type)
 Set type of taps to be listened for.
TapSelection getTapType ()
 Get type of taps to be listened for.

Static Public Member Functions

static
AbstractSensorChannelInterface
factoryMethod (const QString &id, int sessionId)
 Create new instance of the class.
static const
TapSensorChannelInterface
listenInterface (const QString &id)
 Request a listening interface to the sensor.
static TapSensorChannelInterfacecontrolInterface (const QString &id)
 Request a control interface to the sensor.
static TapSensorChannelInterfaceinterface (const QString &id)
 Request an interface to the sensor.

Static Public Attributes

static const char * staticInterfaceName
 Name of the D-Bus interface for this class.

Protected Member Functions

virtual bool dataReceivedImpl ()
 Callback for subclasses in which they must read their expected data from socket.

Detailed Description

Client interface for accessing accelerometer based tap events.

Definition at line 43 of file tapsensor_i.h.


Member Enumeration Documentation

Tap type selection.

Enumerator:
Single 

Only listen single taps.

Double 

Only listen double taps.

SingleDouble 

Listen both single and double taps.

Definition at line 100 of file tapsensor_i.h.


Constructor & Destructor Documentation

TapSensorChannelInterface::TapSensorChannelInterface ( const QString &  path,
int  sessionId 
)

Constructor.

Parameters:
pathpath.
sessionIdsession ID.

Member Function Documentation

Request a control interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.
void TapSensorChannelInterface::dataAvailable ( const Tap data) [signal]

Sent when new tap event has occurred.

Parameters:
dataThe tap event.
virtual bool TapSensorChannelInterface::dataReceivedImpl ( ) [protected, virtual]

Callback for subclasses in which they must read their expected data from socket.

Returns:
was read successful.

Implements AbstractSensorChannelInterface.

static AbstractSensorChannelInterface* TapSensorChannelInterface::factoryMethod ( const QString &  id,
int  sessionId 
) [static]

Create new instance of the class.

Parameters:
idSensor ID.
sessionIdSession ID.
Returns:
Pointer to new instance of the class.

Get type of taps to be listened for.

Returns:
type of taps to be listened for.
static TapSensorChannelInterface* TapSensorChannelInterface::interface ( const QString &  id) [static]

Request an interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
static const TapSensorChannelInterface* TapSensorChannelInterface::listenInterface ( const QString &  id) [static]

Request a listening interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.

Set type of taps to be listened for.

Parameters:
typetype of tap to be listened for.

Member Data Documentation

Name of the D-Bus interface for this class.

Definition at line 52 of file tapsensor_i.h.


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