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

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

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
Index: device/bluetooth/bluez/bluetooth_device_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h
index 1084433a402a451a0a020d32a277aa031dc6fc65..3322c473f16e8f1b26c26c8c460207dbf83626e7 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -9,6 +9,8 @@
#include <memory>
#include <string>
+#include <unordered_set>
+#include <vector>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -103,6 +105,20 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
void GetServiceRecords(const GetServiceRecordsCallback& callback,
const GetServiceRecordsErrorCallback& error_callback);
+ // Called by BluetoothAdapterBlueZ to update BluetoothDevice->service_data_
+ // when receive DevicePropertyChanged event for the service data property.
+ // Note that
+ // 1) BlueZ persists all service data meaning that BlueZ won't remove service
+ // data even when a device stops advertising service data.
+ // 2) BlueZ sends DevicePropertyChanged event separately for each UUID that
+ // service data changed. Meaning that UpdateServiceData() might get called
+ // multiple times when there are multiple UUIDs that service data changed.
+ // 3) When a device update service data for a UUID, BlueZ update data for that
+ // UUID if it is already exist. If not BlueZ adds that data for UUID.
+ // This means BlueZ won't remove service data even when a device stops
+ // advertising service data for a UUID.
+ void UpdateServiceData();
+
// Creates a pairing object with the given delegate |pairing_delegate| and
// establishes it as the pairing context for this device. All pairing-related
// method calls will be forwarded to this object until it is released.
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | device/bluetooth/bluez/bluetooth_device_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698