Index: device/bluetooth/bluetooth_device.h |
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h |
index 6b27bd05ec1d63a74eb2500def8364043d909915..8391703c0dbd80fe750355f4ce71fb7259aa46c1 100644 |
--- a/device/bluetooth/bluetooth_device.h |
+++ b/device/bluetooth/bluetooth_device.h |
@@ -216,6 +216,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
virtual ~BluetoothDevice(); |
+ static int8_t ClampPower(int power); |
Jeffrey Yasskin
2016/08/24 04:32:02
Comment what this does.
ortuno
2016/08/24 21:29:09
Done.
|
+ |
// Returns the Bluetooth class of the device, used by GetDeviceType() |
// and metrics logging, |
virtual uint32_t GetBluetoothClass() const = 0; |
@@ -331,12 +333,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
// The received signal strength, in dBm. This field is avaliable and valid |
// only during discovery. |
- virtual base::Optional<int8_t> GetInquiryRSSI() const = 0; |
+ virtual base::Optional<int8_t> GetInquiryRSSI() const; |
Jeffrey Yasskin
2016/08/24 04:32:02
Now that these have concrete implementations, does
ortuno
2016/08/24 21:29:09
BlueZ still has a different implementation. I was
Jeffrey Yasskin
2016/08/24 22:32:07
Yep. Maybe a TODO to devirtualize once BlueZ is up
ortuno
2016/08/25 16:42:34
Done.
|
// The transmitted power level. This field is avaliable only for LE devices |
// that include this field in AD. It is avaliable and valid only during |
// discovery. |
- virtual base::Optional<int8_t> GetInquiryTxPower() const = 0; |
+ virtual base::Optional<int8_t> GetInquiryTxPower() const; |
// The ErrorCallback is used for methods that can fail in which case it |
// is called, in the success case the callback is simply not called. |
@@ -512,8 +514,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
// Called by BluetoothAdapter when a new Advertisement is seen for this |
// device. This replaces previously seen Advertisement Data. |
- void UpdateAdvertisementData(UUIDList advertised_uuids, |
- ServiceDataMap service_data); |
+ void UpdateAdvertisementData(int8_t rssi, |
+ UUIDList advertised_uuids, |
+ ServiceDataMap service_data, |
+ const int8_t* tx_power); |
// Called by BluetoothAdapter when it stops discoverying. |
void ClearAdvertisementData(); |
@@ -617,6 +621,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice { |
GattServiceMap gatt_services_; |
bool gatt_services_discovery_complete_; |
+ // Received Signal Strength Indicator of the advertisement received. |
+ base::Optional<int8_t> inquiry_rssi_; |
+ |
+ // Tx Power advertised by the device. |
+ base::Optional<int8_t> inquiry_tx_power_; |
+ |
// Class that holds the union of Advertised UUIDs and Service UUIDs. |
DeviceUUIDs device_uuids_; |