Index: device/bluetooth/public/interfaces/bluetooth.mojom |
diff --git a/device/bluetooth/public/interfaces/bluetooth.mojom b/device/bluetooth/public/interfaces/bluetooth.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..db12aea828d2582b30f8685c81f4689c9a9aac4b |
--- /dev/null |
+++ b/device/bluetooth/public/interfaces/bluetooth.mojom |
@@ -0,0 +1,29 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module bluetooth.mojom; |
+ |
+struct DeviceInfo { |
+ string? name; |
+ string name_for_display; |
+ string id; |
+ string address; |
+}; |
+ |
+interface Adapter { |
+ // Retrieves the list of the devices known by the adapter including Connected |
+ // Devices, GATT Connected Devices, Paired Devices and Devices discovered |
+ // during a classic low-energy scan. |
+ GetDevices() => (array<DeviceInfo> devices); |
+ |
+ SetClient(AdapterClient client); |
+}; |
+ |
+interface AdapterClient { |
+ // Called the fisrt time a device is discovered. |
+ DeviceAdded(DeviceInfo device); |
+ |
+ // Called after the device hasn't been seen for 3 minutes. |
+ DeviceRemoved(DeviceInfo device); |
+}; |