diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-11-28 16:13:39 +0100 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-12-01 13:12:37 +0100 |
commit | b82007fd2425bf7cae13dd525087bf390047a8cd (patch) | |
tree | bd1a143242711c50bbb8776b9ae71c1c01c93e72 /src/bluetooth/osx/osxbtcentralmanager_p.h | |
parent | 78954716c7dfb5334386ba28d09363468a7fead2 (diff) |
QLowEnergyController - concurrent characteristic writes
Qt's API assumes that several write operations must be
serialized (this is not guaranteed with Core Bluetooth AFAIK).
I can enqueu only write with response operations, otherwise
I never know when to do the next write.
Change-Id: Iaa83514748358437e2c39335ab142d084ff197e3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/osx/osxbtcentralmanager_p.h')
-rw-r--r-- | src/bluetooth/osx/osxbtcentralmanager_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager_p.h b/src/bluetooth/osx/osxbtcentralmanager_p.h index 2bdea3c0..86c621c2 100644 --- a/src/bluetooth/osx/osxbtcentralmanager_p.h +++ b/src/bluetooth/osx/osxbtcentralmanager_p.h @@ -80,7 +80,8 @@ public: virtual void connectSuccess() = 0; virtual void serviceDiscoveryFinished(LEServices services) = 0; virtual void serviceDetailsDiscoveryFinished(LEService service) = 0; - virtual void characteristicWriteNotification(LECharacteristic ch) = 0; + virtual void characteristicWriteNotification(QLowEnergyHandle charHandle, + const QByteArray &value) = 0; virtual void descriptorWriteNotification(QLowEnergyHandle descHandle, const QByteArray &value) = 0; virtual void disconnected() = 0; @@ -120,10 +121,13 @@ typedef QHash<QLowEnergyHandle, CBDescriptor *> DescHash; // Descriptor write request - we have to serialize 'concurrent' write requests. struct LEWriteRequest { - LEWriteRequest() : isDescriptor(false), handle(0) + LEWriteRequest() : isDescriptor(false), + withResponse(false), + handle(0) {} bool isDescriptor; + bool withResponse; QLowEnergyHandle handle; QByteArray value; }; |