Index: device/bluetooth/dbus/bluetooth_adapter_client.h |
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.h b/device/bluetooth/dbus/bluetooth_adapter_client.h |
index 199b99293c3d8cc19e7d187d1f4a4fd8cba608d9..ba625268a864e439aa4c4ae79537a6385f1a4277 100644 |
--- a/device/bluetooth/dbus/bluetooth_adapter_client.h |
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.h |
@@ -5,23 +5,26 @@ |
#ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ |
#define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ |
-#include <stdint.h> |
- |
+#include <cstdint> |
#include <memory> |
#include <string> |
#include <vector> |
-#include "base/callback.h" |
+#include "base/callback_forward.h" |
#include "base/macros.h" |
-#include "base/observer_list.h" |
-#include "base/values.h" |
#include "dbus/object_path.h" |
#include "dbus/property.h" |
#include "device/bluetooth/bluetooth_export.h" |
#include "device/bluetooth/dbus/bluez_dbus_client.h" |
+namespace dbus { |
+class ObjectProxy; |
+} |
+ |
namespace bluez { |
+class BluetoothServiceRecordBlueZ; |
+ |
// BluetoothAdapterClient is used to communicate with objects representing |
// local Bluetooth Adapters. |
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient { |
@@ -134,6 +137,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient { |
// any values should be copied if needed. |
virtual Properties* GetProperties(const dbus::ObjectPath& object_path) = 0; |
+ // Callback used to send back the handle of a created service record. |
+ using ServiceRecordCallback = base::Callback<void(uint32_t)>; |
+ |
// The ErrorCallback is used by adapter methods to indicate failure. |
// It receives two arguments: the name of the error in |error_name| and |
// an optional message in |error_message|. |
@@ -170,6 +176,20 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient { |
const base::Closure& callback, |
const ErrorCallback& error_callback) = 0; |
+ // Creates the service record |record| on the adapter with the object path |
+ // |object_path|. |
+ virtual void CreateServiceRecord(const dbus::ObjectPath& object_path, |
+ const BluetoothServiceRecordBlueZ& record, |
+ const ServiceRecordCallback& callback, |
+ const ErrorCallback& error_callback) = 0; |
+ |
+ // Removes the service record with the uuid |uuid| on the adapter with the |
+ // object path |object_path|. |
+ virtual void RemoveServiceRecord(const dbus::ObjectPath& object_path, |
+ uint32_t handle, |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) = 0; |
+ |
// Creates the instance. |
static BluetoothAdapterClient* Create(); |