summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-29 19:43:00 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-30 13:12:07 -0700
commit6837120bb121cd40ec8fc83424849af1ed3756be (patch)
tree7968a640058d79e3e60ca493a67afbd53ab88b7b /core/btdiscovery.cpp
parenta4d4d1c83b3eef902f7c4443a3e2894b45a0f7b7 (diff)
downloadsubsurface-6837120bb121cd40ec8fc83424849af1ed3756be.tar.gz
BLE handling: create helper function to add the LE: prefix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index 6a66ab6a4..2b7ef4ce6 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -105,6 +105,18 @@ extern void addBtUuid(QBluetoothUuid uuid);
extern QHash<QString, QStringList> productList;
extern QStringList vendorList;
+QString markBLEAddress(const QBluetoothDeviceInfo *device)
+{
+ QBluetoothDeviceInfo::CoreConfigurations flags;
+ QString prefix = "";
+
+ flags = device->coreConfigurations();
+ if (flags == QBluetoothDeviceInfo::LowEnergyCoreConfiguration)
+ prefix = "LE:";
+
+ return prefix + device->address().toString();
+}
+
void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
{
#if defined(SSRF_CUSTOM_IO)