Index: components/arc/common/bluetooth.mojom |
diff --git a/components/arc/common/bluetooth.mojom b/components/arc/common/bluetooth.mojom |
index 9d05a469d47496397bfca6a1958746dc668fe76c..dd7b78ec4f8e2aa875184bcbb16b010f7515f60f 100644 |
--- a/components/arc/common/bluetooth.mojom |
+++ b/components/arc/common/bluetooth.mojom |
@@ -2,10 +2,12 @@ |
// 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; |
+import "mojo/common/common_custom_types.mojom"; |
+ |
[Extensible] |
enum BluetoothAdapterState { |
OFF = 0, |
@@ -231,6 +233,35 @@ struct BluetoothGattDBElement { |
uint8 properties; |
}; |
+// Bluetooth SDP types |
+[Extensible] |
+enum BluetoothSdpAttrType { |
+ NULLTYPE = 0, |
+ UINT, |
+ INT, |
+ UUID, |
+ STRING, |
+ BOOL, |
+ SEQUENCE, |
+ URL, |
+}; |
+ |
+struct BluetoothSdpServiceAttr { |
+ BluetoothSdpAttrType type; |
+ uint32 type_size; |
+ mojo.common.mojom.ListValue value; |
+ array<BluetoothSdpServiceAttr> sequence; |
+}; |
+ |
+struct BluetoothSdpRecord { |
+ map<uint16, BluetoothSdpServiceAttr> attrs; |
+}; |
+ |
+struct BluetoothCreateSdpRecordResult { |
+ BluetoothStatus status; |
+ uint32 service_handle; |
+}; |
+ |
puthik_chromium
2016/08/19 17:38:53
// Next Method ID: 40
Miao
2016/08/19 18:20:34
Done.
|
interface BluetoothHost { |
EnableAdapter@0() => (BluetoothAdapterState state); |
DisableAdapter@1() => (BluetoothAdapterState state); |
@@ -322,9 +353,17 @@ interface BluetoothHost { |
bool confirm, |
array<uint8> value) |
=> (BluetoothGattStatus status); |
+ |
+ // Bluetooth SDP functions |
+ [MinVersion=5] GetSdpRecords@37(BluetoothAddress remote_addr, |
+ BluetoothUUID target_uuid); |
+ [MinVersion=5] CreateSdpRecord@38(BluetoothSdpRecord record) |
+ => (BluetoothCreateSdpRecordResult result); |
+ [MinVersion=5] RemoveSdpRecord@39(uint32 service_handle) |
+ => (BluetoothStatus status); |
}; |
-// Next Method ID: 17 |
+// Next Method ID: 18 |
interface BluetoothInstance { |
Init@0(BluetoothHost host_ptr); |
@@ -376,4 +415,10 @@ interface BluetoothInstance { |
int32 offset, |
array<uint8> value) |
=> (BluetoothGattStatus status); |
+ |
+ // Bluetooth SDP function |
+ [MinVersion=5] OnGetSdpRecords@17(BluetoothStatus status, |
+ BluetoothAddress remove_addr, |
+ BluetoothUUID target_uuid, |
+ array<BluetoothSdpRecord> records); |
}; |