Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome/common/extensions/api/bluetooth.idl

Issue 246603008: Expose device RSSI and Tx power via the chrome.bluetooth API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forward-declare more APIs introduced in Lion Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // possible device types. When in doubt you should use the |deviceClass| 54 // possible device types. When in doubt you should use the |deviceClass|
55 // field directly. 55 // field directly.
56 DeviceType? type; 56 DeviceType? type;
57 57
58 // Indicates whether or not the device is paired with the system. 58 // Indicates whether or not the device is paired with the system.
59 boolean? paired; 59 boolean? paired;
60 60
61 // Indicates whether the device is currently connected to the system. 61 // Indicates whether the device is currently connected to the system.
62 boolean? connected; 62 boolean? connected;
63 63
64 // Indicates the RSSI ("received signal strength indication") of the
65 // connection to the device, measured in dBm, to a resolution of 1dBm.
66 // If the device is currently connected, then measures the RSSI of the
67 // connection signal. Otherwise, measures the RSSI of the last inquiry sent
68 // to the device, where available. Absent if unavailable.
69 long? rssi;
70
71 // Indicates the host's current transmit power ("Tx power") for the
72 // connection to the device, measured in dBm, to a resolution of 1dBm.
73 // This value is only available if the device is currently connected.
74 long? currentHostTransmitPower;
75
76 // Indicates the host's maximum transmit power ("Tx power") for the
77 // connection to the device, measured in dBm, to a resolution of 1dBm.
78 // This value is only available if the device is currently connected.
79 long? maximumHostTransmitPower;
80
64 // UUIDs of protocols, profiles and services advertised by the device. 81 // UUIDs of protocols, profiles and services advertised by the device.
65 // For classic Bluetooth devices, this list is obtained from EIR data and 82 // For classic Bluetooth devices, this list is obtained from EIR data and
66 // SDP tables. For Low Energy devices, this list is obtained from AD and 83 // SDP tables. For Low Energy devices, this list is obtained from AD and
67 // GATT primary services. For dual mode devices this may be obtained from 84 // GATT primary services. For dual mode devices this may be obtained from
68 // both. 85 // both.
69 DOMString[]? uuids; 86 DOMString[]? uuids;
70 }; 87 };
71 88
72 // Information about a Bluetooth profile. 89 // Information about a Bluetooth profile.
73 dictionary Profile { 90 dictionary Profile {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 static void onReceive(ReceiveInfo info); 380 static void onReceive(ReceiveInfo info);
364 381
365 // Event raised when a network error occured while the runtime was waiting 382 // Event raised when a network error occured while the runtime was waiting
366 // for data on the socket. Once this event is raised, the socket is set to 383 // for data on the socket. Once this event is raised, the socket is set to
367 // <code>paused</code> and no more <code>onReceive</code> events are raised 384 // <code>paused</code> and no more <code>onReceive</code> events are raised
368 // for this socket. 385 // for this socket.
369 // |info| : The event data. 386 // |info| : The event data.
370 static void onReceiveError(ReceiveErrorInfo info); 387 static void onReceiveError(ReceiveErrorInfo info);
371 }; 388 };
372 }; 389 };
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698