summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-01 13:48:22 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-02 13:57:48 +0200
commitffbe7708f87aea5e7919e7ca1029bfa24ce13bcd (patch)
treef14a8957f25cc28682de5f359cbee3b2ab6b9233 /src/bluetooth/qlowenergycontroller.h
parent0f6f27d2dd54f487e790959747c7c1e765e84637 (diff)
Add support for random vs public remote address connections
This is required to be able to connect to devices which use random device addresses. Some platforms can determine this flag based on their last device scan. The flag is likely to be provided as part of QBluetoothDeviceInfo once the information is available. Unfortunately non-le scan on BLuez doesn't inform about the flag. The LE device scan is currently not implemented and, even worse, requires root privileges on Linux. The new API element permits the selection of the correct type when the scan doesn't detect the type properly. Change-Id: I8e7118658a7c927e0ea07b0d639d57f9483cb33c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller.h')
-rw-r--r--src/bluetooth/qlowenergycontroller.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller.h b/src/bluetooth/qlowenergycontroller.h
index 8d14f2af..7d5c4e56 100644
--- a/src/bluetooth/qlowenergycontroller.h
+++ b/src/bluetooth/qlowenergycontroller.h
@@ -61,6 +61,11 @@ public:
ClosingState,
};
+ enum RemoteAddressType {
+ PublicAddress = 0,
+ RandomAddress
+ };
+
explicit QLowEnergyController(const QBluetoothAddress &remoteDevice,
QObject *parent = 0);
explicit QLowEnergyController(const QBluetoothAddress &remoteDevice,
@@ -73,6 +78,9 @@ public:
ControllerState state() const;
+ RemoteAddressType remoteAddressType() const;
+ void setRemoteAddressType(RemoteAddressType type);
+
void connectToDevice();
void disconnectFromDevice();