Chromium Code Reviews| Index: device/bluetooth/public/interfaces/adapter.mojom |
| diff --git a/device/bluetooth/public/interfaces/adapter.mojom b/device/bluetooth/public/interfaces/adapter.mojom |
| index 22d04f29fb52c90a0aefd148793a1b9a4c66fc45..0a55c11385b9d6c10bef58aa89f9f2f218e7a91f 100644 |
| --- a/device/bluetooth/public/interfaces/adapter.mojom |
| +++ b/device/bluetooth/public/interfaces/adapter.mojom |
| @@ -4,6 +4,8 @@ |
| module bluetooth.mojom; |
| +import "le_device.mojom"; |
| + |
| struct AdapterInfo { |
| string address; |
| string name; |
| @@ -14,22 +16,17 @@ struct AdapterInfo { |
| bool discovering; |
| }; |
| -struct DeviceInfo { |
| - string? name; |
| - string name_for_display; |
| - string id; |
| - string address; |
| -}; |
| - |
| interface Adapter { |
| + // Gets the Device service for the device at the given address. |
| + GetDeviceService(string address) => (LEDevice? device); |
|
ortuno
2016/10/10 00:11:20
nit: I would move this below GetDevices() to keep
mbrunson
2016/10/10 19:21:28
Done.
|
| + |
| // Returns basic information about the adapter. |
| - // Returns null, If no adapter is available. |
| GetInfo() => (AdapterInfo info); |
| // Retrieves the list of the devices known by the adapter including Connected |
| // Devices, GATT Connected Devices, Paired Devices and Devices discovered |
| // during a classic or low-energy scan. |
| - GetDevices() => (array<DeviceInfo> devices); |
| + GetDevices() => (array<LEDeviceInfo> devices); |
| // Sets the client that listens for the adapter's events. |
| SetClient(AdapterClient client); |
| @@ -37,13 +34,13 @@ interface Adapter { |
| interface AdapterClient { |
| // Called the first time a device is discovered. |
| - DeviceAdded(DeviceInfo device); |
| + DeviceAdded(LEDeviceInfo device); |
| // Called after the device hasn't been seen for 3 minutes. |
| - DeviceRemoved(DeviceInfo device); |
| + DeviceRemoved(LEDeviceInfo device); |
| }; |
| interface AdapterFactory { |
| // Gets an Adapter interface. Returns null if Bluetooth is not supported. |
| GetAdapter() => (Adapter? adapter); |
| -}; |
| +}; |