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

Unified Diff: device/bluetooth/bluetooth_device_mac.h

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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_device_mac.h
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
index ec87ff7ce29fb0e302896cae6999f87fd1aa8f28..1503f1dc12778fc11a76cd8e7f79c84f04a8b708 100644
--- a/device/bluetooth/bluetooth_device_mac.h
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -5,6 +5,8 @@
#ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
#define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
+#import <IOBluetooth/IOBluetooth.h>
+
#include <string>
#include "base/basictypes.h"
@@ -32,6 +34,9 @@ class BluetoothDeviceMac : public BluetoothDevice {
virtual uint16 GetVendorID() const OVERRIDE;
virtual uint16 GetProductID() const OVERRIDE;
virtual uint16 GetDeviceID() const OVERRIDE;
+ virtual int GetRSSI() const OVERRIDE;
+ virtual int GetCurrentHostTransmitPower() const OVERRIDE;
+ virtual int GetMaximumHostTransmitPower() const OVERRIDE;
virtual bool IsPaired() const OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectable() const OVERRIDE;
@@ -72,6 +77,11 @@ class BluetoothDeviceMac : public BluetoothDevice {
private:
friend class BluetoothAdapterMac;
+ // Implementation to read the host's transmit power level of type
+ // |power_level_type|.
+ int GetHostTransmitPower(
+ BluetoothHCITransmitPowerLevelType power_level_type) const;
+
// List of observers interested in event notifications from us.
ObserverList<Observer> observers_;

Powered by Google App Engine
This is Rietveld 408576698