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

Unified Diff: device/bluetooth/bluez/bluetooth_device_bluez.cc

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: Created 4 years, 2 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/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(

Powered by Google App Engine
This is Rietveld 408576698