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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/test/fake_bluetooth.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..826df33b68d5588e0cff8670e12fb4960864f641 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,19 @@ 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 receive advertising events
+// and initiate connections to peripherals i.e. operations of two roles
+// defined by the Bluetooth Spec: Observer and Central.
+// See Bluetooth 4.2 Vol 3 Part C 2.2.2 "Roles when Operating over an
+// LE Physical Transport".
+interface FakeCentral {
};
« 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