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 f6a1971eb5dfb43c92bcfc616f3a05622afb1866..f62124a87fcb3c346e604ec17095e208ea464104 100644 |
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h |
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h |
@@ -6,6 +6,7 @@ |
#define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_ |
#include <stdint.h> |
+#include <memory> |
#include <string> |
#include <vector> |
@@ -14,7 +15,7 @@ |
#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_attribute_value_delegate.h" |
#include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h" |
namespace bluez { |
@@ -25,6 +26,11 @@ namespace bluez { |
class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider |
: public BluetoothGattCharacteristicServiceProvider { |
public: |
+ // Originally defined in bluetooth_test.h. Redefining here because we don't |
+ // want to use test includes in this code. This code is compiled into |
+ // non-test code also at the moment. |
+ using NotificationType = std::tuple<std::string, std::vector<uint8_t>, bool>; |
+ |
FakeBluetoothGattCharacteristicServiceProvider( |
const dbus::ObjectPath& object_path, |
std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, |
@@ -34,7 +40,9 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider |
~FakeBluetoothGattCharacteristicServiceProvider() override; |
// BluetoothGattCharacteristicServiceProvider override. |
- void SendValueChanged(const std::vector<uint8_t>& value) override; |
+ void SendValueChanged(const dbus::ObjectPath& device_path, |
+ const std::vector<uint8_t>& value, |
+ bool indicate) override; |
// 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 |
@@ -58,7 +66,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider |
const dbus::ObjectPath& object_path() const override; |
const std::string& uuid() const { return uuid_; } |
const dbus::ObjectPath& service_path() const { return service_path_; } |
- const std::vector<uint8_t>& sent_value() const { return sent_value_; } |
+ const NotificationType& sent_value() const { return sent_value_; } |
private: |
// D-Bus object path of the fake GATT characteristic. |
@@ -74,7 +82,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattCharacteristicServiceProvider |
const dbus::ObjectPath service_path_; |
// Value that was sent to the fake remote device. |
- std::vector<uint8_t> sent_value_; |
+ NotificationType sent_value_; |
// The delegate that method calls are passed on to. |
std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_; |