summaryrefslogtreecommitdiff
path: root/libsowatchbt/bluetoothwatchscanner.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsowatchbt/bluetoothwatchscanner.h')
-rw-r--r--libsowatchbt/bluetoothwatchscanner.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libsowatchbt/bluetoothwatchscanner.h b/libsowatchbt/bluetoothwatchscanner.h
new file mode 100644
index 0000000..1ab974a
--- /dev/null
+++ b/libsowatchbt/bluetoothwatchscanner.h
@@ -0,0 +1,37 @@
+#ifndef BLUETOOTHWATCHSCANNER_H
+#define BLUETOOTHWATCHSCANNER_H
+
+#include <sowatch.h>
+#include <QtConnectivity/QBluetoothServiceDiscoveryAgent>
+
+#include "sowatchbt_global.h"
+
+namespace sowatch
+{
+
+using QTM_PREPEND_NAMESPACE(QBluetoothServiceDiscoveryAgent);
+using QTM_PREPEND_NAMESPACE(QBluetoothServiceInfo);
+using QTM_PREPEND_NAMESPACE(QBluetoothUuid);
+
+class SOWATCHBT_EXPORT BluetoothWatchScanner : public WatchScanner
+{
+ Q_OBJECT
+
+public:
+ BluetoothWatchScanner(QObject *parent);
+
+ void start();
+
+protected:
+ void setUuidFilter(const QBluetoothUuid & uuid);
+
+protected slots:
+ virtual void handleDiscoveredService(const QBluetoothServiceInfo& info) = 0;
+
+private:
+ QBluetoothServiceDiscoveryAgent *_agent;
+};
+
+}
+
+#endif // BLUETOOTHWATCHSCANNER_H