OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "device/bluetooth/dbus/bluetooth_dbus_client_bundle.h" |
| 6 |
| 7 #include <vector> |
| 8 |
| 9 #include "base/command_line.h" |
| 10 #include "base/strings/string_split.h" |
| 11 #include "base/strings/string_util.h" |
| 12 #include "chromeos/chromeos_switches.h" |
| 13 #include "device/bluetooth/dbus/bluetooth_adapter_client.h" |
| 14 #include "device/bluetooth/dbus/bluetooth_agent_manager_client.h" |
| 15 #include "device/bluetooth/dbus/bluetooth_device_client.h" |
| 16 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h" |
| 17 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h" |
| 18 #include "device/bluetooth/dbus/bluetooth_gatt_manager_client.h" |
| 19 #include "device/bluetooth/dbus/bluetooth_gatt_service_client.h" |
| 20 #include "device/bluetooth/dbus/bluetooth_input_client.h" |
| 21 #include "device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h" |
| 22 #include "device/bluetooth/dbus/bluetooth_media_client.h" |
| 23 #include "device/bluetooth/dbus/bluetooth_media_transport_client.h" |
| 24 #include "device/bluetooth/dbus/bluetooth_profile_manager_client.h" |
| 25 #include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h" |
| 26 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" |
| 27 #include "device/bluetooth/dbus/fake_bluetooth_device_client.h" |
| 28 #include "device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h" |
| 29 #include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h" |
| 30 #include "device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h" |
| 31 #include "device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h" |
| 32 #include "device/bluetooth/dbus/fake_bluetooth_input_client.h" |
| 33 #include "device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h" |
| 34 #include "device/bluetooth/dbus/fake_bluetooth_media_client.h" |
| 35 #include "device/bluetooth/dbus/fake_bluetooth_media_transport_client.h" |
| 36 #include "device/bluetooth/dbus/fake_bluetooth_profile_manager_client.h" |
| 37 |
| 38 namespace bluez { |
| 39 |
| 40 BluetoothDBusClientBundle::BluetoothDBusClientBundle(bool use_stubs) |
| 41 : use_stubs_(use_stubs) { |
| 42 if (!use_stubs) { |
| 43 bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create()); |
| 44 bluetooth_le_advertising_manager_client_.reset( |
| 45 BluetoothLEAdvertisingManagerClient::Create()); |
| 46 bluetooth_agent_manager_client_.reset( |
| 47 BluetoothAgentManagerClient::Create()); |
| 48 bluetooth_device_client_.reset(BluetoothDeviceClient::Create()); |
| 49 bluetooth_input_client_.reset(BluetoothInputClient::Create()); |
| 50 bluetooth_media_client_.reset(BluetoothMediaClient::Create()); |
| 51 bluetooth_media_transport_client_.reset( |
| 52 BluetoothMediaTransportClient::Create()); |
| 53 bluetooth_profile_manager_client_.reset( |
| 54 BluetoothProfileManagerClient::Create()); |
| 55 bluetooth_gatt_characteristic_client_.reset( |
| 56 BluetoothGattCharacteristicClient::Create()); |
| 57 bluetooth_gatt_descriptor_client_.reset( |
| 58 BluetoothGattDescriptorClient::Create()); |
| 59 bluetooth_gatt_manager_client_.reset(BluetoothGattManagerClient::Create()); |
| 60 bluetooth_gatt_service_client_.reset(BluetoothGattServiceClient::Create()); |
| 61 } else { |
| 62 bluetooth_adapter_client_.reset(new FakeBluetoothAdapterClient); |
| 63 bluetooth_le_advertising_manager_client_.reset( |
| 64 new FakeBluetoothLEAdvertisingManagerClient); |
| 65 bluetooth_agent_manager_client_.reset(new FakeBluetoothAgentManagerClient); |
| 66 bluetooth_device_client_.reset(new FakeBluetoothDeviceClient); |
| 67 bluetooth_input_client_.reset(new FakeBluetoothInputClient); |
| 68 bluetooth_media_client_.reset(new FakeBluetoothMediaClient); |
| 69 bluetooth_media_transport_client_.reset( |
| 70 new FakeBluetoothMediaTransportClient); |
| 71 bluetooth_profile_manager_client_.reset( |
| 72 new FakeBluetoothProfileManagerClient); |
| 73 bluetooth_gatt_characteristic_client_.reset( |
| 74 new FakeBluetoothGattCharacteristicClient); |
| 75 bluetooth_gatt_descriptor_client_.reset( |
| 76 new FakeBluetoothGattDescriptorClient); |
| 77 bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient); |
| 78 bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient); |
| 79 } |
| 80 } |
| 81 |
| 82 BluetoothDBusClientBundle::~BluetoothDBusClientBundle() {} |
| 83 |
| 84 } // namespace bluez |
OLD | NEW |