| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 boolean? paired; | 63 boolean? paired; |
| 64 | 64 |
| 65 // Indicates whether the device is currently connected to the system. | 65 // Indicates whether the device is currently connected to the system. |
| 66 boolean? connected; | 66 boolean? connected; |
| 67 | 67 |
| 68 // Indicates the RSSI ("received signal strength indication") of the | 68 // Indicates the RSSI ("received signal strength indication") of the |
| 69 // connection to the device, measured in dBm, to a resolution of 1dBm. | 69 // connection to the device, measured in dBm, to a resolution of 1dBm. |
| 70 // If the device is currently connected, then measures the RSSI of the | 70 // If the device is currently connected, then measures the RSSI of the |
| 71 // connection signal. Otherwise, measures the RSSI of the last inquiry sent | 71 // connection signal. Otherwise, measures the RSSI of the last inquiry sent |
| 72 // to the device, where available. Absent if unavailable. | 72 // to the device, where available. Absent if unavailable. |
| 73 long? rssi; | 73 [nodoc] long? rssi; |
| 74 | 74 |
| 75 // Indicates the host's current transmit power ("Tx power") for the | 75 // Indicates the host's current transmit power ("Tx power") for the |
| 76 // connection to the device, measured in dBm, to a resolution of 1dBm. | 76 // connection to the device, measured in dBm, to a resolution of 1dBm. |
| 77 // This value is only available if the device is currently connected. | 77 // This value is only available if the device is currently connected. |
| 78 long? currentHostTransmitPower; | 78 [nodoc] long? currentHostTransmitPower; |
| 79 | 79 |
| 80 // Indicates the host's maximum transmit power ("Tx power") for the | 80 // Indicates the host's maximum transmit power ("Tx power") for the |
| 81 // connection to the device, measured in dBm, to a resolution of 1dBm. | 81 // connection to the device, measured in dBm, to a resolution of 1dBm. |
| 82 // This value is only available if the device is currently connected. | 82 // This value is only available if the device is currently connected. |
| 83 long? maximumHostTransmitPower; | 83 [nodoc] long? maximumHostTransmitPower; |
| 84 | 84 |
| 85 // UUIDs of protocols, profiles and services advertised by the device. | 85 // UUIDs of protocols, profiles and services advertised by the device. |
| 86 // For classic Bluetooth devices, this list is obtained from EIR data and | 86 // For classic Bluetooth devices, this list is obtained from EIR data and |
| 87 // SDP tables. For Low Energy devices, this list is obtained from AD and | 87 // SDP tables. For Low Energy devices, this list is obtained from AD and |
| 88 // GATT primary services. For dual mode devices this may be obtained from | 88 // GATT primary services. For dual mode devices this may be obtained from |
| 89 // both. | 89 // both. |
| 90 DOMString[]? uuids; | 90 DOMString[]? uuids; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 // Callback from the <code>getDevice</code> method. | 93 // Callback from the <code>getDevice</code> method. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Fired when information about a known Bluetooth device has changed. | 148 // Fired when information about a known Bluetooth device has changed. |
| 149 static void onDeviceChanged(Device device); | 149 static void onDeviceChanged(Device device); |
| 150 | 150 |
| 151 // Fired when a Bluetooth device that was previously discovered has been | 151 // Fired when a Bluetooth device that was previously discovered has been |
| 152 // out of range for long enough to be considered unavailable again, and | 152 // out of range for long enough to be considered unavailable again, and |
| 153 // when a paired device is removed. | 153 // when a paired device is removed. |
| 154 static void onDeviceRemoved(Device device); | 154 static void onDeviceRemoved(Device device); |
| 155 }; | 155 }; |
| 156 }; | 156 }; |
| OLD | NEW |