| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/dbus/fake_bluetooth_agent_service_provider.h" | 5 #include "device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h" |
| 6 | 6 |
| 7 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 7 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 8 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" | 8 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" |
| 9 | 9 |
| 10 namespace bluez { | 10 namespace bluez { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void FakeBluetoothAgentServiceProvider::RequestPasskey( | 54 void FakeBluetoothAgentServiceProvider::RequestPasskey( |
| 55 const dbus::ObjectPath& device_path, | 55 const dbus::ObjectPath& device_path, |
| 56 const Delegate::PasskeyCallback& callback) { | 56 const Delegate::PasskeyCallback& callback) { |
| 57 VLOG(1) << object_path_.value() << ": RequestPasskey for " | 57 VLOG(1) << object_path_.value() << ": RequestPasskey for " |
| 58 << device_path.value(); | 58 << device_path.value(); |
| 59 delegate_->RequestPasskey(device_path, callback); | 59 delegate_->RequestPasskey(device_path, callback); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void FakeBluetoothAgentServiceProvider::DisplayPasskey( | 62 void FakeBluetoothAgentServiceProvider::DisplayPasskey( |
| 63 const dbus::ObjectPath& device_path, | 63 const dbus::ObjectPath& device_path, |
| 64 uint32 passkey, | 64 uint32_t passkey, |
| 65 int16 entered) { | 65 int16_t entered) { |
| 66 VLOG(1) << object_path_.value() << ": DisplayPasskey " << passkey << " (" | 66 VLOG(1) << object_path_.value() << ": DisplayPasskey " << passkey << " (" |
| 67 << entered << " entered) for " << device_path.value(); | 67 << entered << " entered) for " << device_path.value(); |
| 68 delegate_->DisplayPasskey(device_path, passkey, entered); | 68 delegate_->DisplayPasskey(device_path, passkey, entered); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void FakeBluetoothAgentServiceProvider::RequestConfirmation( | 71 void FakeBluetoothAgentServiceProvider::RequestConfirmation( |
| 72 const dbus::ObjectPath& device_path, | 72 const dbus::ObjectPath& device_path, |
| 73 uint32 passkey, | 73 uint32_t passkey, |
| 74 const Delegate::ConfirmationCallback& callback) { | 74 const Delegate::ConfirmationCallback& callback) { |
| 75 VLOG(1) << object_path_.value() << ": RequestConfirmation " << passkey | 75 VLOG(1) << object_path_.value() << ": RequestConfirmation " << passkey |
| 76 << " for " << device_path.value(); | 76 << " for " << device_path.value(); |
| 77 delegate_->RequestConfirmation(device_path, passkey, callback); | 77 delegate_->RequestConfirmation(device_path, passkey, callback); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void FakeBluetoothAgentServiceProvider::RequestAuthorization( | 80 void FakeBluetoothAgentServiceProvider::RequestAuthorization( |
| 81 const dbus::ObjectPath& device_path, | 81 const dbus::ObjectPath& device_path, |
| 82 const Delegate::ConfirmationCallback& callback) { | 82 const Delegate::ConfirmationCallback& callback) { |
| 83 VLOG(1) << object_path_.value() << ": RequestAuthorization for " | 83 VLOG(1) << object_path_.value() << ": RequestAuthorization for " |
| 84 << device_path.value(); | 84 << device_path.value(); |
| 85 delegate_->RequestAuthorization(device_path, callback); | 85 delegate_->RequestAuthorization(device_path, callback); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void FakeBluetoothAgentServiceProvider::AuthorizeService( | 88 void FakeBluetoothAgentServiceProvider::AuthorizeService( |
| 89 const dbus::ObjectPath& device_path, | 89 const dbus::ObjectPath& device_path, |
| 90 const std::string& uuid, | 90 const std::string& uuid, |
| 91 const Delegate::ConfirmationCallback& callback) { | 91 const Delegate::ConfirmationCallback& callback) { |
| 92 VLOG(1) << object_path_.value() << ": AuthorizeService " << uuid << " for " | 92 VLOG(1) << object_path_.value() << ": AuthorizeService " << uuid << " for " |
| 93 << device_path.value(); | 93 << device_path.value(); |
| 94 delegate_->AuthorizeService(device_path, uuid, callback); | 94 delegate_->AuthorizeService(device_path, uuid, callback); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void FakeBluetoothAgentServiceProvider::Cancel() { | 97 void FakeBluetoothAgentServiceProvider::Cancel() { |
| 98 VLOG(1) << object_path_.value() << ": Cancel"; | 98 VLOG(1) << object_path_.value() << ": Cancel"; |
| 99 delegate_->Cancel(); | 99 delegate_->Cancel(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace bluez | 102 } // namespace bluez |
| OLD | NEW |