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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // possible device types. When in doubt you should use the |deviceClass| | 59 // possible device types. When in doubt you should use the |deviceClass| |
60 // field directly. | 60 // field directly. |
61 DeviceType? type; | 61 DeviceType? type; |
62 | 62 |
63 // Indicates whether or not the device is paired with the system. | 63 // Indicates whether or not the device is paired with the system. |
64 boolean? paired; | 64 boolean? paired; |
65 | 65 |
66 // Indicates whether the device is currently connected to the system. | 66 // Indicates whether the device is currently connected to the system. |
67 boolean? connected; | 67 boolean? connected; |
68 | 68 |
| 69 // Indicates whether the device is currently connecting to the system. |
| 70 boolean? connecting; |
| 71 |
| 72 // Indicates whether the device is connectable. |
| 73 boolean? connectable; |
| 74 |
69 // UUIDs of protocols, profiles and services advertised by the device. | 75 // UUIDs of protocols, profiles and services advertised by the device. |
70 // For classic Bluetooth devices, this list is obtained from EIR data and | 76 // For classic Bluetooth devices, this list is obtained from EIR data and |
71 // SDP tables. For Low Energy devices, this list is obtained from AD and | 77 // SDP tables. For Low Energy devices, this list is obtained from AD and |
72 // GATT primary services. For dual mode devices this may be obtained from | 78 // GATT primary services. For dual mode devices this may be obtained from |
73 // both. | 79 // both. |
74 DOMString[]? uuids; | 80 DOMString[]? uuids; |
75 | 81 |
76 // The received signal strength, in dBm. This field is avaliable and valid | 82 // The received signal strength, in dBm. This field is avaliable and valid |
77 // only during discovery. Outside of discovery it's value is not specified. | 83 // only during discovery. Outside of discovery it's value is not specified. |
78 long? inquiryRssi; | 84 long? inquiryRssi; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 146 |
141 // Fired when information about a known Bluetooth device has changed. | 147 // Fired when information about a known Bluetooth device has changed. |
142 static void onDeviceChanged(Device device); | 148 static void onDeviceChanged(Device device); |
143 | 149 |
144 // Fired when a Bluetooth device that was previously discovered has been | 150 // Fired when a Bluetooth device that was previously discovered has been |
145 // out of range for long enough to be considered unavailable again, and | 151 // out of range for long enough to be considered unavailable again, and |
146 // when a paired device is removed. | 152 // when a paired device is removed. |
147 static void onDeviceRemoved(Device device); | 153 static void onDeviceRemoved(Device device); |
148 }; | 154 }; |
149 }; | 155 }; |
OLD | NEW |