Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties

ProximitySensorChannelInterface Class Reference

Client interface for listening proximity sensor state changes. More...

#include <proximitysensor_i.h>

Inheritance diagram for ProximitySensorChannelInterface:
AbstractSensorChannelInterface

List of all members.

Signals

void dataAvailable (const Unsigned &data)
 Sent when new measurement data has become available.
void reflectanceDataAvailable (const Proximity &data)
 Sent when new measurement data has become available.

Public Member Functions

Unsigned proximity ()
 Get latest proximity reading from sensor daemon.
Proximity proximityReflectance ()
 Get latest proximity reading from sensor daemon.
 ProximitySensorChannelInterface (const QString &path, int sessionId)
 Constructor.

Static Public Member Functions

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

Static Public Attributes

static const char * staticInterfaceName
 Get 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.

Properties

Unsigned proximity
Proximity proximityReflectance

Detailed Description

Client interface for listening proximity sensor state changes.

Definition at line 39 of file proximitysensor_i.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
path path.
sessionId session id.

Member Function Documentation

static ProximitySensorChannelInterface* ProximitySensorChannelInterface::controlInterface ( const QString &  id  )  [static]

Request a control interface to the sensor.

Parameters:
id sensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.
void ProximitySensorChannelInterface::dataAvailable ( const Unsigned data  )  [signal]

Sent when new measurement data has become available.

Value in the passed data contains boolean information is the proximity sensor blocked or not.

Parameters:
data New measurement data.
Deprecated:
Use reflectanceDataAvailable(const Proximity&).
virtual bool ProximitySensorChannelInterface::dataReceivedImpl (  )  [protected, virtual]

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

Returns:
was read successful.

Implements AbstractSensorChannelInterface.

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

Create new instance of the class.

Parameters:
id Sensor ID.
sessionId Session ID.
Returns:
Pointer to new instance of the class.
static ProximitySensorChannelInterface* ProximitySensorChannelInterface::interface ( const QString &  id  )  [static]

Request an interface to the sensor.

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

Request a listening interface to the sensor.

Parameters:
id sensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.
Unsigned ProximitySensorChannelInterface::proximity (  ) 

Get latest proximity reading from sensor daemon.

Returns:
proximity reading. Non-zero value means that object is within proximity.
Deprecated:
Use proximityReflectance().
Proximity ProximitySensorChannelInterface::proximityReflectance (  ) 

Get latest proximity reading from sensor daemon.

Returns:
proximity reading.
void ProximitySensorChannelInterface::reflectanceDataAvailable ( const Proximity data  )  [signal]

Sent when new measurement data has become available.

Parameters:
data New measurement data.

Member Data Documentation

Get name of the D-Bus interface for this class.

Returns:
Name of the interface.

Definition at line 44 of file proximitysensor_i.h.


Property Documentation

Unsigned ProximitySensorChannelInterface::proximity [read]

Definition at line 43 of file proximitysensor_i.h.

Proximity ProximitySensorChannelInterface::proximityReflectance [read]

Definition at line 43 of file proximitysensor_i.h.


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