Chromium Code Reviews| Index: content/common/bluetooth/bluetooth_device.h |
| diff --git a/content/common/bluetooth/bluetooth_device.h b/content/common/bluetooth/bluetooth_device.h |
| index 73aef998b4bc768ac651ad62176062380a977147..575f43af1c796ed173cb0144f106fea81dce1222 100644 |
| --- a/content/common/bluetooth/bluetooth_device.h |
| +++ b/content/common/bluetooth/bluetooth_device.h |
| @@ -20,6 +20,8 @@ struct CONTENT_EXPORT BluetoothDevice { |
| BluetoothDevice(); |
| BluetoothDevice(const std::string& id, |
| const base::string16& name, |
| + int8_t tx_power, |
| + int8_t rssi, |
|
palmer
2015/11/04 21:57:19
Elsewhere in the code (in other code, e.g. device/
ortuno
2015/11/04 22:45:58
According to the Bluetooth Spec RSSI and Tx Power
|
| uint32 device_class, |
| device::BluetoothDevice::VendorIDSource vendor_id_source, |
| uint16 vendor_id, |
| @@ -31,9 +33,18 @@ struct CONTENT_EXPORT BluetoothDevice { |
| static std::vector<std::string> UUIDsFromBluetoothUUIDs( |
| const device::BluetoothDevice::UUIDList& uuid_list); |
| + // 127 is used as Unknown Power. According to the Bluetooth spec valid powers |
| + // are between [-127, 127]. Anything outside this range will be considered |
| + // Unknown Power. |
| + static int8_t ValidatePower(int16_t power); |
|
palmer
2015/11/04 21:57:19
So sometimes you have to take in larger ints, but
ortuno
2015/11/04 22:45:58
As mentioned above. This is just in case. In theor
|
| + // TODO(ortuno): RSSI Unknown and Tx Power Unknown should have different |
| + // values. Add kUnknownTxPower when implemented: http://crbug.com/551572 |
| + const static int8_t kUnknownPower = 127; |
| std::string id; |
| base::string16 name; |
| + int8_t tx_power; |
| + int8_t rssi; |
| uint32 device_class; |
| device::BluetoothDevice::VendorIDSource vendor_id_source; |
| uint16 vendor_id; |