diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-11-28 13:42:18 +0100 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-12-01 11:08:23 +0100 |
commit | 68332a47fbcc124efedf73b106b7e06bfacd65fd (patch) | |
tree | aa245330d234ae5539a0479388116e6c773eeef6 /src/bluetooth/qlowenergycontroller_osx_p.h | |
parent | 0e3046f29b0e86affeb33c8f6687618cfd1dfae2 (diff) |
Bluetooth LE - handles/chars/descriptors/services (OS X and iOS)
In Qt we work with handles (real for Bluez, emulated for Android/iOS/OS X).
Core Bluetooth has its own (quite primitive and inconvenient) data structures
(arrays of objects, containing nested arrays).
To make things not so ugly I'm adding several
maps to be able to find a characteristic/descriptor/service using a
handle from Qt's layer.
Also modify writeCharacteristic to use this new 'addressing scheme'.
Change-Id: Ic822c9aa82a4df1e9c4cf4c673451cac8006b9ba
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_osx_p.h')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_osx_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_osx_p.h b/src/bluetooth/qlowenergycontroller_osx_p.h index a8f8aaa0..2aec6200 100644 --- a/src/bluetooth/qlowenergycontroller_osx_p.h +++ b/src/bluetooth/qlowenergycontroller_osx_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +class QByteArray; + // The suffix OSX is not the very right, it's also iOS. class QLowEnergyControllerPrivateOSX : public QLowEnergyControllerPrivate, public OSXBluetooth::CentralManagerDelegate @@ -83,6 +85,9 @@ private: void discoverServices(); void discoverServiceDetails(const QBluetoothUuid &serviceUuid); + void setNotifyValue(QSharedPointer<QLowEnergyServicePrivate> service, + QLowEnergyHandle charHandle, const QByteArray &newValue); + void writeCharacteristic(QSharedPointer<QLowEnergyServicePrivate> service, QLowEnergyHandle charHandle, const QByteArray &newValue, bool writeWithResponse); |