sensorfw
orientationsensor_i.h
Go to the documentation of this file.
27#ifndef ORIENTATIONSENSOR_I_H
28#define ORIENTATIONSENSOR_I_H
29
30#include <QtDBus/QtDBus>
31
32#include <datatypes/unsigned.h>
33#include "abstractsensor_i.h"
34
39{
40 Q_OBJECT
42 Q_PROPERTY(Unsigned orientation READ orientation)
43 Q_PROPERTY(int threshold READ threshold WRITE setThreshold)
44
45public:
49 static const char* staticInterfaceName;
50
59
67
74 int threshold();
75
82 void setThreshold(int value);
83
91
99 static const OrientationSensorChannelInterface* listenInterface(const QString& id);
100
109
117
118protected:
119 virtual bool dataReceivedImpl();
120
121Q_SIGNALS:
129};
130
131namespace local {
133}
134
135#endif /* ORIENTATIONSENSOR_I_H */
Base class for sensor interface.
Base-class for client facades of different sensor types.
Client interface for listening device orientation changes.
static OrientationSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
Unsigned orientation()
Get latest orientation reading from sensor daemon.
void setThreshold(int value)
Sets the currently used threshold value.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static const OrientationSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
OrientationSensorChannelInterface(const QString &path, int sessionId)
Constructor.
void orientationChanged(const Unsigned &orientation)
Sent when device orientation has changed.
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
int threshold()
Gets the currently used threshold value.
static OrientationSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
::OrientationSensorChannelInterface OrientationSensor
QObject based datatype for TimedUnsigned.