sensorfw: qt-api/proximitysensor_i.h Source File

sensorfw

proximitysensor_i.h
Go to the documentation of this file.
1
27#ifndef PROXIMITYSENSOR_I_H
28#define PROXIMITYSENSOR_I_H
29
30#include <QtDBus/QtDBus>
31
32#include "abstractsensor_i.h"
33#include <datatypes/unsigned.h>
34#include <datatypes/proximity.h>
35
39 class ProximitySensorChannelInterface: public AbstractSensorChannelInterface
40{
41 Q_OBJECT
42 Q_DISABLE_COPY(ProximitySensorChannelInterface)
43 Q_PROPERTY(Unsigned proximity READ proximity);
44 Q_PROPERTY(Proximity proximityReflectance READ proximityReflectance);
45
46public:
52 static const char* staticInterfaceName;
53
61 static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
62
69 Unsigned proximity();
70
76 Proximity proximityReflectance();
77
84 ProximitySensorChannelInterface(const QString& path, int sessionId);
85
93 static const ProximitySensorChannelInterface* listenInterface(const QString& id);
94
102 static ProximitySensorChannelInterface* controlInterface(const QString& id);
103
110 static ProximitySensorChannelInterface* interface(const QString& id);
111
112protected:
113 virtual bool dataReceivedImpl();
114
115Q_SIGNALS:
124 void dataAvailable(const Unsigned& data);
125
131 void reflectanceDataAvailable(const Proximity& data);
132};
133
134namespace local {
135 typedef ::ProximitySensorChannelInterface ProximitySensor;
136}
137
138#endif
abstractsensor_i.h
Base class for sensor interface.
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
ProximitySensorChannelInterface
Client interface for listening proximity sensor state changes.
Definition: proximitysensor_i.h:40
ProximitySensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
Definition: proximitysensor_i.h:44
ProximitySensorChannelInterface::interface
static ProximitySensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
ProximitySensorChannelInterface::proximityReflectance
Proximity proximityReflectance
Definition: proximitysensor_i.h:43
ProximitySensorChannelInterface::dataAvailable
void dataAvailable(const Unsigned &data)
Sent when new measurement data has become available.
ProximitySensorChannelInterface::listenInterface
static const ProximitySensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
ProximitySensorChannelInterface::proximity
Unsigned proximity()
Get latest proximity reading from sensor daemon.
ProximitySensorChannelInterface::reflectanceDataAvailable
void reflectanceDataAvailable(const Proximity &data)
Sent when new measurement data has become available.
ProximitySensorChannelInterface::controlInterface
static ProximitySensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
ProximitySensorChannelInterface::proximity
Unsigned proximity
Definition: proximitysensor_i.h:43
ProximitySensorChannelInterface::proximityReflectance
Proximity proximityReflectance()
Get latest proximity reading from sensor daemon.
ProximitySensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
ProximitySensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
ProximitySensorChannelInterface::ProximitySensorChannelInterface
ProximitySensorChannelInterface(const QString &path, int sessionId)
Constructor.
Proximity
QObject facade for ProximityData.
Definition: proximity.h:38
Unsigned
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
local
Definition: abstractsensor_i.h:516
local::ProximitySensor
::ProximitySensorChannelInterface ProximitySensor
Definition: proximitysensor_i.h:135
proximity.h
QObject based datatype for ProximityData.
unsigned.h
QObject based datatype for TimedUnsigned.