summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@jollamobile.com>2013-10-12 17:19:44 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-23 06:12:42 +0200
commit8aabcf1eb258aedc9c268d6c1de191747f4f4400 (patch)
treef7a2a8a23f400fc8c8eae4a533b07067923f0e28 /src/plugins/sensors/sensorfw/sensorfwsensorbase.h
parente4ff58731699e1202396f9ef5863f462fa1d9456 (diff)
make sensorfw plugin handle the sensord restarting.
This way, clients that are connected will continue to receive updates after the sensord has restarted, without the need to restart the sensor. Task-number: QTBUG-34050 Change-Id: I4a8fbca189764cf23a1453feae5c1fd9ed6911e7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/plugins/sensors/sensorfw/sensorfwsensorbase.h')
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwsensorbase.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/sensors/sensorfw/sensorfwsensorbase.h b/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
index 1c2aa0e0..2fc8238d 100644
--- a/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
+++ b/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
@@ -43,17 +43,18 @@
#ifndef SENSORFWSENSORBASE_H
#define SENSORFWSENSORBASE_H
-#include <qsensorbackend.h>
+#include <QtSensors/qsensorbackend.h>
#include <sensormanagerinterface.h>
#include <abstractsensor_i.h>
-#include <QAmbientLightSensor>
-#include <QIRProximitySensor>
-#include <QTapSensor>
-#include <QProximitySensor>
+#include <QtSensors/QAmbientLightSensor>
+#include <QtSensors/QIRProximitySensor>
+#include <QtSensors/QTapSensor>
+#include <QtSensors/QProximitySensor>
class SensorfwSensorBase : public QSensorBackend
{
+ Q_OBJECT
public:
SensorfwSensorBase(QSensor *sensor);
virtual ~SensorfwSensorBase();
@@ -170,6 +171,12 @@ private:
bool doConnectAfterCheck();
int m_efficientBufferSize, m_maxBufferSize;
+ QDBusServiceWatcher *watcher;
+ bool m_available;
+ bool running;
+private slots:
+ void connectToSensord();
+ void sensordUnregistered();
};
#endif