| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module arc.mojom; | 5 module arc.mojom; |
| 6 | 6 |
| 7 [Extensible] | 7 [Extensible] |
| 8 enum BluetoothAdapterState { | 8 enum BluetoothAdapterState { |
| 9 OFF = 0, | 9 OFF = 0, |
| 10 ON | 10 ON |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 array<uint8> value; | 165 array<uint8> value; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 const int8 kUnknownPower = 127; | 168 const int8 kUnknownPower = 127; |
| 169 | 169 |
| 170 // Copy from Bluetooth Assigned Numbers Document, Generic Access Profile | 170 // Copy from Bluetooth Assigned Numbers Document, Generic Access Profile |
| 171 // https://www.bluetooth.com/specifications/assigned-numbers/generic-access-prof
ile | 171 // https://www.bluetooth.com/specifications/assigned-numbers/generic-access-prof
ile |
| 172 [Extensible] | 172 [Extensible] |
| 173 enum BluetoothAdvertisingDataType { | 173 enum BluetoothAdvertisingDataType { |
| 174 DATA_TYPE_FLAGS = 0x01, | 174 DATA_TYPE_FLAGS = 0x01, |
| 175 DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE = 0x03, |
| 175 DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE = 0x07, | 176 DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE = 0x07, |
| 176 DATA_TYPE_LOCAL_NAME_COMPLETE = 0x09, | 177 DATA_TYPE_LOCAL_NAME_COMPLETE = 0x09, |
| 177 DATA_TYPE_TX_POWER_LEVEL = 0x0A, | 178 DATA_TYPE_TX_POWER_LEVEL = 0x0A, |
| 178 DATA_TYPE_SERVICE_DATA = 0x16, | 179 DATA_TYPE_SERVICE_DATA = 0x16, |
| 179 DATA_TYPE_MANUFACTURER_SPECIFIC_DATA = 0xff, | 180 DATA_TYPE_MANUFACTURER_SPECIFIC_DATA = 0xff, |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 // Copy from Bluetooth Core v4.2 Volume 3 Part C Chapter 11 | 183 // Copy from Bluetooth Core v4.2 Volume 3 Part C Chapter 11 |
| 183 // and Bluetooth Core Specification Supplement v6 Part A Chapter 1 | 184 // and Bluetooth Core Specification Supplement v6 Part A Chapter 1 |
| 184 // https://www.bluetooth.com/specifications/adopted-specifications | 185 // https://www.bluetooth.com/specifications/adopted-specifications |
| 185 union BluetoothAdvertisingData { | 186 union BluetoothAdvertisingData { |
| 186 uint8 flags; | 187 uint8 flags; |
| 188 array<uint16> service_uuids_16; |
| 187 array<BluetoothUUID> service_uuids; | 189 array<BluetoothUUID> service_uuids; |
| 188 string local_name; | 190 string local_name; |
| 189 uint8 tx_power_level; | 191 uint8 tx_power_level; |
| 190 BluetoothServiceData service_data; | 192 BluetoothServiceData service_data; |
| 191 array<uint8> manufacturer_data; | 193 array<uint8> manufacturer_data; |
| 192 array<uint8> other_data; | 194 array<uint8> other_data; |
| 193 }; | 195 }; |
| 194 | 196 |
| 195 struct BluetoothServiceData { | 197 struct BluetoothServiceData { |
| 196 uint16 uuid_16bit; | 198 uint16 uuid_16bit; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 int32 attribute_handle, | 365 int32 attribute_handle, |
| 364 int32 offset, | 366 int32 offset, |
| 365 bool is_long) | 367 bool is_long) |
| 366 => (BluetoothGattStatus status, array<uint8> value); | 368 => (BluetoothGattStatus status, array<uint8> value); |
| 367 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, | 369 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, |
| 368 int32 attribute_handle, | 370 int32 attribute_handle, |
| 369 int32 offset, | 371 int32 offset, |
| 370 array<uint8> value) | 372 array<uint8> value) |
| 371 => (BluetoothGattStatus status); | 373 => (BluetoothGattStatus status); |
| 372 }; | 374 }; |
| OLD | NEW |