| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/bluez/bluetooth_adapter_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 | 1138 |
| 1139 bool BluetoothAdapterBlueZ::IsGattServiceRegistered( | 1139 bool BluetoothAdapterBlueZ::IsGattServiceRegistered( |
| 1140 BluetoothLocalGattServiceBlueZ* service) { | 1140 BluetoothLocalGattServiceBlueZ* service) { |
| 1141 return registered_gatt_services_.count(service->object_path()) != 0; | 1141 return registered_gatt_services_.count(service->object_path()) != 0; |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 bool BluetoothAdapterBlueZ::SendValueChanged( | 1144 bool BluetoothAdapterBlueZ::SendValueChanged( |
| 1145 BluetoothLocalGattCharacteristicBlueZ* characteristic, | 1145 BluetoothLocalGattCharacteristicBlueZ* characteristic, |
| 1146 const std::vector<uint8_t>& value) { | 1146 const std::vector<uint8_t>& value) { |
| 1147 if (registered_gatt_services_.count( | 1147 if (registered_gatt_services_.count( |
| 1148 characteristic->GetService()->object_path()) == 0) | 1148 static_cast<BluetoothLocalGattServiceBlueZ*>( |
| 1149 characteristic->GetService()) |
| 1150 ->object_path()) == 0) |
| 1149 return false; | 1151 return false; |
| 1150 gatt_application_provider_->SendValueChanged(characteristic->object_path(), | 1152 gatt_application_provider_->SendValueChanged(characteristic->object_path(), |
| 1151 value); | 1153 value); |
| 1152 return true; | 1154 return true; |
| 1153 } | 1155 } |
| 1154 | 1156 |
| 1155 dbus::ObjectPath BluetoothAdapterBlueZ::GetApplicationObjectPath() const { | 1157 dbus::ObjectPath BluetoothAdapterBlueZ::GetApplicationObjectPath() const { |
| 1156 return dbus::ObjectPath(object_path_.value() + kGattApplicationObjectPath); | 1158 return dbus::ObjectPath(object_path_.value() + kGattApplicationObjectPath); |
| 1157 } | 1159 } |
| 1158 | 1160 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 | 1640 |
| 1639 void BluetoothAdapterBlueZ::RegisterApplicationOnError( | 1641 void BluetoothAdapterBlueZ::RegisterApplicationOnError( |
| 1640 const base::Closure& callback, | 1642 const base::Closure& callback, |
| 1641 const device::BluetoothGattService::ErrorCallback& error_callback, | 1643 const device::BluetoothGattService::ErrorCallback& error_callback, |
| 1642 const std::string& /* error_name */, | 1644 const std::string& /* error_name */, |
| 1643 const std::string& /* error_message */) { | 1645 const std::string& /* error_message */) { |
| 1644 RegisterApplication(callback, error_callback); | 1646 RegisterApplication(callback, error_callback); |
| 1645 } | 1647 } |
| 1646 | 1648 |
| 1647 } // namespace bluez | 1649 } // namespace bluez |
| OLD | NEW |