Index: device/bluetooth/bluetooth_gatt_characteristic.cc |
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.cc b/device/bluetooth/bluetooth_gatt_characteristic.cc |
index f7bb6d848d28fd26ba248c2009626d3d563e568d..66c39f68ebaf1987c54b1b8ba6e7d940db997683 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( |
scheib
2016/03/02 06:15:20
We should add a test to bluetooth_gatt_characteris
scheib
2016/03/11 03:17:30
Done.
|
+ const BluetoothUUID& uuid) { |
+ for (BluetoothGattDescriptor* descriptor : GetDescriptors()) { |
+ if (descriptor->GetUUID() == uuid) { |
+ return descriptor; |
+ } |
+ } |
+ return NULL; |
ortuno
2016/03/04 17:39:47
nit: nullptr
scheib
2016/03/11 03:17:30
Done.
|
+} |
+ |
} // namespace device |