sensorfw: qt-api/stepcountersensor_i.h Source File

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
43 class StepCounterSensorChannelInterface : public AbstractSensorChannelInterface
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
69 Unsigned steps();
70
77 StepCounterSensorChannelInterface(const QString& path, int sessionId);
78
86 static const StepCounterSensorChannelInterface* listenInterface(const QString& id);
87
95 static StepCounterSensorChannelInterface* controlInterface(const QString& id);
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
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
StepCounterSensorChannelInterface
Client interface for accessing stepcounter sensor.
Definition: stepcountersensor_i.h:44
StepCounterSensorChannelInterface::StepCounterSensorChannelInterface
StepCounterSensorChannelInterface(const QString &path, int sessionId)
Constructor.
StepCounterSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
StepCounterSensorChannelInterface::steps
Unsigned steps
Definition: stepcountersensor_i.h:47
StepCounterSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
StepCounterSensorChannelInterface::controlInterface
static StepCounterSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
StepCounterSensorChannelInterface::listenInterface
static const StepCounterSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
StepCounterSensorChannelInterface::StepCounterChanged
void StepCounterChanged(const Unsigned &value)
Sent when measured step count has changed.
StepCounterSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: stepcountersensor_i.h:53
StepCounterSensorChannelInterface::steps
Unsigned steps()
Get latest step count from sensor daemon.
StepCounterSensorChannelInterface::interface
static StepCounterSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
Unsigned
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
local
Definition: abstractsensor_i.h:516
local::StepCounterSensor
::StepCounterSensorChannelInterface StepCounterSensor
Definition: stepcountersensor_i.h:118
unsigned.h
QObject based datatype for TimedUnsigned.