summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_android.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-03 17:52:55 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-17 13:09:35 +0000
commitb1a2de541771c6b45d46cfa6613c10f5e52ece68 (patch)
treedf023e3a73cf2ed627eccf29c479fa12004ac550 /src/bluetooth/qlowenergycontroller_android.cpp
parenteef68dea35960670c1a1a1431d4541e1ed19c781 (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_android.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_android.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp
index f740abc7..cd6603a3 100644
--- a/src/bluetooth/qlowenergycontroller_android.cpp
+++ b/src/bluetooth/qlowenergycontroller_android.cpp
@@ -178,7 +178,7 @@ void QLowEnergyControllerPrivate::writeCharacteristic(
const QSharedPointer<QLowEnergyServicePrivate> service,
const QLowEnergyHandle charHandle,
const QByteArray &newValue,
- bool writeWithResponse)
+ QLowEnergyService::WriteMode mode)
{
//TODO don't ignore WriteWithResponse, right now we assume responses
Q_ASSERT(!service.isNull());
@@ -196,10 +196,10 @@ void QLowEnergyControllerPrivate::writeCharacteristic(
if (hub) {
qCDebug(QT_BT_ANDROID) << "Write characteristic with handle " << charHandle
<< newValue.toHex() << "(service:" << service->uuid
- << ", writeWithResponse:" << writeWithResponse << ")";
+ << ", writeWithResponse:" << (mode == QLowEnergyService::WriteWithResponse)
+ << ", signed:" << (mode == QLowEnergyService::WriteSigned) << ")";
result = hub->javaObject().callMethod<jboolean>("writeCharacteristic", "(I[BI)Z",
- charHandle, payload,
- writeWithResponse ? QLowEnergyService::WriteWithResponse : QLowEnergyService::WriteWithoutResponse);
+ charHandle, payload, mode);
}
if (env->ExceptionOccurred()) {