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 import "device/bluetooth/public/interfaces/uuid.mojom"; | |
8 | |
7 // FakeBluetooth and its related interfaces allow clients to control the global | 9 // FakeBluetooth and its related interfaces allow clients to control the global |
8 // Bluetooth State as well as simulate Bluetooth events including finding new | 10 // Bluetooth State as well as simulate Bluetooth events including finding new |
9 // devices, simulating GATT attributes and its descendants, and simulating | 11 // devices, simulating GATT attributes and its descendants, and simulating |
10 // success and error responses. | 12 // success and error responses. |
11 | 13 |
12 // Indicates the various states of Central. | 14 // Indicates the various states of Central. |
13 enum CentralState { | 15 enum CentralState { |
14 ABSENT, | 16 ABSENT, |
15 POWERED_ON, | 17 POWERED_ON, |
16 POWERED_OFF, | 18 POWERED_OFF, |
(...skipping 14 matching lines...) Expand all Loading... | |
31 // FakeCentral allows clients to simulate events that a device in the | 33 // FakeCentral allows clients to simulate events that a device in the |
32 // Central/Observer role would receive as well as monitor the operations | 34 // Central/Observer role would receive as well as monitor the operations |
33 // performed by the device in the Central/Observer role. | 35 // performed by the device in the Central/Observer role. |
34 // | 36 // |
35 // A "Central" interface would allow its clients to receive advertising events | 37 // A "Central" interface would allow its clients to receive advertising events |
36 // and initiate connections to peripherals i.e. operations of two roles | 38 // and initiate connections to peripherals i.e. operations of two roles |
37 // defined by the Bluetooth Spec: Observer and Central. | 39 // 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 | 40 // See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operating over an |
39 // LE Physical Transport". | 41 // LE Physical Transport". |
40 interface FakeCentral { | 42 interface FakeCentral { |
41 // Simulates a peripheral with |address| and |name| that has already | 43 // Simulates a peripheral with |address|, |name| and |known_service_uuids| |
42 // been connected to the system. If the peripheral existed already it | 44 // that has already been connected to the system. If the peripheral existed |
43 // updates its name. | 45 // already it updates its name and known UUIDs. |
44 // | 46 // |
45 // Platforms offer methods to retrieve devices that have already been | 47 // 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 | 48 // 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 | 49 // connected a peripheral through the system's settings. This method is |
48 // intended to simulate peripherals that those methods would return. | 50 // intended to simulate peripherals that those methods would return. |
49 SimulatePreconnectedPeripheral(string address, string name) => (); | 51 SimulatePreconnectedPeripheral(string address, |
52 string name, | |
53 array<UUID> known_service_uuids) => (); | |
dcheng
2017/05/11 05:44:21
Not a blocker for this CL, but my previous comment
ortuno
2017/05/11 06:45:08
I'm unsure what the benefits of sending binary dat
| |
50 }; | 54 }; |
OLD | NEW |