| 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_device_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 return properties->alias.value(); | 201 return properties->alias.value(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void BluetoothDeviceBlueZ::CreateGattConnectionImpl() { | 204 void BluetoothDeviceBlueZ::CreateGattConnectionImpl() { |
| 205 // BlueZ implementation does not use the default CreateGattConnection | 205 // BlueZ implementation does not use the default CreateGattConnection |
| 206 // implementation. | 206 // implementation. |
| 207 NOTIMPLEMENTED(); | 207 NOTIMPLEMENTED(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void BluetoothDeviceBlueZ::SetGattServicesDiscoveryComplete(bool complete) { |
| 211 // BlueZ implementation already tracks service discovery state. |
| 212 NOTIMPLEMENTED(); |
| 213 } |
| 214 |
| 215 bool BluetoothDeviceBlueZ::IsGattServicesDiscoveryComplete() const { |
| 216 bluez::BluetoothDeviceClient::Properties* properties = |
| 217 bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| 218 object_path_); |
| 219 DCHECK(properties); |
| 220 |
| 221 return properties->services_resolved.value(); |
| 222 } |
| 223 |
| 210 void BluetoothDeviceBlueZ::DisconnectGatt() { | 224 void BluetoothDeviceBlueZ::DisconnectGatt() { |
| 211 Disconnect(base::Bind(&base::DoNothing), base::Bind(&base::DoNothing)); | 225 Disconnect(base::Bind(&base::DoNothing), base::Bind(&base::DoNothing)); |
| 212 } | 226 } |
| 213 | 227 |
| 214 std::string BluetoothDeviceBlueZ::GetAddress() const { | 228 std::string BluetoothDeviceBlueZ::GetAddress() const { |
| 215 bluez::BluetoothDeviceClient::Properties* properties = | 229 bluez::BluetoothDeviceClient::Properties* properties = |
| 216 bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( | 230 bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| 217 object_path_); | 231 object_path_); |
| 218 DCHECK(properties); | 232 DCHECK(properties); |
| 219 | 233 |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback, | 790 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback, |
| 777 const std::string& error_name, | 791 const std::string& error_name, |
| 778 const std::string& error_message) { | 792 const std::string& error_message) { |
| 779 LOG(WARNING) << object_path_.value() | 793 LOG(WARNING) << object_path_.value() |
| 780 << ": Failed to remove device: " << error_name << ": " | 794 << ": Failed to remove device: " << error_name << ": " |
| 781 << error_message; | 795 << error_message; |
| 782 error_callback.Run(); | 796 error_callback.Run(); |
| 783 } | 797 } |
| 784 | 798 |
| 785 } // namespace bluez | 799 } // namespace bluez |
| OLD | NEW |