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

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

Issue 2369423003: bluetooth: Expose service data from BlueZ (Closed)
Patch Set: More 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..3eca5937d983c0472b1bbd959608ae4697ab5dd4 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.
ortuno 2016/10/06 02:09:01 nit: s/meaning/Meaning Damn, this is unfortunate.
puthik_chromium 2016/10/06 02:26:12 Done.
+ // 3) When a device update service data for a UUID, BlueZ update data for that
+ // UUID if it is already exist. If not BlueZ added that data for UUID.
ortuno 2016/10/06 02:09:01 s/added/adds/
puthik_chromium 2016/10/06 02:26:12 Done.
+ // This means BlueZ won't remove service data even a device stops advertise
ortuno 2016/10/06 02:09:01 s/even/even when/ and s/advertise/advertising/
puthik_chromium 2016/10/06 02:26:12 Done.
+ // 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.

Powered by Google App Engine
This is Rietveld 408576698