OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module bluetooth.mojom; | 5 module bluetooth.mojom; |
6 | 6 |
7 struct DeviceInfo { | 7 struct DeviceInfo { |
8 string? name; | 8 string? name; |
9 string name_for_display; | 9 string name_for_display; |
10 string id; | 10 string id; |
(...skipping 10 matching lines...) Expand all Loading... | |
21 SetClient(AdapterClient client); | 21 SetClient(AdapterClient client); |
22 }; | 22 }; |
23 | 23 |
24 interface AdapterClient { | 24 interface AdapterClient { |
25 // Called the first time a device is discovered. | 25 // Called the first time a device is discovered. |
26 DeviceAdded(DeviceInfo device); | 26 DeviceAdded(DeviceInfo device); |
27 | 27 |
28 // Called after the device hasn't been seen for 3 minutes. | 28 // Called after the device hasn't been seen for 3 minutes. |
29 DeviceRemoved(DeviceInfo device); | 29 DeviceRemoved(DeviceInfo device); |
30 }; | 30 }; |
31 | |
32 interface AdapterFactory { | |
33 // Gets an adapter interface. | |
34 GetAdapter(Adapter& adapter, AdapterClient client) => (bool success); | |
ortuno
2016/10/05 02:07:51
I think the following interface would simplify thi
mbrunson
2016/10/05 17:59:04
That makes sense. It's easier to follow in my opin
| |
35 }; | |
OLD | NEW |