Chromium Code Reviews| Index: device/bluetooth/bluez/bluetooth_device_bluez.cc |
| diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| index 9f1b448fea9e7b8f2de36bcf3856c9ea3b5ed762..1950af8b7c8ce1a9c82c4323592871667254f477 100644 |
| --- a/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| +++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| @@ -375,6 +375,29 @@ BluetoothDevice::UUIDSet BluetoothDeviceBlueZ::GetUUIDs() const { |
| return uuids; |
| } |
| +std::unordered_map<uint16_t, std::vector<uint8_t>> |
| +BluetoothDeviceBlueZ::GetManufacturerData() const { |
| + bluez::BluetoothDeviceClient::Properties* properties = |
| + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| + object_path_); |
| + DCHECK(properties); |
| + |
| + if (!properties->manufacturer_data.is_valid()) |
| + return std::unordered_map<uint16_t, std::vector<uint8_t>>(); |
| + |
| + return properties->manufacturer_data.value(); |
| +} |
| + |
| +base::Optional<uint8_t> BluetoothDeviceBlueZ::GetFlags() const { |
| + bluez::BluetoothDeviceClient::Properties* properties = |
| + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| + object_path_); |
| + DCHECK(properties); |
| + |
| + // BlueZ always have flags available. |
|
ortuno
2016/10/14 00:15:10
Can you DCHECK this? Also I don't think this is tr
Rahul Chaturvedi
2016/10/17 20:41:21
This is not true. Depending on the version of Blue
puthik_chromium
2016/10/17 23:30:32
I added the check if it is valid or not.
|
| + return properties->flags.value(); |
| +} |
| + |
| base::Optional<int8_t> BluetoothDeviceBlueZ::GetInquiryRSSI() const { |
| bluez::BluetoothDeviceClient::Properties* properties = |
| bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |