Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: device/bluetooth/public/interfaces/test/fake_bluetooth.mojom

Issue 2853433002: bluetooth: Implement simulateCentral (Closed)
Patch Set: Address dcheng's comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/test/fake_bluetooth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Central.
13 enum CentralState {
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 Central with |state| as the initial state.
28 SimulateCentral(CentralState state) => (FakeCentral fake_central);
19 }; 29 };
30
31 // FakeCentral allows clients to simulate events that a device in the
32 // Central/Observer role would receive as well as monitor the operations
33 // performed by the device in the Central/Observer role.
34 //
35 // A "Central" interface would allow its clients to receive advertising events
36 // and initiate connections to peripherals i.e. operations of two roles
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
39 // LE Physical Transport".
40 interface FakeCentral {
41 };
OLDNEW
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/test/fake_bluetooth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698