| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "chromeos/dbus/fake_introspectable_client.h" | 30 #include "chromeos/dbus/fake_introspectable_client.h" |
| 31 #include "chromeos/dbus/fake_lorgnette_manager_client.h" | 31 #include "chromeos/dbus/fake_lorgnette_manager_client.h" |
| 32 #include "chromeos/dbus/fake_modem_messaging_client.h" | 32 #include "chromeos/dbus/fake_modem_messaging_client.h" |
| 33 #include "chromeos/dbus/fake_nfc_adapter_client.h" | 33 #include "chromeos/dbus/fake_nfc_adapter_client.h" |
| 34 #include "chromeos/dbus/fake_nfc_device_client.h" | 34 #include "chromeos/dbus/fake_nfc_device_client.h" |
| 35 #include "chromeos/dbus/fake_nfc_manager_client.h" | 35 #include "chromeos/dbus/fake_nfc_manager_client.h" |
| 36 #include "chromeos/dbus/fake_nfc_record_client.h" | 36 #include "chromeos/dbus/fake_nfc_record_client.h" |
| 37 #include "chromeos/dbus/fake_nfc_tag_client.h" | 37 #include "chromeos/dbus/fake_nfc_tag_client.h" |
| 38 #include "chromeos/dbus/fake_peer_daemon_manager_client.h" | 38 #include "chromeos/dbus/fake_peer_daemon_manager_client.h" |
| 39 #include "chromeos/dbus/fake_permission_broker_client.h" | 39 #include "chromeos/dbus/fake_permission_broker_client.h" |
| 40 #include "chromeos/dbus/fake_privet_daemon_manager_client.h" | |
| 41 #include "chromeos/dbus/fake_shill_device_client.h" | 40 #include "chromeos/dbus/fake_shill_device_client.h" |
| 42 #include "chromeos/dbus/fake_shill_ipconfig_client.h" | 41 #include "chromeos/dbus/fake_shill_ipconfig_client.h" |
| 43 #include "chromeos/dbus/fake_shill_manager_client.h" | 42 #include "chromeos/dbus/fake_shill_manager_client.h" |
| 44 #include "chromeos/dbus/fake_shill_profile_client.h" | 43 #include "chromeos/dbus/fake_shill_profile_client.h" |
| 45 #include "chromeos/dbus/fake_shill_service_client.h" | 44 #include "chromeos/dbus/fake_shill_service_client.h" |
| 46 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" | 45 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" |
| 47 #include "chromeos/dbus/fake_sms_client.h" | 46 #include "chromeos/dbus/fake_sms_client.h" |
| 48 #include "chromeos/dbus/fake_system_clock_client.h" | 47 #include "chromeos/dbus/fake_system_clock_client.h" |
| 49 #include "chromeos/dbus/gsm_sms_client.h" | 48 #include "chromeos/dbus/gsm_sms_client.h" |
| 50 #include "chromeos/dbus/image_burner_client.h" | 49 #include "chromeos/dbus/image_burner_client.h" |
| 51 #include "chromeos/dbus/introspectable_client.h" | 50 #include "chromeos/dbus/introspectable_client.h" |
| 52 #include "chromeos/dbus/lorgnette_manager_client.h" | 51 #include "chromeos/dbus/lorgnette_manager_client.h" |
| 53 #include "chromeos/dbus/modem_messaging_client.h" | 52 #include "chromeos/dbus/modem_messaging_client.h" |
| 54 #include "chromeos/dbus/nfc_adapter_client.h" | 53 #include "chromeos/dbus/nfc_adapter_client.h" |
| 55 #include "chromeos/dbus/nfc_device_client.h" | 54 #include "chromeos/dbus/nfc_device_client.h" |
| 56 #include "chromeos/dbus/nfc_manager_client.h" | 55 #include "chromeos/dbus/nfc_manager_client.h" |
| 57 #include "chromeos/dbus/nfc_record_client.h" | 56 #include "chromeos/dbus/nfc_record_client.h" |
| 58 #include "chromeos/dbus/nfc_tag_client.h" | 57 #include "chromeos/dbus/nfc_tag_client.h" |
| 59 #include "chromeos/dbus/peer_daemon_manager_client.h" | 58 #include "chromeos/dbus/peer_daemon_manager_client.h" |
| 60 #include "chromeos/dbus/permission_broker_client.h" | 59 #include "chromeos/dbus/permission_broker_client.h" |
| 61 #include "chromeos/dbus/power_manager_client.h" | 60 #include "chromeos/dbus/power_manager_client.h" |
| 62 #include "chromeos/dbus/power_policy_controller.h" | 61 #include "chromeos/dbus/power_policy_controller.h" |
| 63 #include "chromeos/dbus/privet_daemon_manager_client.h" | |
| 64 #include "chromeos/dbus/session_manager_client.h" | 62 #include "chromeos/dbus/session_manager_client.h" |
| 65 #include "chromeos/dbus/shill_device_client.h" | 63 #include "chromeos/dbus/shill_device_client.h" |
| 66 #include "chromeos/dbus/shill_ipconfig_client.h" | 64 #include "chromeos/dbus/shill_ipconfig_client.h" |
| 67 #include "chromeos/dbus/shill_manager_client.h" | 65 #include "chromeos/dbus/shill_manager_client.h" |
| 68 #include "chromeos/dbus/shill_profile_client.h" | 66 #include "chromeos/dbus/shill_profile_client.h" |
| 69 #include "chromeos/dbus/shill_service_client.h" | 67 #include "chromeos/dbus/shill_service_client.h" |
| 70 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" | 68 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" |
| 71 #include "chromeos/dbus/sms_client.h" | 69 #include "chromeos/dbus/sms_client.h" |
| 72 #include "chromeos/dbus/system_clock_client.h" | 70 #include "chromeos/dbus/system_clock_client.h" |
| 73 #include "chromeos/dbus/update_engine_client.h" | 71 #include "chromeos/dbus/update_engine_client.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 91 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, | 89 { "lorgnette_manager", DBusClientBundle::LORGNETTE_MANAGER }, |
| 92 { "shill", DBusClientBundle::SHILL }, | 90 { "shill", DBusClientBundle::SHILL }, |
| 93 { "gsm_sms", DBusClientBundle::GSM_SMS }, | 91 { "gsm_sms", DBusClientBundle::GSM_SMS }, |
| 94 { "image_burner", DBusClientBundle::IMAGE_BURNER }, | 92 { "image_burner", DBusClientBundle::IMAGE_BURNER }, |
| 95 { "introspectable", DBusClientBundle::INTROSPECTABLE }, | 93 { "introspectable", DBusClientBundle::INTROSPECTABLE }, |
| 96 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, | 94 { "modem_messaging", DBusClientBundle::MODEM_MESSAGING }, |
| 97 { "nfc", DBusClientBundle::NFC }, | 95 { "nfc", DBusClientBundle::NFC }, |
| 98 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, | 96 { "peer_daemon", DBusClientBundle::PEER_DAEMON }, |
| 99 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, | 97 { "permission_broker", DBusClientBundle::PERMISSION_BROKER }, |
| 100 { "power_manager", DBusClientBundle::POWER_MANAGER }, | 98 { "power_manager", DBusClientBundle::POWER_MANAGER }, |
| 101 { "privet_daemon", DBusClientBundle::PRIVET_DAEMON }, | |
| 102 { "session_manager", DBusClientBundle::SESSION_MANAGER }, | 99 { "session_manager", DBusClientBundle::SESSION_MANAGER }, |
| 103 { "sms", DBusClientBundle::SMS }, | 100 { "sms", DBusClientBundle::SMS }, |
| 104 { "system_clock", DBusClientBundle::SYSTEM_CLOCK }, | 101 { "system_clock", DBusClientBundle::SYSTEM_CLOCK }, |
| 105 { "update_engine", DBusClientBundle::UPDATE_ENGINE }, | 102 { "update_engine", DBusClientBundle::UPDATE_ENGINE }, |
| 106 }; | 103 }; |
| 107 | 104 |
| 108 // Parses single command line param value for dbus subsystem. If successful, | 105 // Parses single command line param value for dbus subsystem. If successful, |
| 109 // returns its enum representation. Otherwise returns NO_CLIENT. | 106 // returns its enum representation. Otherwise returns NO_CLIENT. |
| 110 DBusClientBundle::DBusClientType GetDBusClientType( | 107 DBusClientBundle::DBusClientType GetDBusClientType( |
| 111 const std::string& client_type_name) { | 108 const std::string& client_type_name) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 if (!IsUsingStub(PEER_DAEMON)) | 216 if (!IsUsingStub(PEER_DAEMON)) |
| 220 peer_daemon_manager_client_.reset(PeerDaemonManagerClient::Create()); | 217 peer_daemon_manager_client_.reset(PeerDaemonManagerClient::Create()); |
| 221 else | 218 else |
| 222 peer_daemon_manager_client_.reset(new FakePeerDaemonManagerClient); | 219 peer_daemon_manager_client_.reset(new FakePeerDaemonManagerClient); |
| 223 | 220 |
| 224 if (!IsUsingStub(PERMISSION_BROKER)) | 221 if (!IsUsingStub(PERMISSION_BROKER)) |
| 225 permission_broker_client_.reset(PermissionBrokerClient::Create()); | 222 permission_broker_client_.reset(PermissionBrokerClient::Create()); |
| 226 else | 223 else |
| 227 permission_broker_client_.reset(new FakePermissionBrokerClient); | 224 permission_broker_client_.reset(new FakePermissionBrokerClient); |
| 228 | 225 |
| 229 if (!IsUsingStub(PRIVET_DAEMON)) | |
| 230 privet_daemon_manager_client_.reset(PrivetDaemonManagerClient::Create()); | |
| 231 else | |
| 232 privet_daemon_manager_client_.reset(new FakePrivetDaemonManagerClient); | |
| 233 | |
| 234 if (!IsUsingStub(AP_MANAGER)) | 226 if (!IsUsingStub(AP_MANAGER)) |
| 235 ap_manager_client_.reset(ApManagerClient::Create()); | 227 ap_manager_client_.reset(ApManagerClient::Create()); |
| 236 else | 228 else |
| 237 ap_manager_client_.reset(new FakeApManagerClient); | 229 ap_manager_client_.reset(new FakeApManagerClient); |
| 238 | 230 |
| 239 power_manager_client_.reset(PowerManagerClient::Create( | 231 power_manager_client_.reset(PowerManagerClient::Create( |
| 240 IsUsingStub(POWER_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION | 232 IsUsingStub(POWER_MANAGER) ? STUB_DBUS_CLIENT_IMPLEMENTATION |
| 241 : REAL_DBUS_CLIENT_IMPLEMENTATION)); | 233 : REAL_DBUS_CLIENT_IMPLEMENTATION)); |
| 242 | 234 |
| 243 session_manager_client_.reset(SessionManagerClient::Create( | 235 session_manager_client_.reset(SessionManagerClient::Create( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 unstub_mask |= client; | 282 unstub_mask |= client; |
| 291 } else { | 283 } else { |
| 292 LOG(ERROR) << "Unknown dbus client: " << cur; | 284 LOG(ERROR) << "Unknown dbus client: " << cur; |
| 293 } | 285 } |
| 294 } | 286 } |
| 295 | 287 |
| 296 return unstub_mask; | 288 return unstub_mask; |
| 297 } | 289 } |
| 298 | 290 |
| 299 } // namespace chromeos | 291 } // namespace chromeos |
| OLD | NEW |