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 "chromeos/dbus/fake_bluetooth_profile_service_provider.h" | 5 #include "chromeos/dbus/fake_bluetooth_profile_service_provider.h" |
6 | 6 |
7 #include "dbus/object_path.h" | 7 #include "dbus/object_path.h" |
8 | 8 |
9 namespace chromeos { | 9 namespace chromeos { |
10 | 10 |
11 FakeBluetoothProfileServiceProvider::FakeBluetoothProfileServiceProvider( | 11 FakeBluetoothProfileServiceProvider::FakeBluetoothProfileServiceProvider( |
12 const dbus::ObjectPath& object_path, | 12 const dbus::ObjectPath& object_path, |
13 Delegate* delegate) | 13 Delegate* delegate) |
14 : object_path_(object_path), | 14 : object_path_(object_path), |
15 delegate_(delegate) { | 15 delegate_(delegate) { |
16 VLOG(1) << "Creating Bluetooth Profile: " << object_path_.value(); | 16 VLOG(1) << "Creating Bluetooth Profile: " << object_path_.value(); |
17 } | 17 } |
18 | 18 |
19 FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() { | 19 FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() { |
20 VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value(); | 20 VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value(); |
21 } | 21 } |
22 | 22 |
23 void FakeBluetoothProfileServiceProvider::Release() { | 23 void FakeBluetoothProfileServiceProvider::Release() { |
24 VLOG(1) << object_path_.value() << ": Release"; | 24 VLOG(1) << object_path_.value() << ": Release"; |
25 delegate_->Release(); | 25 delegate_->Release(); |
26 } | 26 } |
27 | 27 |
28 void FakeBluetoothProfileServiceProvider::NewConnection( | 28 void FakeBluetoothProfileServiceProvider::NewConnection( |
29 const dbus::ObjectPath& device_path, | 29 const dbus::ObjectPath& device_path, |
30 dbus::FileDescriptor* fd, | 30 scoped_ptr<dbus::FileDescriptor> fd, |
31 const Delegate::Options& options, | 31 const Delegate::Options& options, |
32 const Delegate::ConfirmationCallback& callback) { | 32 const Delegate::ConfirmationCallback& callback) { |
33 VLOG(1) << object_path_.value() << ": NewConnection for " | 33 VLOG(1) << object_path_.value() << ": NewConnection for " |
34 << device_path.value(); | 34 << device_path.value(); |
35 delegate_->NewConnection(device_path, fd, options, callback); | 35 delegate_->NewConnection(device_path, fd.Pass(), options, callback); |
36 } | 36 } |
37 | 37 |
38 void FakeBluetoothProfileServiceProvider::RequestDisconnection( | 38 void FakeBluetoothProfileServiceProvider::RequestDisconnection( |
39 const dbus::ObjectPath& device_path, | 39 const dbus::ObjectPath& device_path, |
40 const Delegate::ConfirmationCallback& callback) { | 40 const Delegate::ConfirmationCallback& callback) { |
41 VLOG(1) << object_path_.value() << ": RequestDisconnection for " | 41 VLOG(1) << object_path_.value() << ": RequestDisconnection for " |
42 << device_path.value(); | 42 << device_path.value(); |
43 delegate_->RequestDisconnection(device_path, callback); | 43 delegate_->RequestDisconnection(device_path, callback); |
44 } | 44 } |
45 | 45 |
46 void FakeBluetoothProfileServiceProvider::Cancel() { | 46 void FakeBluetoothProfileServiceProvider::Cancel() { |
47 VLOG(1) << object_path_.value() << ": Cancel"; | 47 VLOG(1) << object_path_.value() << ": Cancel"; |
48 delegate_->Cancel(); | 48 delegate_->Cancel(); |
49 } | 49 } |
50 | 50 |
51 } // namespace chromeos | 51 } // namespace chromeos |
OLD | NEW |