Chromium Code Reviews| Index: components/arc/common/bluetooth.mojom |
| diff --git a/components/arc/common/bluetooth.mojom b/components/arc/common/bluetooth.mojom |
| index edb607eed13e086cfe4d7d77562baad70b8c071d..143f6efa83bd3f8b00d03e77f07958e5604b2405 100644 |
| --- a/components/arc/common/bluetooth.mojom |
| +++ b/components/arc/common/bluetooth.mojom |
| @@ -225,6 +225,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; |
| + array<uint8> value; |
|
rickyz (no longer on Chrome)
2016/08/16 23:55:07
Why do different integer types need to be stuffed
rickyz (no longer on Chrome)
2016/08/17 00:20:30
Correction: It turns out mojo support unions - for
Miao
2016/08/17 14:30:20
The original plan is to use base::ListValue to pas
rickyz (no longer on Chrome)
2016/08/17 18:54:54
Yeah, I think a union would be preferable here, al
|
| + array<BluetoothSdpServiceAttr> sequence; |
| +}; |
| + |
| +struct BluetoothSdpRecord { |
| + map<uint16, BluetoothSdpServiceAttr> attrs; |
| +}; |
| + |
| +struct BluetoothCreateSdpRecordResult { |
| + BluetoothStatus status; |
| + uint32 service_handle; |
| +}; |
| + |
| interface BluetoothHost { |
| EnableAdapter@0() => (BluetoothAdapterState state); |
| DisableAdapter@1() => (BluetoothAdapterState state); |
| @@ -316,6 +345,14 @@ interface BluetoothHost { |
| bool confirm, |
| array<uint8> value) |
| => (BluetoothGattStatus status); |
| + |
| + // Bluetooth SDP functions |
| + [MinVersion=4] GetSdpRecords@37(BluetoothAddress remote_addr, |
| + BluetoothUUID target_uuid); |
| + [MinVersion=4] CreateSdpRecord@38(BluetoothSdpRecord record) |
| + => (BluetoothCreateSdpRecordResult result); |
| + [MinVersion=4] RemoveSdpRecord@39(uint32 service_handle) |
| + => (BluetoothStatus status); |
| }; |
| interface BluetoothInstance { |
| @@ -367,4 +404,10 @@ interface BluetoothInstance { |
| int32 offset, |
| array<uint8> value) |
| => (BluetoothGattStatus status); |
| + |
| + // Bluetooth SDP function |
| + [MinVersion=4] OnGetSdpRecords@16(BluetoothStatus status, |
| + BluetoothAddress remove_addr, |
| + BluetoothUUID target_uuid, |
| + array<BluetoothSdpRecord> records); |
| }; |