sensorfw: qt-api/lidsensor_i.h Source File

sensorfw

lidsensor_i.h
Go to the documentation of this file.
1
26 #ifndef LIDSENSOR_I_H
27 #define LIDSENSOR_I_H
28
29 #include <QtDBus/QtDBus>
30
31 #include "datatypes/liddata.h"
32 #include "abstractsensor_i.h"
33
37 class LidSensorChannelInterface : public AbstractSensorChannelInterface
38 {
39 Q_OBJECT
40 Q_DISABLE_COPY(LidSensorChannelInterface)
41 Q_PROPERTY(LidData closed READ closed)
42
43 public:
47 static const char* staticInterfaceName;
48
56 static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
57
63 LidData closed();
64
71 LidSensorChannelInterface(const QString& path, int sessionId);
72
80 static const LidSensorChannelInterface* listenInterface(const QString& id);
81
89 static LidSensorChannelInterface* controlInterface(const QString& id);
90
97 static LidSensorChannelInterface* interface(const QString& id);
98
99 protected:
100 virtual bool dataReceivedImpl();
101
102 Q_SIGNALS:
108 void lidChanged(const LidData& value);
109 };
110
111 namespace local {
112 typedef ::LidSensorChannelInterface LidSensor;
113 }
114
115 #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
LidData
Datatype for device lid events.
Definition: liddata.h:36
LidSensorChannelInterface
Client interface for listening to lid sensor state changes.
Definition: lidsensor_i.h:38
LidSensorChannelInterface::closed
LidData closed()
Get latest lid reading from sensor daemon.
LidSensorChannelInterface::closed
LidData closed
Definition: lidsensor_i.h:41
LidSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: lidsensor_i.h:47
LidSensorChannelInterface::controlInterface
static LidSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
LidSensorChannelInterface::interface
static LidSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
LidSensorChannelInterface::listenInterface
static const LidSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
LidSensorChannelInterface::lidChanged
void lidChanged(const LidData &value)
Sent when measured ambient light intensity has changed.
LidSensorChannelInterface::LidSensorChannelInterface
LidSensorChannelInterface(const QString &path, int sessionId)
Constructor.
LidSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
LidSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
liddata.h
Datatype for device tap events.
local
Definition: abstractsensor_i.h:516
local::LidSensor
::LidSensorChannelInterface LidSensor
Definition: lidsensor_i.h:112