| Index: device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
|
| diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
|
| index c43f5c7e899c84cb06315ec65375a1df2027d769..343df50e2bb3a09d619df6893458babba6dd5486 100644
|
| --- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
|
| +++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
|
| @@ -8,6 +8,10 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "dbus/object_path.h"
|
| +#include "device/bluetooth/bluetooth_gatt_characteristic.h"
|
| +#include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
|
| +#include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h"
|
| #include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h"
|
|
|
| namespace device {
|
| @@ -67,6 +71,20 @@ BluetoothLocalGattCharacteristicBlueZ::GetPermissions() const {
|
| return Permissions();
|
| }
|
|
|
| +device::BluetoothLocalGattCharacteristic::NotificationStatus
|
| +BluetoothLocalGattCharacteristicBlueZ::NotifyValueChanged(
|
| + const std::vector<uint8_t>& new_value,
|
| + bool indicate) {
|
| + if (indicate && !(properties_ & PROPERTY_INDICATE))
|
| + return INDICATE_PROPERTY_NOT_SET;
|
| + if (!indicate && !(properties_ & PROPERTY_NOTIFY))
|
| + return NOTIFY_PROPERTY_NOT_SET;
|
| + DCHECK(service_);
|
| + return service_->GetAdapter()->SendValueChanged(this, new_value)
|
| + ? NOTIFICATION_SUCCESS
|
| + : SERVICE_NOT_REGISTERED;
|
| +}
|
| +
|
| BluetoothLocalGattServiceBlueZ*
|
| BluetoothLocalGattCharacteristicBlueZ::GetService() {
|
| return service_;
|
|
|