blob: 4645906742a634fe45f8da12909be26ca6d5a441 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <QtConnectivity/QBluetoothDeviceInfo>
#include <QtConnectivity/QBluetoothAddress>
#include "liveviewscanner.h"
QTM_USE_NAMESPACE
using namespace sowatch;
LiveViewScanner::LiveViewScanner(QObject *parent) :
BluetoothWatchScanner(parent)
{
}
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;
foundInfo["notification-watchlet"] = QString("com.javispedro.sowatch.liveview.notification");
emit watchFound(foundInfo);
}
}
|