sensorfw
stepcountersensor_i.h
Go to the documentation of this file.
1 
29 #ifndef STEPCOUNTERSENSOR_I_H
30 #define STEPCOUNTERSENSOR_I_H
31 
32 #include <QtDBus/QtDBus>
33 
34 #include "datatypes/unsigned.h"
35 #include "abstractsensor_i.h"
36 
44 {
45  Q_OBJECT
46  Q_DISABLE_COPY(StepCounterSensorChannelInterface)
47  Q_PROPERTY(Unsigned steps READ steps)
48 
49 public:
53  static const char* staticInterfaceName;
54 
62  static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
63 
70 
77  StepCounterSensorChannelInterface(const QString& path, int sessionId);
78 
86  static const StepCounterSensorChannelInterface* listenInterface(const QString& id);
87 
96 
103  static StepCounterSensorChannelInterface* interface(const QString& id);
104 
105 protected:
106  virtual bool dataReceivedImpl();
107 
108 Q_SIGNALS:
114  void StepCounterChanged(const Unsigned& value);
115 };
116 
117 namespace local {
118  typedef ::StepCounterSensorChannelInterface StepCounterSensor;
119 }
120 
121 #endif
Base class for sensor interface.
Base-class for client facades of different sensor types.
Client interface for accessing stepcounter sensor.
StepCounterSensorChannelInterface(const QString &path, int sessionId)
Constructor.
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static StepCounterSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
static const StepCounterSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
void StepCounterChanged(const Unsigned &value)
Sent when measured step count has changed.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Unsigned steps()
Get latest step count from sensor daemon.
static StepCounterSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
::StepCounterSensorChannelInterface StepCounterSensor
QObject based datatype for TimedUnsigned.