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

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: Implemented as a property of the Device object Created 6 years, 8 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 current
65 // connection to the device, measured in dBm, to a resolution of 1dBm.
66 // This value is only available if the device is currently connected.
67 long? rssi;
68
69 // Indicates the host's current transmit power ("Tx power") for the
70 // connection to the device, measured in dBm, to a resolution of 1dBm.
71 // This value is only available if the device is currently connected.
72 long? currentHostTransmitPower;
73
74 // Indicates the host's maximum transmit power ("Tx power") for the
75 // connection to the device, measured in dBm, to a resolution of 1dBm.
76 // This value is only available if the device is currently connected.
77 long? maximumHostTransmitPower;
78
64 // UUIDs of protocols, profiles and services advertised by the device. 79 // UUIDs of protocols, profiles and services advertised by the device.
65 // For classic Bluetooth devices, this list is obtained from EIR data and 80 // 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 81 // 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 82 // GATT primary services. For dual mode devices this may be obtained from
68 // both. 83 // both.
69 DOMString[]? uuids; 84 DOMString[]? uuids;
70 }; 85 };
71 86
72 // Information about a Bluetooth profile. 87 // Information about a Bluetooth profile.
73 dictionary Profile { 88 dictionary Profile {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 static void onReceive(ReceiveInfo info); 378 static void onReceive(ReceiveInfo info);
364 379
365 // Event raised when a network error occured while the runtime was waiting 380 // 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 381 // 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 382 // <code>paused</code> and no more <code>onReceive</code> events are raised
368 // for this socket. 383 // for this socket.
369 // |info| : The event data. 384 // |info| : The event data.
370 static void onReceiveError(ReceiveErrorInfo info); 385 static void onReceiveError(ReceiveErrorInfo info);
371 }; 386 };
372 }; 387 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698