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

Unified Diff: components/arc/common/bluetooth.mojom

Issue 2394683007: Reland "components/arc: implement multi advertising" (Closed)
Patch Set: Created 4 years, 2 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
Index: components/arc/common/bluetooth.mojom
diff --git a/components/arc/common/bluetooth.mojom b/components/arc/common/bluetooth.mojom
index 894161f654578b18812e61b0e717ac5028c014a9..a1f5a0d3d91f10cf71d724d0564e7cfd25be11b9 100644
--- a/components/arc/common/bluetooth.mojom
+++ b/components/arc/common/bluetooth.mojom
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Next MinVersion: 6
+// Next MinVersion: 7
module arc.mojom;
@@ -171,6 +171,14 @@ struct BluetoothGattValue {
const int8 kUnknownPower = 127;
+// Copied from Android Bluetooth package. See AdvertiseManager$AdvertiseNative
+// http://goo.gl/UnKC5N
+enum BluetoothAdvertisementType {
+ ADV_TYPE_CONNECTABLE = 0,
+ ADV_TYPE_SCANNABLE = 2,
+ ADV_TYPE_NON_CONNECTABLE = 3,
+};
+
// Copy from Bluetooth Assigned Numbers Document, Generic Access Profile
// https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile
[Extensible]
@@ -203,6 +211,13 @@ struct BluetoothServiceData {
array<uint8> data;
};
+struct BluetoothAdvertisement {
+ BluetoothAdvertisementType type;
+ bool include_tx_power;
+ array<BluetoothAdvertisingData> data;
+ // Add more here as Chrome supports it.
+};
+
[Extensible]
enum BluetoothGattDBAttributeType {
BTGATT_DB_PRIMARY_SERVICE = 0,
@@ -270,7 +285,7 @@ struct BluetoothCreateSdpRecordResult {
uint32 service_handle;
};
-// Next Method ID: 40
+// Next Method ID: 43
interface BluetoothHost {
EnableAdapter@0() => (BluetoothAdapterState state);
DisableAdapter@1() => (BluetoothAdapterState state);
@@ -370,6 +385,15 @@ interface BluetoothHost {
=> (BluetoothCreateSdpRecordResult result);
[MinVersion=5] RemoveSdpRecord@39(uint32 service_handle)
=> (BluetoothStatus status);
+
+ // Multi-advertisement functions
+ [MinVersion=6] ReserveAdvertisementHandle@40()
+ => (BluetoothGattStatus status, int32 adv_handle);
+ [MinVersion=6] BroadcastAdvertisement@41(int32 adv_handle,
+ BluetoothAdvertisement adv)
+ => (BluetoothGattStatus status);
+ [MinVersion=6] ReleaseAdvertisementHandle@42(int32 adv_handle)
+ => (BluetoothGattStatus status);
};
// Next Method ID: 18

Powered by Google App Engine
This is Rietveld 408576698