Chromium Code Reviews| 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..bb4aeb30908804f031052490d040f905f485eb98 100644 |
| --- a/device/bluetooth/dbus/bluetooth_adapter_client.h |
| +++ b/device/bluetooth/dbus/bluetooth_adapter_client.h |
| @@ -5,23 +5,24 @@ |
| #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" |
|
xiyuan
2016/06/22 15:53:06
Move to cc since we include callback_forward.h her
rkc
2016/06/22 21:06:38
Done.
|
| +#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/object_proxy.h" |
|
xiyuan
2016/06/22 15:53:06
nit: forward declare dbus::ObjectProxy and move th
rkc
2016/06/22 21:06:37
Done.
|
| #include "dbus/property.h" |
| #include "device/bluetooth/bluetooth_export.h" |
| #include "device/bluetooth/dbus/bluez_dbus_client.h" |
| namespace bluez { |
| +class BluetoothServiceRecordBlueZ; |
| + |
| // BluetoothAdapterClient is used to communicate with objects representing |
| // local Bluetooth Adapters. |
| class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient { |
| @@ -134,6 +135,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 +174,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(); |