| Index: device/bluetooth/public/interfaces/test/fake_bluetooth.mojom
|
| diff --git a/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom b/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom
|
| index 3ac2e80111de624cae06223d242c9205ea1bf6c9..add7ea6dc066f357858f4f7ff2e4eda1450697bd 100644
|
| --- a/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom
|
| +++ b/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom
|
| @@ -9,6 +9,13 @@ module bluetooth.mojom;
|
| // devices, simulating GATT attributes and its descendants, and simulating
|
| // success and error responses.
|
|
|
| +// Indicates the various states of Central.
|
| +enum CentralState {
|
| + ABSENT,
|
| + POWERED_ON,
|
| + POWERED_OFF,
|
| +};
|
| +
|
| // FakeBluetooth allows clients to control the global Bluetooth state.
|
| interface FakeBluetooth {
|
| // Set it to indicate whether the platform supports BLE. For example, Windows
|
| @@ -16,4 +23,18 @@ interface FakeBluetooth {
|
| // 10 is a platform that does support LE, even if there is no Bluetooth radio
|
| // available.
|
| SetLESupported(bool available) => ();
|
| +
|
| + // Initializes a fake Central with |state| as the initial state.
|
| + SimulateCentral(CentralState state) => (FakeCentral fake_central);
|
| +};
|
| +
|
| +// FakeCentral allows clients to simulate events that a device in the
|
| +// Central/Observer role would receive as well as monitor the operations
|
| +// performed by the device in the Central/Observer role.
|
| +//
|
| +// A Central interface would allow its clients to perform the operations and
|
| +// receive events for two roles defined by the Bluetooth Spec: Observer and
|
| +// Central. See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operation over an
|
| +// LE Physical Transport".
|
| +interface FakeCentral {
|
| };
|
|
|