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

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

Issue 2256003002: components/arc: implement multi advertising (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb-incoming-connections
Patch Set: swap CHECK_EQ for EXPECT_EQ Created 4 years, 4 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 9d05a469d47496397bfca6a1958746dc668fe76c..db86689cb8db52230543024f1a296e8c82e4d0ba 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: 5
+// Next MinVersion: 6
module arc.mojom;
@@ -169,6 +169,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]
@@ -201,6 +209,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,
@@ -231,6 +246,7 @@ struct BluetoothGattDBElement {
uint8 properties;
};
+// Next Method ID: 40
interface BluetoothHost {
EnableAdapter@0() => (BluetoothAdapterState state);
DisableAdapter@1() => (BluetoothAdapterState state);
@@ -322,6 +338,15 @@ interface BluetoothHost {
bool confirm,
array<uint8> value)
=> (BluetoothGattStatus status);
+
+ // Multi-advertisement functions
+ [MinVersion=5] ReserveAdvertisementHandle@37()
+ => (BluetoothGattStatus status, int32 adv_handle);
+ [MinVersion=5] BroadcastAdvertisement@38(int32 adv_handle,
+ BluetoothAdvertisement adv)
+ => (BluetoothGattStatus status);
+ [MinVersion=5] ReleaseAdvertisementHandle@39(int32 adv_handle)
+ => (BluetoothGattStatus status);
};
// Next Method ID: 17

Powered by Google App Engine
This is Rietveld 408576698