| Index: device/bluetooth/public/interfaces/device.mojom
|
| diff --git a/device/bluetooth/public/interfaces/device.mojom b/device/bluetooth/public/interfaces/device.mojom
|
| index 2e3773ac787d780f9e9f8eebf5b6d830b7565bfb..baa361150d058cc8660554e3e7fbda3fbe9ee7ab 100644
|
| --- a/device/bluetooth/public/interfaces/device.mojom
|
| +++ b/device/bluetooth/public/interfaces/device.mojom
|
| @@ -15,6 +15,7 @@ import "device/bluetooth/public/interfaces/uuid.mojom";
|
| // contains additional properties pertaining to the characteristic.
|
| // The properties |RELIABLE_WRITE| and |WRITABLE_AUXILIARIES| are retrieved from
|
| // that characteristic.
|
| +// TODO(crbug.com/684168): Remove assignment of values when this is automated.
|
| enum Property {
|
| NONE = 0,
|
| BROADCAST = 1,
|
| @@ -33,6 +34,20 @@ enum Property {
|
| WRITE_ENCRYPTED_AUTHENTICATED = 8192
|
| };
|
|
|
| +enum GattResult {
|
| + SUCCESS,
|
| + UNKNOWN,
|
| + FAILED,
|
| + IN_PROGRESS,
|
| + INVALID_LENGTH,
|
| + NOT_PERMITTED,
|
| + NOT_AUTHORIZED,
|
| + NOT_PAIRED,
|
| + NOT_SUPPORTED,
|
| + SERVICE_NOT_FOUND,
|
| + CHARACTERISTIC_NOT_FOUND
|
| +};
|
| +
|
| // TODO(crbug.com/657632): Remove when numerical values can be optional.
|
| struct RSSIWrapper {
|
| int8 value;
|
| @@ -56,6 +71,7 @@ struct CharacteristicInfo {
|
| string id;
|
| UUID uuid;
|
| uint32 properties;
|
| + array<uint8> last_known_value;
|
| };
|
|
|
| struct DescriptorInfo {
|
| @@ -81,6 +97,16 @@ interface Device {
|
| GetCharacteristics(string service_id) =>
|
| (array<CharacteristicInfo>? characteristics);
|
|
|
| + // Reads the value for the GATT Characteristic with |characteristic_id| in
|
| + // the GATT Service with |service_id|.
|
| + ReadValueForCharacteristic(string service_id, string characteristic_id) =>
|
| + (GattResult result, array<uint8>? value);
|
| +
|
| + // Writes the |value| to the GATT Characteristic with |characteristic_id| in
|
| + // the GATT Service with |service_id|.
|
| + WriteValueForCharacteristic(string service_id, string characteristic_id,
|
| + array<uint8> value) => (GattResult result);
|
| +
|
| // Gets the GATT Descriptors of the GATT Characteristic with matching
|
| // |characteristic_id| in the GATT Service with matching |service_id|.
|
| // If |descriptors| is null, an error occured while attempting to retrieve
|
|
|