sensorfw: qt-api/alssensor_i.h Source File

sensorfw

alssensor_i.h
Go to the documentation of this file.
1
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
41 class ALSSensorChannelInterface : public AbstractSensorChannelInterface
42 {
43 Q_OBJECT
44 Q_DISABLE_COPY(ALSSensorChannelInterface)
45 Q_PROPERTY(Unsigned lux READ lux)
46
47 public:
51 static const char* staticInterfaceName;
52
60 static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
61
67 Unsigned lux();
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
103 protected:
104 virtual bool dataReceivedImpl();
105
106 Q_SIGNALS:
112 void ALSChanged(const Unsigned& value);
113 };
114
115 namespace local {
116 typedef ::ALSSensorChannelInterface ALSSensor;
117 }
118
119 #endif
abstractsensor_i.h
Base class for sensor interface.
ALSSensorChannelInterface
Client interface for accessing ambient light sensor.
Definition: alssensor_i.h:42
ALSSensorChannelInterface::controlInterface
static ALSSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
ALSSensorChannelInterface::lux
Unsigned lux
Definition: alssensor_i.h:45
ALSSensorChannelInterface::lux
Unsigned lux()
Get latest ambient light reading from sensor daemon.
ALSSensorChannelInterface::listenInterface
static const ALSSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
ALSSensorChannelInterface::ALSChanged
void ALSChanged(const Unsigned &value)
Sent when measured ambient light intensity has changed.
ALSSensorChannelInterface::ALSSensorChannelInterface
ALSSensorChannelInterface(const QString &path, int sessionId)
Constructor.
ALSSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
ALSSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: alssensor_i.h:51
ALSSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
ALSSensorChannelInterface::interface
static ALSSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
Unsigned
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
local
Definition: abstractsensor_i.h:516
local::ALSSensor
::ALSSensorChannelInterface ALSSensor
Definition: alssensor_i.h:116
unsigned.h
QObject based datatype for TimedUnsigned.