diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-08-21 14:16:08 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-08-25 16:03:05 +0200 |
commit | 624f8a7a5cf37e0271c1a507149661160455a870 (patch) | |
tree | 7ebeea89b59b51bfbcfcb06ed2d98239a9d987fd | |
parent | d02f13307fed0bdbdf928a6b44325e8658b7c24c (diff) |
Merge the ServiceNotValidError and OperationError of QLEService
The invalid service error is essentially the same as the operation
error. The OperationError remains and the ServiceNotValidError is
removed.
Remove an unrelated but obsolete TODO from the source code. We can read
larger than MTU values already. That's what the Blob requests are for.
Change-Id: I3ed496194d55cd05f8e9e09680e962a2b7638702
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 1 | ||||
-rw-r--r-- | src/bluetooth/qlowenergyservice.cpp | 7 | ||||
-rw-r--r-- | src/bluetooth/qlowenergyservice.h | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index 661d4904..277fea44 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -882,7 +882,6 @@ void QLowEnergyControllerPrivate::sendReadByTypeRequest( void QLowEnergyControllerPrivate::readServiceValues( const QBluetoothUuid &serviceUuid, bool readCharacteristics) { - // TODO Long charactertistic value reads not yet supported (larger than MTU) quint8 packet[READ_REQUEST_SIZE]; if (QT_BT_BLUEZ().isDebugEnabled()) { if (readCharacteristics) diff --git a/src/bluetooth/qlowenergyservice.cpp b/src/bluetooth/qlowenergyservice.cpp index 7592d02a..a55ed6e9 100644 --- a/src/bluetooth/qlowenergyservice.cpp +++ b/src/bluetooth/qlowenergyservice.cpp @@ -135,12 +135,11 @@ QT_BEGIN_NAMESPACE existence. The \l error() function returns the last occurred error. \value NoError No error has occurred. - \value ServiceNotValidError The service object is invalid and has lost - its connection to the peripheral device. \value OperationError An operation was attempted while the service was not ready. An example might be the attempt to write to the service while it was not yet in the - \l ServiceDiscovered \l state(). + \l ServiceDiscovered \l state() or the service is invalid + due to a loss of connection to the peripheral device. \value CharacteristicWriteError An attempt to write a new value to a characteristic failed. For example, it might be triggered when attempting to write to a read-only characteristic. @@ -376,7 +375,7 @@ void QLowEnergyService::discoverDetails() Q_D(QLowEnergyService); if (!d->controller || d->state == QLowEnergyService::InvalidService) { - d->setError(QLowEnergyService::ServiceNotValidError); + d->setError(QLowEnergyService::OperationError); return; } diff --git a/src/bluetooth/qlowenergyservice.h b/src/bluetooth/qlowenergyservice.h index 90f57045..37fa82d7 100644 --- a/src/bluetooth/qlowenergyservice.h +++ b/src/bluetooth/qlowenergyservice.h @@ -53,8 +53,7 @@ public: enum ServiceError { NoError = 0, - ServiceNotValidError, //TODO check correct usage - OperationError, //TODO check correct usage + OperationError, CharacteristicWriteError, DescriptorWriteError }; |