diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-03-30 12:43:01 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-04-10 07:46:32 +0000 |
commit | 9170697287050f1b8210cb2298389b4b78f9e962 (patch) | |
tree | f9587559c96d7c45532a34b8fc53663b03b325e5 /src/bluetooth/qlowenergyservice.h | |
parent | 4ed0678f93d7fc6a9d0d43dfdfe6608e827eb176 (diff) |
Add ability to read characteristics and descriptors
This patch introduces the new API elements without any implementation.
Change-Id: Ia2a4d4c588f2f2f219288967ed9cc69b13b682c6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'src/bluetooth/qlowenergyservice.h')
-rw-r--r-- | src/bluetooth/qlowenergyservice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergyservice.h b/src/bluetooth/qlowenergyservice.h index 3d9247a6..78183c05 100644 --- a/src/bluetooth/qlowenergyservice.h +++ b/src/bluetooth/qlowenergyservice.h @@ -55,7 +55,9 @@ public: enum ServiceError { NoError = 0, OperationError, + CharacteristicReadError, CharacteristicWriteError, + DescriptorReadError, DescriptorWriteError, UnknownError }; @@ -90,11 +92,13 @@ public: ServiceError error() const; bool contains(const QLowEnergyCharacteristic &characteristic) const; + void readCharacteristic(const QLowEnergyCharacteristic &characteristic); void writeCharacteristic(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue, WriteMode mode = WriteWithResponse); bool contains(const QLowEnergyDescriptor &descriptor) const; + void readDescriptor(const QLowEnergyDescriptor &descriptor); void writeDescriptor(const QLowEnergyDescriptor &descriptor, const QByteArray &newValue); @@ -102,8 +106,12 @@ Q_SIGNALS: void stateChanged(QLowEnergyService::ServiceState newState); void characteristicChanged(const QLowEnergyCharacteristic &info, const QByteArray &value); + void characteristicRead(const QLowEnergyCharacteristic &info, + const QByteArray &value); void characteristicWritten(const QLowEnergyCharacteristic &info, const QByteArray &value); + void descriptorRead(const QLowEnergyDescriptor &info, + const QByteArray &value); void descriptorWritten(const QLowEnergyDescriptor &info, const QByteArray &value); void error(QLowEnergyService::ServiceError error); |