From ccd19d2b7ee4184503ea46b98333b27a5613190e Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Wed, 8 May 2013 18:04:31 +0200 Subject: big change: a new abstract BluetoothWatch class --- libsowatchbt/bluetoothwatchscanner.h | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 libsowatchbt/bluetoothwatchscanner.h (limited to 'libsowatchbt/bluetoothwatchscanner.h') 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 +#include + +#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 -- cgit v1.2.3