Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: chromeos/dbus/dbus_client_bundle.cc

Issue 1052363005: Add DBus bindings for BLE Advertisement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_agent_manager_client.h" 17 #include "chromeos/dbus/bluetooth_agent_manager_client.h"
18 #include "chromeos/dbus/bluetooth_device_client.h" 18 #include "chromeos/dbus/bluetooth_device_client.h"
19 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" 19 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h"
20 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" 20 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h"
21 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" 21 #include "chromeos/dbus/bluetooth_gatt_manager_client.h"
22 #include "chromeos/dbus/bluetooth_gatt_service_client.h" 22 #include "chromeos/dbus/bluetooth_gatt_service_client.h"
23 #include "chromeos/dbus/bluetooth_input_client.h" 23 #include "chromeos/dbus/bluetooth_input_client.h"
24 #include "chromeos/dbus/bluetooth_le_advertising_manager_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"
36 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" 37 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
37 #include "chromeos/dbus/fake_bluetooth_device_client.h" 38 #include "chromeos/dbus/fake_bluetooth_device_client.h"
38 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" 39 #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h"
39 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" 40 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h"
40 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h" 41 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h"
41 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" 42 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h"
42 #include "chromeos/dbus/fake_bluetooth_input_client.h" 43 #include "chromeos/dbus/fake_bluetooth_input_client.h"
44 #include "chromeos/dbus/fake_bluetooth_le_advertising_manager_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"
46 #include "chromeos/dbus/fake_cras_audio_client.h" 48 #include "chromeos/dbus/fake_cras_audio_client.h"
47 #include "chromeos/dbus/fake_cryptohome_client.h" 49 #include "chromeos/dbus/fake_cryptohome_client.h"
48 #include "chromeos/dbus/fake_debug_daemon_client.h" 50 #include "chromeos/dbus/fake_debug_daemon_client.h"
49 #include "chromeos/dbus/fake_easy_unlock_client.h" 51 #include "chromeos/dbus/fake_easy_unlock_client.h"
50 #include "chromeos/dbus/fake_gsm_sms_client.h" 52 #include "chromeos/dbus/fake_gsm_sms_client.h"
51 #include "chromeos/dbus/fake_image_burner_client.h" 53 #include "chromeos/dbus/fake_image_burner_client.h"
52 #include "chromeos/dbus/fake_introspectable_client.h" 54 #include "chromeos/dbus/fake_introspectable_client.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_le_advertising_manager_client_.reset(
167 BluetoothLEAdvertisingManagerClient::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_le_advertising_manager_client_.reset(
188 new FakeBluetoothLEAdvertisingManagerClient);
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698