sensorfw
alssensor_i.h
Go to the documentation of this file.
27#ifndef ALSSENSOR_I_H
28#define ALSSENSOR_I_H
29
30#include <QtDBus/QtDBus>
31
32#include "datatypes/unsigned.h"
33#include "abstractsensor_i.h"
34
42{
43 Q_OBJECT
44 Q_DISABLE_COPY(ALSSensorChannelInterface)
45 Q_PROPERTY(Unsigned lux READ lux)
46
47public:
51 static const char* staticInterfaceName;
52
61
68
75 ALSSensorChannelInterface(const QString& path, int sessionId);
76
84 static const ALSSensorChannelInterface* listenInterface(const QString& id);
85
93 static ALSSensorChannelInterface* controlInterface(const QString& id);
94
101 static ALSSensorChannelInterface* interface(const QString& id);
102
103protected:
104 virtual bool dataReceivedImpl();
105
106Q_SIGNALS:
112 void ALSChanged(const Unsigned& value);
113};
114
115namespace local {
117}
118
119#endif
Base class for sensor interface.
Client interface for accessing ambient light sensor.
Definition: alssensor_i.h:42
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
Unsigned lux()
Get latest ambient light reading from sensor daemon.
void ALSChanged(const Unsigned &value)
Sent when measured ambient light intensity has changed.
static const ALSSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
ALSSensorChannelInterface(const QString &path, int sessionId)
Constructor.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static ALSSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: alssensor_i.h:51
static ALSSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
Base-class for client facades of different sensor types.
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
::ALSSensorChannelInterface ALSSensor
Definition: alssensor_i.h:116
QObject based datatype for TimedUnsigned.