| Index: device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
|
| diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
|
| index 4d70234ba3696d313956ec21538849ecc77a0f8b..677b20a2a7630762417b2269acf388d0bec596d2 100644
|
| --- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
|
| +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
|
| @@ -6,13 +6,15 @@
|
| #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
|
|
|
| #include <stdint.h>
|
| -
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| #include "dbus/object_path.h"
|
| #include "device/bluetooth/bluetooth_export.h"
|
| +#include "device/bluetooth/bluetooth_local_gatt_service.h"
|
| +#include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h"
|
| #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h"
|
|
|
| namespace bluez {
|
| @@ -25,7 +27,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider
|
| public:
|
| FakeBluetoothGattCharacteristicServiceProvider(
|
| const dbus::ObjectPath& object_path,
|
| - Delegate* delegate,
|
| + std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate,
|
| const std::string& uuid,
|
| const std::vector<std::string>& flags,
|
| const std::vector<std::string>& permissions,
|
| @@ -38,13 +40,18 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider
|
| // Methods to simulate value get/set requests issued from a remote device. The
|
| // methods do nothing, if the associated service was not registered with the
|
| // GATT manager.
|
| - void GetValue(const Delegate::ValueCallback& callback,
|
| - const Delegate::ErrorCallback& error_callback);
|
| - void SetValue(const std::vector<uint8_t>& value,
|
| - const base::Closure& callback,
|
| - const Delegate::ErrorCallback& error_callback);
|
| -
|
| - const dbus::ObjectPath& object_path() const { return object_path_; }
|
| + void GetValue(
|
| + const device::BluetoothLocalGattService::Delegate::ValueCallback&
|
| + callback,
|
| + const device::BluetoothLocalGattService::Delegate::ErrorCallback&
|
| + error_callback);
|
| + void SetValue(
|
| + const std::vector<uint8_t>& value,
|
| + const base::Closure& callback,
|
| + const device::BluetoothLocalGattService::Delegate::ErrorCallback&
|
| + error_callback);
|
| +
|
| + const dbus::ObjectPath& object_path() const override;
|
| const std::string& uuid() const { return uuid_; }
|
| const dbus::ObjectPath& service_path() const { return service_path_; }
|
|
|
| @@ -59,7 +66,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider
|
| dbus::ObjectPath service_path_;
|
|
|
| // The delegate that method calls are passed on to.
|
| - Delegate* delegate_;
|
| + std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicServiceProvider);
|
| };
|
|
|