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

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

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: fix comment 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..81398387a536c19ce03d518fb2081780a4d957ee 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -375,6 +375,17 @@ BluetoothDevice::UUIDSet BluetoothDeviceBlueZ::GetUUIDs() const {
return uuids;
}
+base::Optional<uint8_t> BluetoothDeviceBlueZ::GetAdvertisingDataFlags() const {
ortuno 2016/10/18 01:41:19 Also please follow the same pattern as Manufacture
puthik_chromium 2016/11/02 23:20:38 Done.
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
+ DCHECK(properties);
+
+ if (properties->advertising_data_flags.is_valid())
+ return properties->advertising_data_flags.value();
+ return base::nullopt;
+}
+
base::Optional<int8_t> BluetoothDeviceBlueZ::GetInquiryRSSI() const {
bluez::BluetoothDeviceClient::Properties* properties =
bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
@@ -607,6 +618,18 @@ void BluetoothDeviceBlueZ::UpdateServiceData() {
service_data_[BluetoothUUID(pair.first)] = pair.second;
}
+void BluetoothDeviceBlueZ::UpdateManufacturerData() {
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
+ DCHECK(properties);
+ DCHECK(properties->manufacturer_data.is_valid());
ortuno 2016/10/18 01:41:18 manufacturer data is optional so this would is not
puthik_chromium 2016/11/02 23:20:38 Done.
+
+ manufacturer_data_.clear();
+ for (const auto& pair : properties->manufacturer_data.value())
+ manufacturer_data_[pair.first] = pair.second;
+}
+
BluetoothPairingBlueZ* BluetoothDeviceBlueZ::BeginPairing(
BluetoothDevice::PairingDelegate* pairing_delegate) {
pairing_.reset(new BluetoothPairingBlueZ(this, pairing_delegate));

Powered by Google App Engine
This is Rietveld 408576698