OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "device/bluetooth/bluetooth_remote_gatt_service_bluez.h" | 5 #include "device/bluetooth/bluetooth_remote_gatt_service_bluez.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "device/bluetooth/bluetooth_adapter_bluez.h" | 9 #include "device/bluetooth/bluetooth_adapter_bluez.h" |
10 #include "device/bluetooth/bluetooth_device_bluez.h" | 10 #include "device/bluetooth/bluetooth_device_bluez.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 adapter_->NotifyGattDescriptorAdded(descriptor); | 211 adapter_->NotifyGattDescriptorAdded(descriptor); |
212 return; | 212 return; |
213 } | 213 } |
214 | 214 |
215 adapter_->NotifyGattDescriptorRemoved(descriptor); | 215 adapter_->NotifyGattDescriptorRemoved(descriptor); |
216 } | 216 } |
217 | 217 |
218 void BluetoothRemoteGattServiceBlueZ::NotifyDescriptorValueChanged( | 218 void BluetoothRemoteGattServiceBlueZ::NotifyDescriptorValueChanged( |
219 BluetoothRemoteGattCharacteristicBlueZ* characteristic, | 219 BluetoothRemoteGattCharacteristicBlueZ* characteristic, |
220 BluetoothRemoteGattDescriptorBlueZ* descriptor, | 220 BluetoothRemoteGattDescriptorBlueZ* descriptor, |
221 const std::vector<uint8>& value) { | 221 const std::vector<uint8_t>& value) { |
222 DCHECK(characteristic->GetService() == this); | 222 DCHECK(characteristic->GetService() == this); |
223 DCHECK(descriptor->GetCharacteristic() == characteristic); | 223 DCHECK(descriptor->GetCharacteristic() == characteristic); |
224 DCHECK(adapter_); | 224 DCHECK(adapter_); |
225 adapter_->NotifyGattDescriptorValueChanged(descriptor, value); | 225 adapter_->NotifyGattDescriptorValueChanged(descriptor, value); |
226 } | 226 } |
227 | 227 |
228 void BluetoothRemoteGattServiceBlueZ::GattServicePropertyChanged( | 228 void BluetoothRemoteGattServiceBlueZ::GattServicePropertyChanged( |
229 const dbus::ObjectPath& object_path, | 229 const dbus::ObjectPath& object_path, |
230 const std::string& property_name) { | 230 const std::string& property_name) { |
231 if (object_path != object_path_) | 231 if (object_path != object_path_) |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 DCHECK(adapter_); | 329 DCHECK(adapter_); |
330 | 330 |
331 if (property_name == properties->flags.name()) | 331 if (property_name == properties->flags.name()) |
332 NotifyServiceChanged(); | 332 NotifyServiceChanged(); |
333 else if (property_name == properties->value.name()) | 333 else if (property_name == properties->value.name()) |
334 adapter_->NotifyGattCharacteristicValueChanged(iter->second, | 334 adapter_->NotifyGattCharacteristicValueChanged(iter->second, |
335 properties->value.value()); | 335 properties->value.value()); |
336 } | 336 } |
337 | 337 |
338 } // namespace bluez | 338 } // namespace bluez |
OLD | NEW |