diff options
author | Nedim Hadzic <nhadzic@blackberry.com> | 2013-11-27 17:13:59 +0100 |
---|---|---|
committer | Nedim Hadzic <nhadzic@blackberry.com> | 2013-11-28 16:32:07 +0100 |
commit | 12ac88fa8d87d8fd86aa86bc009c7a78503648ee (patch) | |
tree | 5708457bcefa1c019913443023a97b4a1bc6a84f /src/bluetooth/qlowenergycharacteristicinfo.cpp | |
parent | beb84e5fcdc79b3e9a613d9d5c36ac27952a5546 (diff) |
Implemented the characteristic error handling.
In case of enabling notifications and writing values to the LE device, some errors can occur and which are reported now.
Change-Id: I02c6deab925d06916c5b56705c9423386400f713
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qlowenergycharacteristicinfo.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycharacteristicinfo.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bluetooth/qlowenergycharacteristicinfo.cpp b/src/bluetooth/qlowenergycharacteristicinfo.cpp index 232d03ca..44a7b58d 100644 --- a/src/bluetooth/qlowenergycharacteristicinfo.cpp +++ b/src/bluetooth/qlowenergycharacteristicinfo.cpp @@ -249,9 +249,10 @@ bool QLowEnergyCharacteristicInfo::isNotificationCharacteristic() const } /*! - Writes the value \a value directly to LE device. + Writes the value \a value directly to LE device. If the value was not written successfully + an error will be emitted with an error string. - \sa setValue() + \sa errorString() */ void QLowEnergyCharacteristicInfo::writeValue(const QByteArray &value) { @@ -291,4 +292,15 @@ QList<QLowEnergyDescriptorInfo> QLowEnergyCharacteristicInfo::descriptors() cons return d_ptr->descriptorsList; } +/*! + Returns an error string if error occurred. An error is emitted in the + QLowEnergyController class. + + \sa QLowEnergyController::error(const QLowEnergyCharacteristicInfo &) +*/ +QString QLowEnergyCharacteristicInfo::errorString() const +{ + return d_ptr->errorString; +} + QT_END_NAMESPACE |