From 6837120bb121cd40ec8fc83424849af1ed3756be Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 29 Jun 2017 19:43:00 -0700 Subject: BLE handling: create helper function to add the LE: prefix Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core') 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 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) -- cgit v1.2.3-70-g09d2