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 // Copy from Android API | |
|
Luis Héctor Chávez
2016/07/19 01:26:02
nit: Copied
puthik_chromium
2016/07/19 22:21:22
Done.
| |
| 292 // https://source.android.com/devices/halref/bt__gatt__server_8h.html | |
| 293 [MinVersion=3] AddService@29(BluetoothGattServiceID service_id, | |
| 294 int32 num_handles) | |
| 295 => (int32 service_handle); | |
| 296 [MinVersion=3] AddCharacteristic@30(int32 service_handle, | |
| 297 BluetoothUUID uuid, | |
| 298 int32 properties, | |
| 299 int32 permissions) | |
| 300 => (int32 characteristic_handle); | |
| 301 [MinVersion=3] AddDescriptor@31(int32 service_handle, | |
| 302 BluetoothUUID uuid, | |
| 303 int32 permissions) | |
| 304 => (int32 descriptor_handle); | |
| 305 [MinVersion=3] StartService@32(int32 service_handle) | |
| 306 => (BluetoothGattStatus status); | |
| 307 [MinVersion=3] StopService@33(int32 service_handle) | |
| 308 => (BluetoothGattStatus status); | |
| 309 [MinVersion=3] DeleteService@34(int32 service_handle) | |
| 310 => (BluetoothGattStatus status); | |
| 311 [MinVersion=3] SendIndication@35(int32 attribute_handle, | |
| 312 BluetoothAddress address, | |
| 313 bool confirm, | |
| 314 array<uint8> value) | |
| 315 => (BluetoothGattStatus status); | |
| 316 [MinVersion=3] SendResponse@36(int32 trans_id, | |
| 317 int32 status, | |
| 318 array<uint8> value) | |
| 319 => (BluetoothGattStatus status); | |
| 320 | |
| 290 }; | 321 }; |
| 291 | 322 |
| 292 interface BluetoothInstance { | 323 interface BluetoothInstance { |
| 293 Init@0(BluetoothHost host_ptr); | 324 Init@0(BluetoothHost host_ptr); |
| 294 | 325 |
| 295 OnAdapterProperties@1(BluetoothStatus status, | 326 OnAdapterProperties@1(BluetoothStatus status, |
| 296 array<BluetoothProperty> properties); | 327 array<BluetoothProperty> properties); |
| 297 OnRemoteDeviceProperties@2(BluetoothStatus status, | 328 OnRemoteDeviceProperties@2(BluetoothStatus status, |
| 298 BluetoothAddress address, | 329 BluetoothAddress address, |
| 299 array<BluetoothProperty> properties); | 330 array<BluetoothProperty> properties); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 319 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, | 350 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, |
| 320 uint16 start_handle, | 351 uint16 start_handle, |
| 321 uint16 end_handle); | 352 uint16 end_handle); |
| 322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, | 353 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, |
| 323 array<BluetoothGattDBElement> db); | 354 array<BluetoothGattDBElement> db); |
| 324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, | 355 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, |
| 325 BluetoothGattServiceID service_id, | 356 BluetoothGattServiceID service_id, |
| 326 BluetoothGattID char_id, | 357 BluetoothGattID char_id, |
| 327 bool is_notify, | 358 bool is_notify, |
| 328 array<uint8> value); | 359 array<uint8> value); |
| 360 | |
| 361 // Bluetooth Gatt Server functions | |
| 362 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, | |
| 363 int32 transaction_id, | |
| 364 int32 attribute_handle, | |
| 365 int32 offset, | |
| 366 bool is_long); | |
| 367 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, | |
| 368 int32 transaction_id, | |
| 369 int32 attribute_handle, | |
| 370 int32 offset, | |
| 371 array<uint8> value); | |
| 329 }; | 372 }; |
| OLD | NEW |