diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-07-07 15:45:40 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-07-15 20:39:48 +0200 |
commit | 4d2fb32117cd37e0cd4ed3de9c43941b11ad708d (patch) | |
tree | f24be0904f537f6aa274be47e98af9ca6ea87327 /src/bluetooth/qlowenergydescriptor.cpp | |
parent | 74a4d1b1ab44274d208d4a52d666d39010f2227a (diff) |
Add QLowEnergyService::contains(QLowEnergyDescriptor)
The patch adds extensive test code for the two contains() functions
in QLowEnergyService.
Change-Id: I640767b55ccad63e390478ccf14f2b47eb24de7f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/bluetooth/qlowenergydescriptor.cpp')
-rw-r--r-- | src/bluetooth/qlowenergydescriptor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergydescriptor.cpp b/src/bluetooth/qlowenergydescriptor.cpp index d28e1a6e..16ec1a68 100644 --- a/src/bluetooth/qlowenergydescriptor.cpp +++ b/src/bluetooth/qlowenergydescriptor.cpp @@ -278,6 +278,19 @@ QBluetoothUuid::DescriptorType QLowEnergyDescriptor::type() const } /*! + \internal + + Returns the handle of the characteristic to which this descriptor belongs + */ +QLowEnergyHandle QLowEnergyDescriptor::characteristicHandle() const +{ + if (d_ptr.isNull() || !data) + return 0; + + return data->charHandle; +} + +/*! Sets the value \a value of the descriptor. This only caches the value. To write a value directly to the device QLowEnergyController class must be used. |