Chromium Code Reviews| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 uint16 start_handle; | 218 uint16 start_handle; |
| 219 uint16 end_handle; | 219 uint16 end_handle; |
| 220 | 220 |
| 221 /* | 221 /* |
| 222 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of | 222 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of |
| 223 * the characteristic. | 223 * the characteristic. |
| 224 */ | 224 */ |
| 225 uint8 properties; | 225 uint8 properties; |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 // Bluetooth SDP types | |
| 229 [Extensible] | |
| 230 enum BluetoothSdpAttrType { | |
| 231 NULLTYPE = 0, | |
| 232 UINT, | |
| 233 INT, | |
| 234 UUID, | |
| 235 STRING, | |
| 236 BOOL, | |
| 237 SEQUENCE, | |
| 238 URL, | |
| 239 }; | |
| 240 | |
| 241 struct BluetoothSdpServiceAttr { | |
| 242 BluetoothSdpAttrType type; | |
| 243 uint32 type_size; | |
| 244 array<uint8> value; | |
| 245 array<BluetoothSdpServiceAttr> sequence; | |
| 246 }; | |
| 247 | |
| 248 struct BluetoothSdpRecord { | |
| 249 BluetoothSdpServiceAttr browse_group_list; | |
| 250 BluetoothSdpServiceAttr service_class_id_list; | |
| 251 BluetoothSdpServiceAttr protocol_desc_list; | |
| 252 BluetoothSdpServiceAttr profile_desc_list; | |
| 253 BluetoothSdpServiceAttr name; | |
| 254 }; | |
| 255 | |
| 256 struct BluetoothGetSdpRecordsResult { | |
| 257 BluetoothStatus status; | |
| 258 array<BluetoothSdpRecord> records; | |
| 259 }; | |
| 260 | |
| 261 struct BluetoothCreateSdpRecordResult { | |
| 262 BluetoothStatus status; | |
| 263 uint32 service_handle; | |
| 264 }; | |
| 265 | |
| 228 interface BluetoothHost { | 266 interface BluetoothHost { |
| 229 EnableAdapter@0() => (BluetoothAdapterState state); | 267 EnableAdapter@0() => (BluetoothAdapterState state); |
| 230 DisableAdapter@1() => (BluetoothAdapterState state); | 268 DisableAdapter@1() => (BluetoothAdapterState state); |
| 231 GetAdapterProperty@2(BluetoothPropertyType type); | 269 GetAdapterProperty@2(BluetoothPropertyType type); |
| 232 SetAdapterProperty@3(BluetoothProperty property); | 270 SetAdapterProperty@3(BluetoothProperty property); |
| 233 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, | 271 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, |
| 234 BluetoothPropertyType type); | 272 BluetoothPropertyType type); |
| 235 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, | 273 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, |
| 236 BluetoothProperty property); | 274 BluetoothProperty property); |
| 237 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, | 275 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 BluetoothGattID char_id) | 318 BluetoothGattID char_id) |
| 281 => (BluetoothGattStatus status); | 319 => (BluetoothGattStatus status); |
| 282 [MinVersion=1] DeregisterForGattNotification@27( | 320 [MinVersion=1] DeregisterForGattNotification@27( |
| 283 BluetoothAddress remote_addr, | 321 BluetoothAddress remote_addr, |
| 284 BluetoothGattServiceID service_id, | 322 BluetoothGattServiceID service_id, |
| 285 BluetoothGattID char_id) | 323 BluetoothGattID char_id) |
| 286 => (BluetoothGattStatus status); | 324 => (BluetoothGattStatus status); |
| 287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) | 325 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) |
| 288 => (int32 rssi); | 326 => (int32 rssi); |
| 289 | 327 |
| 328 // Bluetooth SDP functions | |
|
puthik_chromium
2016/07/25 18:44:16
FYI: I'm going to land http://crrev.com/2104023002
Miao
2016/07/26 07:20:45
Done.
| |
| 329 GetSdpRecords@29(BluetoothAddress remote_addr) => (BluetoothGetSdpRecordsResul t result); | |
|
puthik_chromium
2016/07/25 18:44:16
Add [MinVersion=4] to all the new Method
Miao
2016/07/26 07:20:45
Done.
| |
| 330 CreateSdpRecord@30(BluetoothSdpRecord record) => (BluetoothCreateSdpRecordResu lt result); | |
| 331 RemoveSdpRecord@31(uint32 service_handle) => (BluetoothStatus status); | |
| 290 }; | 332 }; |
| 291 | 333 |
| 292 interface BluetoothInstance { | 334 interface BluetoothInstance { |
| 293 Init@0(BluetoothHost host_ptr); | 335 Init@0(BluetoothHost host_ptr); |
| 294 | 336 |
| 295 OnAdapterProperties@1(BluetoothStatus status, | 337 OnAdapterProperties@1(BluetoothStatus status, |
| 296 array<BluetoothProperty> properties); | 338 array<BluetoothProperty> properties); |
| 297 OnRemoteDeviceProperties@2(BluetoothStatus status, | 339 OnRemoteDeviceProperties@2(BluetoothStatus status, |
| 298 BluetoothAddress address, | 340 BluetoothAddress address, |
| 299 array<BluetoothProperty> properties); | 341 array<BluetoothProperty> properties); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 320 uint16 start_handle, | 362 uint16 start_handle, |
| 321 uint16 end_handle); | 363 uint16 end_handle); |
| 322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, | 364 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, |
| 323 array<BluetoothGattDBElement> db); | 365 array<BluetoothGattDBElement> db); |
| 324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, | 366 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, |
| 325 BluetoothGattServiceID service_id, | 367 BluetoothGattServiceID service_id, |
| 326 BluetoothGattID char_id, | 368 BluetoothGattID char_id, |
| 327 bool is_notify, | 369 bool is_notify, |
| 328 array<uint8> value); | 370 array<uint8> value); |
| 329 }; | 371 }; |
| OLD | NEW |