Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Use the <code>chrome.bluetooth</code> API to connect to a Bluetooth | 5 // Use the <code>chrome.bluetooth</code> API to connect to a Bluetooth |
| 6 // device. All functions report failures via chrome.runtime.lastError. | 6 // device. All functions report failures via chrome.runtime.lastError. |
| 7 namespace bluetooth { | 7 namespace bluetooth { |
| 8 // Allocation authorities for Vendor IDs. | 8 // Allocation authorities for Vendor IDs. |
| 9 enum VendorIdSource {bluetooth, usb}; | 9 enum VendorIdSource {bluetooth, usb}; |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 // UUIDs of protocols, profiles and services advertised by the device. | 68 // UUIDs of protocols, profiles and services advertised by the device. |
| 69 // For classic Bluetooth devices, this list is obtained from EIR data and | 69 // For classic Bluetooth devices, this list is obtained from EIR data and |
| 70 // SDP tables. For Low Energy devices, this list is obtained from AD and | 70 // SDP tables. For Low Energy devices, this list is obtained from AD and |
| 71 // GATT primary services. For dual mode devices this may be obtained from | 71 // GATT primary services. For dual mode devices this may be obtained from |
| 72 // both. | 72 // both. |
| 73 DOMString[]? uuids; | 73 DOMString[]? uuids; |
| 74 | 74 |
| 75 // The received signal strength, in dBm. This field is avaliable and valid | 75 // The received signal strength, in dBm. This field is avaliable and valid |
| 76 // only during discovery. Outside of discovery it's value is not specified. | 76 // only during discovery. Outside of discovery it's value is not specified. |
| 77 long? inquiryRssi; | 77 long? inquiryRssi; |
| 78 }; | 78 |
| 79 // The transmitted power level. This field is avaliable only for LE devices | |
| 80 // that include this field in AD. It is avaliable and valid only during | |
| 81 // discovery. | |
| 82 long? inquiryTxPower; | |
| 83 }; | |
|
armansito
2015/05/12 01:09:14
This indentation looks wrong, you'll need to inden
jpawlowski1
2015/05/12 08:11:01
Done.
| |
| 79 | 84 |
| 80 // Callback from the <code>getDevice</code> method. | 85 // Callback from the <code>getDevice</code> method. |
| 81 // |deviceInfo| : Object containing the device information. | 86 // |deviceInfo| : Object containing the device information. |
| 82 callback GetDeviceCallback = void(Device deviceInfo); | 87 callback GetDeviceCallback = void(Device deviceInfo); |
| 83 | 88 |
| 84 // Callback from the <code>getDevices</code> method. | 89 // Callback from the <code>getDevices</code> method. |
| 85 // |deviceInfos| : Array of object containing device information. | 90 // |deviceInfos| : Array of object containing device information. |
| 86 callback GetDevicesCallback = void(Device[] deviceInfos); | 91 callback GetDevicesCallback = void(Device[] deviceInfos); |
| 87 | 92 |
| 88 // Callback from the <code>startDiscovery</code> method. | 93 // Callback from the <code>startDiscovery</code> method. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 | 139 |
| 135 // Fired when information about a known Bluetooth device has changed. | 140 // Fired when information about a known Bluetooth device has changed. |
| 136 static void onDeviceChanged(Device device); | 141 static void onDeviceChanged(Device device); |
| 137 | 142 |
| 138 // Fired when a Bluetooth device that was previously discovered has been | 143 // Fired when a Bluetooth device that was previously discovered has been |
| 139 // out of range for long enough to be considered unavailable again, and | 144 // out of range for long enough to be considered unavailable again, and |
| 140 // when a paired device is removed. | 145 // when a paired device is removed. |
| 141 static void onDeviceRemoved(Device device); | 146 static void onDeviceRemoved(Device device); |
| 142 }; | 147 }; |
| 143 }; | 148 }; |
| OLD | NEW |