| Index: device/bluetooth/bluetooth_gatt_service.h
|
| diff --git a/device/bluetooth/bluetooth_gatt_service.h b/device/bluetooth/bluetooth_gatt_service.h
|
| index 346772e587d43ddf948dc3b693386211e736737d..16f4ae5f9e15b192ab553ecbe2ee8efac27f65b2 100644
|
| --- a/device/bluetooth/bluetooth_gatt_service.h
|
| +++ b/device/bluetooth/bluetooth_gatt_service.h
|
| @@ -173,6 +173,28 @@ class BluetoothGattService {
|
| BluetoothGattService* service,
|
| BluetoothGattCharacteristic* characteristic) {}
|
|
|
| + // Called when the remote GATT characteristic descriptor |descriptor|
|
| + // belonging to characteristic |characteristic| has been discovered. Don't
|
| + // cache the arguments as the pointers may become invalid. Instead, use the
|
| + // specially assigned identifier to obtain a descriptor and cache that
|
| + // identifier as necessary.
|
| + //
|
| + // This method will always be followed by a call to GattServiceChanged,
|
| + // which can be used by observers to get all the characteristics of a
|
| + // service and perform the necessary updates. GattDescriptorAdded exists
|
| + // mostly for convenience.
|
| + virtual void GattDescriptorAdded(
|
| + BluetoothGattCharacteristic* characteristic,
|
| + BluetoothGattDescriptor* descriptor) {}
|
| +
|
| + // Called when a GATT characteristic descriptor |descriptor| belonging to
|
| + // characteristic |characteristic| has been removed. This method is for
|
| + // convenience and will be followed by a call to GattServiceChanged (except
|
| + // when called after the service gets removed).
|
| + virtual void GattDescriptorRemoved(
|
| + BluetoothGattCharacteristic* characteristic,
|
| + BluetoothGattDescriptor* descriptor) {}
|
| +
|
| // Called when the value of a characteristic has changed. This might be a
|
| // result of a read/write request to, or a notification/indication from, a
|
| // remote GATT characteristic.
|
| @@ -180,6 +202,12 @@ class BluetoothGattService {
|
| BluetoothGattService* service,
|
| BluetoothGattCharacteristic* characteristic,
|
| const std::vector<uint8>& value) {}
|
| +
|
| + // Called when the value of a characteristic descriptor has been updated.
|
| + virtual void GattDescriptorValueChanged(
|
| + BluetoothGattCharacteristic* characteristic,
|
| + BluetoothGattDescriptor* descriptor,
|
| + const std::vector<uint8>& value) {}
|
| };
|
|
|
| // The ErrorCallback is used by methods to asynchronously report errors.
|
|
|