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 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 BLOCKLISTED_CHARACTERISTIC_UUID, | 90 BLOCKLISTED_CHARACTERISTIC_UUID, |
| 91 BLOCKLISTED_READ, | 91 BLOCKLISTED_READ, |
| 92 BLOCKLISTED_WRITE, | 92 BLOCKLISTED_WRITE, |
| 93 NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, | 93 NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, |
| 94 NOT_ALLOWED_TO_ACCESS_SERVICE, | 94 NOT_ALLOWED_TO_ACCESS_SERVICE, |
| 95 REQUEST_DEVICE_WITH_BLOCKLISTED_UUID, | 95 REQUEST_DEVICE_WITH_BLOCKLISTED_UUID, |
| 96 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, | 96 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, |
| 97 DESCRIPTOR_NO_LONGER_EXISTS, | 97 DESCRIPTOR_NO_LONGER_EXISTS, |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 struct WebBluetoothScanFilter { | 100 struct WebBluetoothLEScanFilter { |
|
nasko
2017/04/04 23:08:32
nit: WebBluetoothLEScanFilter should have "Le" cap
| |
| 101 array<bluetooth.mojom.UUID>? services; | 101 array<bluetooth.mojom.UUID>? services; |
| 102 string? name; | 102 string? name; |
| 103 string? name_prefix; | 103 string? name_prefix; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 struct WebBluetoothRequestDeviceOptions { | 106 struct WebBluetoothRequestDeviceOptions { |
| 107 array<WebBluetoothScanFilter>? filters; | 107 array<WebBluetoothLEScanFilter>? filters; |
| 108 array<bluetooth.mojom.UUID> optional_services; | 108 array<bluetooth.mojom.UUID> optional_services; |
| 109 bool accept_all_devices; | 109 bool accept_all_devices; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 // Indicates if the function will return a single or multiple | 112 // Indicates if the function will return a single or multiple |
| 113 // GATT objects. | 113 // GATT objects. |
| 114 enum WebBluetoothGATTQueryQuantity { | 114 enum WebBluetoothGATTQueryQuantity { |
| 115 SINGLE, | 115 SINGLE, |
| 116 MULTIPLE | 116 MULTIPLE |
| 117 }; | 117 }; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 // Called when a device disconnects. | 257 // Called when a device disconnects. |
| 258 GATTServerDisconnected(); | 258 GATTServerDisconnected(); |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 // Classes that implement this interface will be notified of characteristic | 261 // Classes that implement this interface will be notified of characteristic |
| 262 // events. | 262 // events. |
| 263 interface WebBluetoothCharacteristicClient { | 263 interface WebBluetoothCharacteristicClient { |
| 264 // Called when we receive a notification for the characteristic. | 264 // Called when we receive a notification for the characteristic. |
| 265 RemoteCharacteristicValueChanged(array<uint8> value); | 265 RemoteCharacteristicValueChanged(array<uint8> value); |
| 266 }; | 266 }; |
| OLD | NEW |