| 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 "device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl
.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl
.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "third_party/cros_system_api/dbus/service_constants.h" | 9 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 characteristic_provider.get()); | 149 characteristic_provider.get()); |
| 150 } | 150 } |
| 151 for (const auto& descriptor_provider : descriptor_providers_) { | 151 for (const auto& descriptor_provider : descriptor_providers_) { |
| 152 WriteObjectDict( | 152 WriteObjectDict( |
| 153 &array_writer, | 153 &array_writer, |
| 154 bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface, | 154 bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface, |
| 155 descriptor_provider.get()); | 155 descriptor_provider.get()); |
| 156 } | 156 } |
| 157 | 157 |
| 158 writer.CloseContainer(&array_writer); | 158 writer.CloseContainer(&array_writer); |
| 159 VLOG(3) << "Sending response to BlueZ for GetManagedObjects: \n" |
| 160 << response->ToString(); |
| 159 response_sender.Run(std::move(response)); | 161 response_sender.Run(std::move(response)); |
| 160 } | 162 } |
| 161 | 163 |
| 162 // Called by dbus:: when a method is exported. | 164 // Called by dbus:: when a method is exported. |
| 163 void BluetoothGattApplicationServiceProviderImpl::OnExported( | 165 void BluetoothGattApplicationServiceProviderImpl::OnExported( |
| 164 const std::string& interface_name, | 166 const std::string& interface_name, |
| 165 const std::string& method_name, | 167 const std::string& method_name, |
| 166 bool success) { | 168 bool success) { |
| 167 LOG_IF(WARNING, !success) << "Failed to export " << interface_name << "." | 169 LOG_IF(WARNING, !success) << "Failed to export " << interface_name << "." |
| 168 << method_name; | 170 << method_name; |
| 169 } | 171 } |
| 170 | 172 |
| 171 } // namespace bluez | 173 } // namespace bluez |
| OLD | NEW |