diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-08 18:04:31 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-08 18:04:31 +0200 |
commit | ccd19d2b7ee4184503ea46b98333b27a5613190e (patch) | |
tree | f78cc3f3c946d7a4f8167f72fb20703c65494d84 /liveview/liveviewscanner.cpp | |
parent | 6003bf81107dd9be51589c074b74c5af82bfc8ab (diff) | |
download | sowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.tar.gz sowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.zip |
big change: a new abstract BluetoothWatch class
Diffstat (limited to 'liveview/liveviewscanner.cpp')
-rw-r--r-- | liveview/liveviewscanner.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/liveview/liveviewscanner.cpp b/liveview/liveviewscanner.cpp new file mode 100644 index 0000000..3aee19d --- /dev/null +++ b/liveview/liveviewscanner.cpp @@ -0,0 +1,26 @@ +#include <QtConnectivity/QBluetoothDeviceInfo> +#include <QtConnectivity/QBluetoothAddress> + +#include "liveviewscanner.h" + +QTM_USE_NAMESPACE +using namespace sowatch; + +LiveViewScanner::LiveViewScanner(QObject *parent) : + BluetoothWatchScanner(parent) +{ + setUuidFilter(QBluetoothUuid::SerialPort); +} + +void LiveViewScanner::handleDiscoveredService(const QBluetoothServiceInfo &info) +{ + const QBluetoothDeviceInfo dev = info.device(); + QString deviceName = dev.name(); + if (deviceName == "LiveView") { + QVariantMap foundInfo; + foundInfo["driver"] = QString("liveview"); + foundInfo["address"] = dev.address().toString(); + foundInfo["name"] = deviceName; + emit watchFound(foundInfo); + } +} |