Chromium Code Reviews| Index: components/arc/common/bluetooth.mojom |
| diff --git a/components/arc/common/bluetooth.mojom b/components/arc/common/bluetooth.mojom |
| index 9d05a469d47496397bfca6a1958746dc668fe76c..ccd94a45782f63b80c3178a0553574ac56a38404 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"; |
|
Luis Héctor Chávez
2016/09/06 17:42:30
Is this still needed? :(
Miao
2016/09/07 17:58:30
Yes, although we are not using type map, we still
|
| + |
| [Extensible] |
| enum BluetoothAdapterState { |
| OFF = 0, |
| @@ -231,6 +233,42 @@ struct BluetoothGattDBElement { |
| uint8 properties; |
| }; |
| +// Bluetooth SDP types |
| +[Extensible] |
| +enum BluetoothSdpAttributeType { |
| + NULLTYPE = 0, |
| + UINT, |
| + INT, |
| + UUID, |
| + STRING, |
| + BOOL, |
| + SEQUENCE, |
| + URL, |
| +}; |
| + |
| +/* |
| + * A BluetoothSdpAttribute contains either a value or a sequence, where a |
| + * sequence is an array of BluetoothSdpAttribute. A multi-layered attribute |
| + * design is intended. The user of this structure should pay extra attention to |
|
Luis Héctor Chávez
2016/09/06 17:42:30
"should pay extra attention" how? Just checking th
Miao
2016/09/07 17:58:30
Replaced that sentence with
"Note BluetoothSdpAttr
|
| + * check the depth of included layers. |
| + */ |
| +struct BluetoothSdpAttribute { |
| + BluetoothSdpAttributeType type; |
| + uint32 type_size; |
| + mojo.common.mojom.ListValue value; |
| + array<BluetoothSdpAttribute> sequence; |
| +}; |
| + |
| +struct BluetoothSdpRecord { |
| + map<uint16, BluetoothSdpAttribute> attrs; |
| +}; |
| + |
| +struct BluetoothCreateSdpRecordResult { |
| + BluetoothStatus status; |
| + uint32 service_handle; |
| +}; |
| + |
| +// Next Method ID: 40 |
| interface BluetoothHost { |
| EnableAdapter@0() => (BluetoothAdapterState state); |
| DisableAdapter@1() => (BluetoothAdapterState state); |
| @@ -322,9 +360,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 +422,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); |
| }; |