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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 BluetoothGattID char_id) | 280 BluetoothGattID char_id) |
| 281 => (BluetoothGattStatus status); | 281 => (BluetoothGattStatus status); |
| 282 [MinVersion=1] DeregisterForGattNotification@27( | 282 [MinVersion=1] DeregisterForGattNotification@27( |
| 283 BluetoothAddress remote_addr, | 283 BluetoothAddress remote_addr, |
| 284 BluetoothGattServiceID service_id, | 284 BluetoothGattServiceID service_id, |
| 285 BluetoothGattID char_id) | 285 BluetoothGattID char_id) |
| 286 => (BluetoothGattStatus status); | 286 => (BluetoothGattStatus status); |
| 287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) | 287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) |
| 288 => (int32 rssi); | 288 => (int32 rssi); |
| 289 | 289 |
| 290 // Bluetooth Gatt Server functions | |
| 291 // TODO connect | |
| 292 [MinVersion=3] AddService@29(BluetoothGattServiceID service_id, | |
| 293 int32 num_handles) | |
|
rkc
2016/06/29 21:54:17
What is num_handles? Is this the handles of the in
puthik_chromium
2016/07/01 21:12:42
Added at the header file.
| |
| 294 => (int32 service_handle); | |
| 295 [MinVersion=3] AddCharacteristic@30(int32 service_handle, | |
| 296 BluetoothUUID uuid, | |
| 297 int32 properties, | |
| 298 int32 permissions) | |
| 299 => (int32 characteristic_handle); | |
| 300 [MinVersion=3] AddDescriptor@31(int32 service_handle, | |
| 301 BluetoothUUID uuid, | |
| 302 int32 permissions) | |
| 303 => (int32 descriptor_handle); | |
| 304 [MinVersion=3] StartService@32(int32 service_handle, int32 transport) | |
|
rkc
2016/06/29 21:54:17
What is transport here?
Eric Caruso
2016/06/30 23:19:09
It looks like this is BR/EDR, LE, etc.
I refactor
puthik_chromium
2016/07/01 21:12:42
Done.
| |
| 305 => (BluetoothGattStatus status); | |
| 306 [MinVersion=3] StopService@33(int32 service_handle) | |
| 307 => (BluetoothGattStatus status); | |
| 308 [MinVersion=3] DeleteService@34(int32 service_handle) | |
| 309 => (BluetoothGattStatus status); | |
| 310 [MinVersion=3] SendIndication@35(int32 attribute_handle, | |
|
rkc
2016/06/29 21:54:17
Should this be called SendNotification? The Androi
Eric Caruso
2016/06/30 23:19:09
http://androidxref.com/6.0.1_r10/xref/hardware/lib
puthik_chromium
2016/07/01 21:12:42
It's int32 in Android HAL, but the upper Java laye
| |
| 311 BluetoothAddress address, | |
| 312 int32 confirm, | |
| 313 array<uint8> value) | |
| 314 => (BluetoothGattStatus status); | |
| 315 [MinVersion=3] SendResponse@36(int32 trans_id, | |
| 316 int32 status, | |
| 317 array<uint8> value) | |
| 318 => (BluetoothGattStatus status); | |
| 319 | |
| 290 }; | 320 }; |
| 291 | 321 |
| 292 interface BluetoothInstance { | 322 interface BluetoothInstance { |
| 293 Init@0(BluetoothHost host_ptr); | 323 Init@0(BluetoothHost host_ptr); |
| 294 | 324 |
| 295 OnAdapterProperties@1(BluetoothStatus status, | 325 OnAdapterProperties@1(BluetoothStatus status, |
| 296 array<BluetoothProperty> properties); | 326 array<BluetoothProperty> properties); |
| 297 OnRemoteDeviceProperties@2(BluetoothStatus status, | 327 OnRemoteDeviceProperties@2(BluetoothStatus status, |
| 298 BluetoothAddress address, | 328 BluetoothAddress address, |
| 299 array<BluetoothProperty> properties); | 329 array<BluetoothProperty> properties); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 319 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, | 349 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, |
| 320 uint16 start_handle, | 350 uint16 start_handle, |
| 321 uint16 end_handle); | 351 uint16 end_handle); |
| 322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, | 352 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, |
| 323 array<BluetoothGattDBElement> db); | 353 array<BluetoothGattDBElement> db); |
| 324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, | 354 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, |
| 325 BluetoothGattServiceID service_id, | 355 BluetoothGattServiceID service_id, |
| 326 BluetoothGattID char_id, | 356 BluetoothGattID char_id, |
| 327 bool is_notify, | 357 bool is_notify, |
| 328 array<uint8> value); | 358 array<uint8> value); |
| 359 | |
| 360 // Bluetooth Gatt Server functions | |
| 361 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, | |
| 362 int32 transaction_id, | |
| 363 int32 attribute_handle, | |
| 364 int32 offset, | |
| 365 bool is_long); | |
| 366 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, | |
| 367 int32 transaction_id, | |
| 368 int32 attribute_handle, | |
| 369 int32 offset, | |
| 370 array<uint8> value); | |
| 329 }; | 371 }; |
| OLD | NEW |