Chromium Code Reviews| 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..53e628cbeb7304267f984796546207ff647c5ef5 100644 |
| --- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc |
| +++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc |
| @@ -4,10 +4,15 @@ |
| #include "device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h" |
| +#include <cstdint> |
|
xiyuan
2016/05/12 19:49:43
nit: Do we still need a header when it is already
rkc
2016/05/12 20:12:49
Not sure why eclipse's IWYU tool keeps putting it
|
| #include <string> |
| #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 +72,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_; |