| 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 blink.mojom; | 5 module blink.mojom; |
| 6 | 6 |
| 7 import "device/bluetooth/public/interfaces/uuid.mojom"; | 7 import "device/bluetooth/public/interfaces/uuid.mojom"; |
| 8 | 8 |
| 9 // Bluetooth Terminology: | 9 // Bluetooth Terminology: |
| 10 // | 10 // |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 // Reads the value for the descriptor identified by | 244 // Reads the value for the descriptor identified by |
| 245 // |descriptor_instance_id|. If the value is successfully read the callback | 245 // |descriptor_instance_id|. If the value is successfully read the callback |
| 246 // will be run with WebBluetoothResult::SUCCESS and the descriptor's value. If | 246 // will be run with WebBluetoothResult::SUCCESS and the descriptor's value. If |
| 247 // the value is not successfully read the callback with be run with the | 247 // the value is not successfully read the callback with be run with the |
| 248 // corresponding error and nullptr for value | 248 // corresponding error and nullptr for value |
| 249 RemoteDescriptorReadValue( | 249 RemoteDescriptorReadValue( |
| 250 string descriptor_instance_id) => ( | 250 string descriptor_instance_id) => ( |
| 251 WebBluetoothResult result, | 251 WebBluetoothResult result, |
| 252 array<uint8>? value); | 252 array<uint8>? value); |
| 253 |
| 254 // Writes a value to the descriptor identified by |
| 255 // |descriptor_instance_id|. The callback is run with |
| 256 // WebBluetoothResult::SUCCESS if the value was successfully |
| 257 // written. |
| 258 RemoteDescriptorWriteValue( |
| 259 string descriptor_instance_id, |
| 260 array<uint8> value) => (WebBluetoothResult result); |
| 253 }; | 261 }; |
| 254 | 262 |
| 255 // Classes should implement this interface and pass an associated pointer | 263 // Classes should implement this interface and pass an associated pointer |
| 256 // bound to them to the WebBluetoothService by using SetClient. Classes | 264 // bound to them to the WebBluetoothService by using SetClient. Classes |
| 257 // that do this will be notified of device events e.g. device disconnection. | 265 // that do this will be notified of device events e.g. device disconnection. |
| 258 interface WebBluetoothServiceClient { | 266 interface WebBluetoothServiceClient { |
| 259 // The characteristic identified by |characteristic_instance_id| has received | 267 // The characteristic identified by |characteristic_instance_id| has received |
| 260 // a notification of value change. | 268 // a notification of value change. |
| 261 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 269 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
| 262 array<uint8> value); | 270 array<uint8> value); |
| 263 | 271 |
| 264 // The device identified by |device_id| has been disconnected. | 272 // The device identified by |device_id| has been disconnected. |
| 265 GattServerDisconnected(WebBluetoothDeviceId device_id); | 273 GattServerDisconnected(WebBluetoothDeviceId device_id); |
| 266 }; | 274 }; |
| OLD | NEW |