diff options
Diffstat (limited to 'src/bluetooth/osx/osxbtcentralmanager_p.h')
-rw-r--r-- | src/bluetooth/osx/osxbtcentralmanager_p.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager_p.h b/src/bluetooth/osx/osxbtcentralmanager_p.h index 6d93816f..ff08c14a 100644 --- a/src/bluetooth/osx/osxbtcentralmanager_p.h +++ b/src/bluetooth/osx/osxbtcentralmanager_p.h @@ -93,9 +93,8 @@ public: // Service related errors. virtual void error(const QBluetoothUuid &serviceUuid, QLowEnergyController::Error error) = 0; - // Characteristics related errors. + // Characteristics/descriptors related errors. virtual void error(const QBluetoothUuid &serviceUuid, - QLowEnergyHandle charHandle, QLowEnergyService::ServiceError error) = 0; }; @@ -138,15 +137,13 @@ struct LEWriteRequest typedef QQueue<LEWriteRequest> WriteQueue; -// It can happen that Qt's API wants to write something -// and expects the confirmation about this value written, -// but under the hood (Core Bluetooth) we have something like -// a special method without any values at all. -// To report our user a successful write, we have this map: -// handle -> value for a write operation. -// Since write operations are serialized, the key is guaranteed -// to be unique. -typedef QHash<QLowEnergyHandle, QByteArray> ValueHash; +// Core Bluetooth's write confirmation does not provide +// the updated value (characteristic or descriptor). +// But the Qt's Bluetooth API ('write with response') +// expects this updated value as a response, so we have +// to cache this write value and report it back. +// 'NSObject *' will require '__weak' with ARC. +typedef QHash<NSObject *, QByteArray> ValueHash; } |