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. |
11 | 11 |
12 // Indicates the various states of LECentralObserverManager. | |
13 enum LECentralObserverManagerState { | |
14 ABSENT, | |
15 POWERED_ON, | |
16 POWERED_OFF, | |
17 }; | |
18 | |
12 // FakeBluetooth allows clients to control the global Bluetooth state. | 19 // FakeBluetooth allows clients to control the global Bluetooth state. |
13 interface FakeBluetooth { | 20 interface FakeBluetooth { |
14 // Set it to indicate whether the platform supports BLE. For example, Windows | 21 // Set it to indicate whether the platform supports BLE. For example, Windows |
15 // 7 is a platform that doesn't support Low Energy. On the other hand Windows | 22 // 7 is a platform that doesn't support Low Energy. On the other hand Windows |
16 // 10 is a platform that does support LE, even if there is no Bluetooth radio | 23 // 10 is a platform that does support LE, even if there is no Bluetooth radio |
17 // available. | 24 // available. |
18 SetLESupported(bool available) => (); | 25 SetLESupported(bool available) => (); |
26 | |
27 // Initializes a fake LECentralObserverManager with |state| as the initial | |
28 // state. | |
29 SimulateLECentralObserverManager(LECentralObserverManagerState state) | |
30 => (FakeLECentralObserverManager fake_manager); | |
19 }; | 31 }; |
32 | |
33 // FakeLECentralObserverManager allows clients to simulate events that a device | |
scheib
2017/04/29 02:07:52
This name is... hard. I don't have a better name y
ortuno
2017/05/01 06:09:04
Currently we have an Adapter class that exposes al
scheib
2017/05/01 18:16:59
Splitting SGTM
ortuno
2017/05/02 01:14:10
I agree on most points. I think Splitting Central/
| |
34 // in the Central/Observer role would receive as well as monitor the operations | |
35 // performed by the device in the Central/Observer role. | |
36 // | |
37 // An LECentralObserverManger would allow its clients to perform the operations | |
38 // and receive events for two roles defined by the Bluetooth Spec: Observer and | |
39 // Central. | |
40 // See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operation over | |
41 // an LE Physical Transport". | |
42 interface FakeLECentralObserverManager { | |
43 }; | |
OLD | NEW |