diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-02-03 17:52:55 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-02-17 13:09:35 +0000 |
commit | b1a2de541771c6b45d46cfa6613c10f5e52ece68 (patch) | |
tree | df023e3a73cf2ed627eccf29c479fa12004ac550 /src/bluetooth/qlowenergycontroller_p.h | |
parent | eef68dea35960670c1a1a1431d4541e1ed19c781 (diff) |
Bluetooth LE: Add support for Signed Write command in the central role.
Task-number: QTBUG-41175
Change-Id: I62d74236faf9161681306d952e409e23e0cea24d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_p.h')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_p.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h index 6e231dd1..2256025c 100644 --- a/src/bluetooth/qlowenergycontroller_p.h +++ b/src/bluetooth/qlowenergycontroller_p.h @@ -92,7 +92,7 @@ class QLowEnergyServiceData; #if defined(QT_BLUEZ_BLUETOOTH) && !defined(QT_BLUEZ_NO_BTLE) class HciManager; -class LeCmacVerifier; +class LeCmacCalculator; class QSocketNotifier; #elif defined(QT_ANDROID_BLUETOOTH) class LowEnergyNotificationHub; @@ -159,7 +159,7 @@ public: // write data void writeCharacteristic(const QSharedPointer<QLowEnergyServicePrivate> service, const QLowEnergyHandle charHandle, - const QByteArray &newValue, bool writeWithResponse = true); + const QByteArray &newValue, QLowEnergyService::WriteMode mode); void writeDescriptor(const QSharedPointer<QLowEnergyServicePrivate> service, const QLowEnergyHandle charHandle, const QLowEnergyHandle descriptorHandle, @@ -260,7 +260,7 @@ private: quint32 counter = quint32(-1); }; QHash<quint64, SigningData> signingData; - LeCmacVerifier *cmacVerifier = nullptr; + LeCmacCalculator *cmacCalculator = nullptr; bool requestPending; quint16 mtuSize; @@ -279,8 +279,11 @@ private: QVector<TempClientConfigurationData> gatherClientConfigData(); void storeClientConfigurations(); void restoreClientConfigurations(); - void loadSigningDataIfNecessary(); - void storeSignCounter(); + + enum SigningKeyType { LocalSigningKey, RemoteSigningKey }; + void loadSigningDataIfNecessary(SigningKeyType keyType); + void storeSignCounter(SigningKeyType keyType) const; + QString signingKeySettingsGroup(SigningKeyType keyType) const; QString keySettingsFilePath() const; void sendPacket(const QByteArray &packet); @@ -368,11 +371,11 @@ private: void writeCharacteristicForPeripheral( QLowEnergyServicePrivate::CharData &charData, const QByteArray &newValue); - void writeCharacteristicForCentral( + void writeCharacteristicForCentral(const QSharedPointer<QLowEnergyServicePrivate> &service, QLowEnergyHandle charHandle, QLowEnergyHandle valueHandle, const QByteArray &newValue, - bool writeWithResponse); + QLowEnergyService::WriteMode mode); void writeDescriptorForPeripheral( const QSharedPointer<QLowEnergyServicePrivate> &service, |