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 
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 
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
Base class for sensor interface.
Client interface for accessing ambient light sensor.
Definition: alssensor_i.h:42
static ALSSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
Unsigned lux()
Get latest ambient light reading from sensor daemon.
static const ALSSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
void ALSChanged(const Unsigned &value)
Sent when measured ambient light intensity has changed.
ALSSensorChannelInterface(const QString &path, int sessionId)
Constructor.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: alssensor_i.h:51
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
static ALSSensorChannelInterface * interface(const QString &id)
Request an 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.