| Index: device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.cc
|
| diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.cc
|
| index 3373da0d6ba7f87b0e14bd3d8754ca930207456b..12bad3daf691a07f31f00d8775b476c738d4796e 100644
|
| --- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.cc
|
| +++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.cc
|
| @@ -12,31 +12,36 @@ BluetoothGattCharacteristicDelegateWrapper::
|
| BluetoothGattCharacteristicDelegateWrapper(
|
| BluetoothLocalGattServiceBlueZ* service,
|
| BluetoothLocalGattCharacteristicBlueZ* characteristic)
|
| - : service_(service), characteristic_(characteristic) {}
|
| + : BluetoothGattAttributeValueDelegate(service),
|
| + characteristic_(characteristic) {}
|
|
|
| void BluetoothGattCharacteristicDelegateWrapper::GetValue(
|
| + const dbus::ObjectPath& device_path,
|
| const device::BluetoothLocalGattService::Delegate::ValueCallback& callback,
|
| const device::BluetoothLocalGattService::Delegate::ErrorCallback&
|
| error_callback) {
|
| - service_->GetDelegate()->OnCharacteristicReadRequest(
|
| - nullptr, characteristic_, 0, callback, error_callback);
|
| + service()->GetDelegate()->OnCharacteristicReadRequest(
|
| + GetDeviceWithPath(device_path), characteristic_, 0, callback,
|
| + error_callback);
|
| }
|
|
|
| void BluetoothGattCharacteristicDelegateWrapper::SetValue(
|
| + const dbus::ObjectPath& device_path,
|
| const std::vector<uint8_t>& value,
|
| const base::Closure& callback,
|
| const device::BluetoothLocalGattService::Delegate::ErrorCallback&
|
| error_callback) {
|
| - service_->GetDelegate()->OnCharacteristicWriteRequest(
|
| - nullptr, characteristic_, value, 0, callback, error_callback);
|
| + service()->GetDelegate()->OnCharacteristicWriteRequest(
|
| + GetDeviceWithPath(device_path), characteristic_, value, 0, callback,
|
| + error_callback);
|
| }
|
|
|
| void BluetoothGattCharacteristicDelegateWrapper::StartNotifications() {
|
| - service_->GetDelegate()->OnNotificationsStart(nullptr, characteristic_);
|
| + service()->GetDelegate()->OnNotificationsStart(nullptr, characteristic_);
|
| }
|
|
|
| void BluetoothGattCharacteristicDelegateWrapper::StopNotifications() {
|
| - service_->GetDelegate()->OnNotificationsStop(nullptr, characteristic_);
|
| + service()->GetDelegate()->OnNotificationsStop(nullptr, characteristic_);
|
| }
|
|
|
| } // namespace bluez
|
|
|