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 // Copied from Android API | |
| 292 // https://source.android.com/devices/halref/bt__gatt__server_8h.html | |
| 293 [MinVersion=3] AddService@29(BluetoothGattServiceID service_id, | |
|
Luis Héctor Chávez
2016/07/22 01:56:41
FYI: https://codereview.chromium.org/2166143002/pa
puthik_chromium
2016/07/22 21:46:33
Done.
| |
| 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); | |
| 290 }; | 316 }; |
| 291 | 317 |
| 292 interface BluetoothInstance { | 318 interface BluetoothInstance { |
| 293 Init@0(BluetoothHost host_ptr); | 319 Init@0(BluetoothHost host_ptr); |
| 294 | 320 |
| 295 OnAdapterProperties@1(BluetoothStatus status, | 321 OnAdapterProperties@1(BluetoothStatus status, |
| 296 array<BluetoothProperty> properties); | 322 array<BluetoothProperty> properties); |
| 297 OnRemoteDeviceProperties@2(BluetoothStatus status, | 323 OnRemoteDeviceProperties@2(BluetoothStatus status, |
| 298 BluetoothAddress address, | 324 BluetoothAddress address, |
| 299 array<BluetoothProperty> properties); | 325 array<BluetoothProperty> properties); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 319 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, | 345 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, |
| 320 uint16 start_handle, | 346 uint16 start_handle, |
| 321 uint16 end_handle); | 347 uint16 end_handle); |
| 322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, | 348 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, |
| 323 array<BluetoothGattDBElement> db); | 349 array<BluetoothGattDBElement> db); |
| 324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, | 350 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, |
| 325 BluetoothGattServiceID service_id, | 351 BluetoothGattServiceID service_id, |
| 326 BluetoothGattID char_id, | 352 BluetoothGattID char_id, |
| 327 bool is_notify, | 353 bool is_notify, |
| 328 array<uint8> value); | 354 array<uint8> value); |
| 355 | |
| 356 // Bluetooth Gatt Server functions | |
| 357 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, | |
| 358 int32 attribute_handle, | |
| 359 int32 offset, | |
| 360 bool is_long) | |
| 361 => (BluetoothGattStatus status, array<uint8> value); | |
| 362 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, | |
| 363 int32 attribute_handle, | |
| 364 int32 offset, | |
| 365 array<uint8> value) | |
| 366 => (BluetoothGattStatus status); | |
| 329 }; | 367 }; |
| OLD | NEW |