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

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

Issue 2369423003: bluetooth: Expose service data from BlueZ (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
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.h ('k') | device/bluetooth/dbus/bluetooth_device_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 417ed161d40b86266ffbb43cea208a835ae1a5ec..9f1b448fea9e7b8f2de36bcf3856c9ea3b5ed762 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -595,6 +595,18 @@ void BluetoothDeviceBlueZ::GetServiceRecords(
weak_ptr_factory_.GetWeakPtr(), error_callback));
}
+void BluetoothDeviceBlueZ::UpdateServiceData() {
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
+ DCHECK(properties);
+ DCHECK(properties->service_data.is_valid());
+
+ service_data_.clear();
+ for (const auto& pair : properties->service_data.value())
+ service_data_[BluetoothUUID(pair.first)] = pair.second;
+}
+
BluetoothPairingBlueZ* BluetoothDeviceBlueZ::BeginPairing(
BluetoothDevice::PairingDelegate* pairing_delegate) {
pairing_.reset(new BluetoothPairingBlueZ(this, pairing_delegate));
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.h ('k') | device/bluetooth/dbus/bluetooth_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698