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

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

Issue 2084463002: BlueZ + DBus implementations of create/remove service record functions. (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 | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_adapter_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.h b/device/bluetooth/bluez/bluetooth_adapter_bluez.h
index f629459d6d9bfa9f1861002c18052e179e16ce64..cafbdae2a0dc9a350ee020f568c89380acfaf7d1 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.h
@@ -77,6 +77,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
base::Callback<void(const std::string& error_message)>;
using ProfileRegisteredCallback =
base::Callback<void(BluetoothAdapterProfileBlueZ* profile)>;
+ using ServiceRecordCallback = base::Callback<void(uint32_t)>;
using ServiceRecordErrorCallback =
base::Callback<void(BluetoothServiceRecordBlueZ::ErrorCode)>;
@@ -134,13 +135,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
// only creates the record, it does not create a listening socket for the
// service.
void CreateServiceRecord(const BluetoothServiceRecordBlueZ& record,
- const base::Closure& callback,
+ const ServiceRecordCallback& callback,
const ServiceRecordErrorCallback& error_callback);
// Removes a service record from the SDP server. This would result in the
// service not being discoverable in any further scans of the adapter. Any
// sockets listening on this service will need to be closed separately.
- void RemoveServiceRecord(const device::BluetoothUUID& uuid,
+ void RemoveServiceRecord(uint32_t handle,
const base::Closure& callback,
const ServiceRecordErrorCallback& error_callback);
@@ -421,6 +422,14 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
const std::string& error_name,
const std::string& error_message);
+ // Called by dbus:: on an error while trying to create or remove a service
+ // record. Translates the error name/message into a
+ // BluetoothServiceRecordBlueZ::ErrorCode value.
+ void ServiceRecordErrorConnector(
+ const ServiceRecordErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
+
InitCallback init_callback_;
bool initialized_;
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698