OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/dbus_client_bundle.h" | 5 #include "chromeos/dbus/dbus_client_bundle.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "chromeos/chromeos_switches.h" | 12 #include "chromeos/chromeos_switches.h" |
13 #include "chromeos/dbus/amplifier_client.h" | 13 #include "chromeos/dbus/amplifier_client.h" |
14 #include "chromeos/dbus/ap_manager_client.h" | 14 #include "chromeos/dbus/ap_manager_client.h" |
15 #include "chromeos/dbus/audio_dsp_client.h" | 15 #include "chromeos/dbus/audio_dsp_client.h" |
16 #include "chromeos/dbus/bluetooth_adapter_client.h" | 16 #include "chromeos/dbus/bluetooth_adapter_client.h" |
| 17 #include "chromeos/dbus/bluetooth_advertisement_manager_client.h" |
17 #include "chromeos/dbus/bluetooth_agent_manager_client.h" | 18 #include "chromeos/dbus/bluetooth_agent_manager_client.h" |
18 #include "chromeos/dbus/bluetooth_device_client.h" | 19 #include "chromeos/dbus/bluetooth_device_client.h" |
19 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" | 20 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" |
20 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" | 21 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" |
21 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" | 22 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" |
22 #include "chromeos/dbus/bluetooth_gatt_service_client.h" | 23 #include "chromeos/dbus/bluetooth_gatt_service_client.h" |
23 #include "chromeos/dbus/bluetooth_input_client.h" | 24 #include "chromeos/dbus/bluetooth_input_client.h" |
24 #include "chromeos/dbus/bluetooth_media_client.h" | 25 #include "chromeos/dbus/bluetooth_media_client.h" |
25 #include "chromeos/dbus/bluetooth_media_transport_client.h" | 26 #include "chromeos/dbus/bluetooth_media_transport_client.h" |
26 #include "chromeos/dbus/bluetooth_profile_manager_client.h" | 27 #include "chromeos/dbus/bluetooth_profile_manager_client.h" |
27 #include "chromeos/dbus/cras_audio_client.h" | 28 #include "chromeos/dbus/cras_audio_client.h" |
28 #include "chromeos/dbus/cros_disks_client.h" | 29 #include "chromeos/dbus/cros_disks_client.h" |
29 #include "chromeos/dbus/cryptohome_client.h" | 30 #include "chromeos/dbus/cryptohome_client.h" |
30 #include "chromeos/dbus/debug_daemon_client.h" | 31 #include "chromeos/dbus/debug_daemon_client.h" |
31 #include "chromeos/dbus/easy_unlock_client.h" | 32 #include "chromeos/dbus/easy_unlock_client.h" |
32 #include "chromeos/dbus/fake_amplifier_client.h" | 33 #include "chromeos/dbus/fake_amplifier_client.h" |
33 #include "chromeos/dbus/fake_ap_manager_client.h" | 34 #include "chromeos/dbus/fake_ap_manager_client.h" |
34 #include "chromeos/dbus/fake_audio_dsp_client.h" | 35 #include "chromeos/dbus/fake_audio_dsp_client.h" |
35 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 36 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
| 37 #include "chromeos/dbus/fake_bluetooth_advertisement_manager_client.h" |
36 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 38 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
37 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 39 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
38 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" | 40 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" |
39 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" | 41 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" |
40 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" | 42 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" |
41 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" | 43 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" |
42 #include "chromeos/dbus/fake_bluetooth_input_client.h" | 44 #include "chromeos/dbus/fake_bluetooth_input_client.h" |
43 #include "chromeos/dbus/fake_bluetooth_media_client.h" | 45 #include "chromeos/dbus/fake_bluetooth_media_client.h" |
44 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" | 46 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" |
45 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 47 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 else | 156 else |
155 amplifier_client_.reset(new FakeAmplifierClient); | 157 amplifier_client_.reset(new FakeAmplifierClient); |
156 | 158 |
157 if (!IsUsingStub(AUDIO_DSP)) | 159 if (!IsUsingStub(AUDIO_DSP)) |
158 audio_dsp_client_.reset(AudioDspClient::Create()); | 160 audio_dsp_client_.reset(AudioDspClient::Create()); |
159 else | 161 else |
160 audio_dsp_client_.reset(new FakeAudioDspClient); | 162 audio_dsp_client_.reset(new FakeAudioDspClient); |
161 | 163 |
162 if (!IsUsingStub(BLUETOOTH)) { | 164 if (!IsUsingStub(BLUETOOTH)) { |
163 bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create()); | 165 bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create()); |
| 166 bluetooth_advertisement_manager_client_.reset( |
| 167 BluetoothAdvertisementManagerClient::Create()); |
164 bluetooth_agent_manager_client_.reset( | 168 bluetooth_agent_manager_client_.reset( |
165 BluetoothAgentManagerClient::Create()); | 169 BluetoothAgentManagerClient::Create()); |
166 bluetooth_device_client_.reset(BluetoothDeviceClient::Create()); | 170 bluetooth_device_client_.reset(BluetoothDeviceClient::Create()); |
167 bluetooth_input_client_.reset(BluetoothInputClient::Create()); | 171 bluetooth_input_client_.reset(BluetoothInputClient::Create()); |
168 bluetooth_media_client_.reset(BluetoothMediaClient::Create()); | 172 bluetooth_media_client_.reset(BluetoothMediaClient::Create()); |
169 bluetooth_media_transport_client_.reset( | 173 bluetooth_media_transport_client_.reset( |
170 BluetoothMediaTransportClient::Create()); | 174 BluetoothMediaTransportClient::Create()); |
171 bluetooth_profile_manager_client_.reset( | 175 bluetooth_profile_manager_client_.reset( |
172 BluetoothProfileManagerClient::Create()); | 176 BluetoothProfileManagerClient::Create()); |
173 bluetooth_gatt_characteristic_client_.reset( | 177 bluetooth_gatt_characteristic_client_.reset( |
174 BluetoothGattCharacteristicClient::Create()); | 178 BluetoothGattCharacteristicClient::Create()); |
175 bluetooth_gatt_descriptor_client_.reset( | 179 bluetooth_gatt_descriptor_client_.reset( |
176 BluetoothGattDescriptorClient::Create()); | 180 BluetoothGattDescriptorClient::Create()); |
177 bluetooth_gatt_manager_client_.reset( | 181 bluetooth_gatt_manager_client_.reset( |
178 BluetoothGattManagerClient::Create()); | 182 BluetoothGattManagerClient::Create()); |
179 bluetooth_gatt_service_client_.reset( | 183 bluetooth_gatt_service_client_.reset( |
180 BluetoothGattServiceClient::Create()); | 184 BluetoothGattServiceClient::Create()); |
181 } else { | 185 } else { |
182 bluetooth_adapter_client_.reset(new FakeBluetoothAdapterClient); | 186 bluetooth_adapter_client_.reset(new FakeBluetoothAdapterClient); |
| 187 bluetooth_advertisement_manager_client_.reset( |
| 188 new FakeBluetoothAdvertisementManagerClient); |
183 bluetooth_agent_manager_client_.reset(new FakeBluetoothAgentManagerClient); | 189 bluetooth_agent_manager_client_.reset(new FakeBluetoothAgentManagerClient); |
184 bluetooth_device_client_.reset(new FakeBluetoothDeviceClient); | 190 bluetooth_device_client_.reset(new FakeBluetoothDeviceClient); |
185 bluetooth_input_client_.reset(new FakeBluetoothInputClient); | 191 bluetooth_input_client_.reset(new FakeBluetoothInputClient); |
186 bluetooth_media_client_.reset(new FakeBluetoothMediaClient); | 192 bluetooth_media_client_.reset(new FakeBluetoothMediaClient); |
187 bluetooth_media_transport_client_.reset( | 193 bluetooth_media_transport_client_.reset( |
188 new FakeBluetoothMediaTransportClient); | 194 new FakeBluetoothMediaTransportClient); |
189 bluetooth_profile_manager_client_.reset( | 195 bluetooth_profile_manager_client_.reset( |
190 new FakeBluetoothProfileManagerClient); | 196 new FakeBluetoothProfileManagerClient); |
191 bluetooth_gatt_characteristic_client_.reset( | 197 bluetooth_gatt_characteristic_client_.reset( |
192 new FakeBluetoothGattCharacteristicClient); | 198 new FakeBluetoothGattCharacteristicClient); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 unstub_mask |= client; | 381 unstub_mask |= client; |
376 } else { | 382 } else { |
377 LOG(ERROR) << "Unknown dbus client: " << *iter; | 383 LOG(ERROR) << "Unknown dbus client: " << *iter; |
378 } | 384 } |
379 } | 385 } |
380 | 386 |
381 return unstub_mask; | 387 return unstub_mask; |
382 } | 388 } |
383 | 389 |
384 } // namespace chromeos | 390 } // namespace chromeos |
OLD | NEW |