summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergyservice.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-08-27 10:57:08 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-02 20:18:21 +0200
commit4ab9c732a466dc793e5ec162a928d4350a29281c (patch)
treeb5fb9c1e074fb8228936d34894ab61dd452e003f /src/bluetooth/qlowenergyservice.h
parentbb4de7e992fc673884db553977b2756a165278b5 (diff)
Add support for BTLE write command (BlueZ/Linux)
So far, we only supported write requests which reply with write responses. Change-Id: Ibdad36dcf18dec23260f003911b9361cc4ab1e3d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/qlowenergyservice.h')
-rw-r--r--src/bluetooth/qlowenergyservice.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bluetooth/qlowenergyservice.h b/src/bluetooth/qlowenergyservice.h
index 37fa82d7..7bb2c0d3 100644
--- a/src/bluetooth/qlowenergyservice.h
+++ b/src/bluetooth/qlowenergyservice.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Javier S. Pedro <maemo@javispedro.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtBluetooth module of the Qt Toolkit.
@@ -66,6 +67,11 @@ public:
ServiceDiscovered, // all details have been synchronized
};
+ enum WriteMode {
+ WriteWithResponse = 0,
+ WriteWithoutResponse
+ };
+
~QLowEnergyService();
QList<QBluetoothUuid> includedServices() const;
@@ -84,7 +90,8 @@ public:
bool contains(const QLowEnergyCharacteristic &characteristic) const;
void writeCharacteristic(const QLowEnergyCharacteristic &characteristic,
- const QByteArray &newValue);
+ const QByteArray &newValue,
+ WriteMode mode = WriteWithResponse);
bool contains(const QLowEnergyDescriptor &descriptor) const;
void writeDescriptor(const QLowEnergyDescriptor &descriptor,