diff options
Diffstat (limited to 'device/bluetooth/bluetooth_gatt_characteristic.cc')
-rw-r--r-- | device/bluetooth/bluetooth_gatt_characteristic.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.cc b/device/bluetooth/bluetooth_gatt_characteristic.cc index f7bb6d8..66c39f6 100644 --- a/device/bluetooth/bluetooth_gatt_characteristic.cc +++ b/device/bluetooth/bluetooth_gatt_characteristic.cc @@ -5,6 +5,7 @@ #include "device/bluetooth/bluetooth_gatt_characteristic.h" #include "base/logging.h" +#include "device/bluetooth/bluetooth_gatt_descriptor.h" namespace device { @@ -24,4 +25,14 @@ BluetoothGattCharacteristic* BluetoothGattCharacteristic::Create( return NULL; } +BluetoothGattDescriptor* BluetoothGattCharacteristic::GetDescriptorForUUID( + const BluetoothUUID& uuid) { + for (BluetoothGattDescriptor* descriptor : GetDescriptors()) { + if (descriptor->GetUUID() == uuid) { + return descriptor; + } + } + return NULL; +} + } // namespace device |