| Index: device/bluetooth/public/interfaces/adapter.mojom
|
| diff --git a/device/bluetooth/public/interfaces/adapter.mojom b/device/bluetooth/public/interfaces/adapter.mojom
|
| index 945c36b236b56e70e6a2df49030075057ddfc79b..a5de36ca41a9e17decff8b05d2e3bb3cf69a8baf 100644
|
| --- a/device/bluetooth/public/interfaces/adapter.mojom
|
| +++ b/device/bluetooth/public/interfaces/adapter.mojom
|
| @@ -6,6 +6,27 @@ module bluetooth.mojom;
|
|
|
| import "device/bluetooth/public/interfaces/device.mojom";
|
|
|
| +enum ConnectErrorCode {
|
| + SUCCESS,
|
| + ATTRIBUTE_LENGTH_INVALID,
|
| + AUTH_CANCELED,
|
| + AUTH_FAILED,
|
| + AUTH_REJECTED,
|
| + AUTH_TIMEOUT,
|
| + CONNECTION_CONGESTED,
|
| + FAILED,
|
| + INPROGRESS,
|
| + INSUFFICIENT_ENCRYPTION,
|
| + OFFSET_INVALID,
|
| + READ_NOT_PERMITTED,
|
| + REQUEST_NOT_SUPPORTED,
|
| + UNKNOWN,
|
| + UNSUPPORTED_DEVICE,
|
| + WRITE_NOT_PERMITTED,
|
| + NUM_CONNECT_ERROR_CODES,
|
| + DEVICE_NO_LONGER_IN_RANGE
|
| +};
|
| +
|
| struct AdapterInfo {
|
| string address;
|
| string name;
|
| @@ -20,8 +41,10 @@ interface Adapter {
|
| // Gets basic information about the adapter.
|
| GetInfo() => (AdapterInfo info);
|
|
|
| - // Gets the Device service for the device at the given address.
|
| - GetDevice(string address) => (Device? device);
|
| + // Creates a GATT connection to the device with |address| and returns a
|
| + // Device if the connection was succesful. The GATT connection is tied to the
|
| + // the lifetime of the Device message pipe.
|
| + ConnectToDevice(string address) => (ConnectErrorCode error, Device? device);
|
|
|
| // Retrieves the list of the devices known by the adapter including Connected
|
| // Devices, GATT Connected Devices, Paired Devices and Devices discovered
|
|
|