| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <iterator> | 5 #include <iterator> |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "dbus/property.h" | 8 #include "dbus/property.h" |
| 9 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" | 9 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" |
| 10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" | 10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 bluez::BluetoothGattCharacteristicClient::Properties* properties = | 236 bluez::BluetoothGattCharacteristicClient::Properties* properties = |
| 237 bluez::BluezDBusManager::Get() | 237 bluez::BluezDBusManager::Get() |
| 238 ->GetBluetoothGattCharacteristicClient() | 238 ->GetBluetoothGattCharacteristicClient() |
| 239 ->GetProperties(object_path); | 239 ->GetProperties(object_path); |
| 240 | 240 |
| 241 DCHECK(properties); | 241 DCHECK(properties); |
| 242 DCHECK(GetAdapter()); | 242 DCHECK(GetAdapter()); |
| 243 | 243 |
| 244 if (property_name == properties->flags.name()) | 244 if (property_name == properties->flags.name()) |
| 245 NotifyServiceChanged(); | 245 NotifyServiceChanged(); |
| 246 else if (property_name == properties->value.name()) | 246 else if (property_name == properties->value.name()) { |
| 247 GetAdapter()->NotifyGattCharacteristicValueChanged( | 247 if (iter->second->characteristic_value_read_in_progress()) { |
| 248 iter->second, properties->value.value()); | 248 iter->second->set_characteristic_value_read_in_progress(false); |
| 249 } else { |
| 250 GetAdapter()->NotifyGattCharacteristicValueChanged( |
| 251 iter->second, properties->value.value()); |
| 252 } |
| 253 } |
| 249 } | 254 } |
| 250 | 255 |
| 251 } // namespace bluez | 256 } // namespace bluez |
| OLD | NEW |