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

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

Issue 2102093003: Implement BluetoothDeviceBlueZ::GetServiceRecords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « no previous file | device/bluetooth/bluez/bluetooth_device_bluez.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 911c42e6601f39dfa27721a1d39c66308406a42b..41d67aaad8b74ead2243089771bd569090e17f4f 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -18,6 +18,7 @@
#include "device/bluetooth/bluetooth_common.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_export.h"
+#include "device/bluetooth/bluez/bluetooth_service_record_bluez.h"
#include "device/bluetooth/dbus/bluetooth_device_client.h"
#include "device/bluetooth/dbus/bluetooth_gatt_service_client.h"
@@ -29,7 +30,6 @@ namespace bluez {
class BluetoothAdapterBlueZ;
class BluetoothPairingBlueZ;
-class BluetoothServiceRecordBlueZ;
// The BluetoothDeviceBlueZ class implements BluetoothDevice for platforms using
// BlueZ.
@@ -43,6 +43,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
public bluez::BluetoothDeviceClient::Observer,
public bluez::BluetoothGattServiceClient::Observer {
public:
+ using GetServiceRecordsCallback =
+ base::Callback<void(const std::vector<BluetoothServiceRecordBlueZ>&)>;
+ using GetServiceRecordsErrorCallback =
+ base::Callback<void(BluetoothServiceRecordBlueZ::ErrorCode)>;
+
// BluetoothDevice override
uint32_t GetBluetoothClass() const override;
device::BluetoothTransport GetType() const override;
@@ -96,7 +101,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
// Returns the complete list of service records discovered for on this
// device via SDP. If called before discovery is complete, it may return
// an incomplete list and/or stale cached records.
- std::vector<BluetoothServiceRecordBlueZ*> GetServiceRecords();
+ void GetServiceRecords(const GetServiceRecordsCallback& callback,
+ const GetServiceRecordsErrorCallback& error_callback);
// Creates a pairing object with the given delegate |pairing_delegate| and
// establishes it as the pairing context for this device. All pairing-related
@@ -156,6 +162,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
const std::string& error_name,
const std::string& error_message);
+ // Called by dbus:: in case of an error during the GetServiceRecords API call.
+ void OnGetServiceRecordsError(
+ const GetServiceRecordsErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
+
// Internal method to initiate a connection to this device, and methods called
// by dbus:: on completion of the D-Bus method call.
void ConnectInternal(bool after_pairing,
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_device_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698