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