OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 // FakeBluetooth and its related interfaces allow clients to control the global | 7 // FakeBluetooth and its related interfaces allow clients to control the global |
8 // Bluetooth State as well as simulate Bluetooth events including finding new | 8 // Bluetooth State as well as simulate Bluetooth events including finding new |
9 // devices, simulating GATT attributes and its descendants, and simulating | 9 // devices, simulating GATT attributes and its descendants, and simulating |
10 // success and error responses. | 10 // success and error responses. |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // FakeCentral allows clients to simulate events that a device in the | 31 // FakeCentral allows clients to simulate events that a device in the |
32 // Central/Observer role would receive as well as monitor the operations | 32 // Central/Observer role would receive as well as monitor the operations |
33 // performed by the device in the Central/Observer role. | 33 // performed by the device in the Central/Observer role. |
34 // | 34 // |
35 // A Central interface would allow its clients to perform the operations and | 35 // A Central interface would allow its clients to perform the operations and |
36 // receive events for two roles defined by the Bluetooth Spec: Observer and | 36 // receive events for two roles defined by the Bluetooth Spec: Observer and |
37 // Central. See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operation over an | 37 // Central. See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operation over an |
38 // LE Physical Transport". | 38 // LE Physical Transport". |
39 interface FakeCentral { | 39 interface FakeCentral { |
| 40 // Simulates a peripheral with |address| and |name| that has already |
| 41 // been connected to the system. |
| 42 // |
| 43 // Platforms offer methods to retrieve devices that have already been |
| 44 // connected to the system or weren't connected through the UA e.g. a user |
| 45 // connected a peripheral through the system's settings. This method is |
| 46 // intended to simulate peripherals that those methods would return. |
| 47 SimulatePreconnectedPeripheral(string address, string name) |
| 48 => (string peripheral_id); |
40 }; | 49 }; |
OLD | NEW |