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 20 matching lines...) Expand all Loading... |
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 receive advertising events | 35 // A "Central" interface would allow its clients to receive advertising events |
36 // and initiate connections to peripherals i.e. operations of two roles | 36 // and initiate connections to peripherals i.e. operations of two roles |
37 // defined by the Bluetooth Spec: Observer and Central. | 37 // defined by the Bluetooth Spec: Observer and Central. |
38 // See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operating over an | 38 // See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operating over an |
39 // LE Physical Transport". | 39 // LE Physical Transport". |
40 interface FakeCentral { | 40 interface FakeCentral { |
| 41 // Simulates a peripheral with |address| and |name| that has already |
| 42 // been connected to the system. If the peripheral existed already it |
| 43 // updates its name. |
| 44 // |
| 45 // Platforms offer methods to retrieve devices that have already been |
| 46 // connected to the system or weren't connected through the UA e.g. a user |
| 47 // connected a peripheral through the system's settings. This method is |
| 48 // intended to simulate peripherals that those methods would return. |
| 49 SimulatePreconnectedPeripheral(string address, string name) => (); |
41 }; | 50 }; |
OLD | NEW |