Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Chromium OS 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 "shill/dbus/chromeos_dbus_control.h" |
| 6 | |
| 7 | #include "shill/dbus/chromeos_device_dbus_adaptor.h" |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 8 | #include "shill/dbus/chromeos_ipconfig_dbus_adaptor.h" |
| 9 | #include "shill/dbus/chromeos_manager_dbus_adaptor.h" |
| 10 | #include "shill/dbus/chromeos_profile_dbus_adaptor.h" |
| 11 | #include "shill/dbus/chromeos_rpc_task_dbus_adaptor.h" |
| 12 | #include "shill/dbus/chromeos_service_dbus_adaptor.h" |
| 13 | #include "shill/dbus/chromeos_third_party_vpn_dbus_adaptor.h" |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 14 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 15 | #include "shill/dbus/chromeos_dhcpcd_listener.h" |
| 16 | #include "shill/dbus/chromeos_dhcpcd_proxy.h" |
| 17 | #include "shill/dbus/chromeos_permission_broker_proxy.h" |
| 18 | #include "shill/dbus/chromeos_power_manager_proxy.h" |
| 19 | #include "shill/dbus/chromeos_supplicant_bss_proxy.h" |
| 20 | #include "shill/dbus/chromeos_supplicant_interface_proxy.h" |
| 21 | #include "shill/dbus/chromeos_supplicant_network_proxy.h" |
| 22 | #include "shill/dbus/chromeos_supplicant_process_proxy.h" |
| 23 | #include "shill/dbus/chromeos_upstart_proxy.h" |
| 24 | |
| 25 | #include "shill/dbus/chromeos_dbus_service_watcher.h" |
| 26 | |
Peter Qiu | da6745b | 2015-08-17 16:32:34 -0700 | [diff] [blame] | 27 | #if !defined(DISABLE_CELLULAR) |
| 28 | #include "shill/dbus/chromeos_dbus_objectmanager_proxy.h" |
| 29 | #include "shill/dbus/chromeos_dbus_properties_proxy.h" |
Peter Qiu | 28af107 | 2015-08-19 13:26:57 -0700 | [diff] [blame] | 30 | #include "shill/dbus/chromeos_mm1_modem_modem3gpp_proxy.h" |
| 31 | #include "shill/dbus/chromeos_mm1_modem_modemcdma_proxy.h" |
| 32 | #include "shill/dbus/chromeos_mm1_modem_proxy.h" |
| 33 | #include "shill/dbus/chromeos_mm1_modem_simple_proxy.h" |
| 34 | #include "shill/dbus/chromeos_mm1_sim_proxy.h" |
Peter Qiu | f576f1b | 2015-08-19 09:14:41 -0700 | [diff] [blame] | 35 | #include "shill/dbus/chromeos_modem_cdma_proxy.h" |
| 36 | #include "shill/dbus/chromeos_modem_gobi_proxy.h" |
| 37 | #include "shill/dbus/chromeos_modem_gsm_card_proxy.h" |
| 38 | #include "shill/dbus/chromeos_modem_gsm_network_proxy.h" |
| 39 | #include "shill/dbus/chromeos_modem_manager_proxy.h" |
| 40 | #include "shill/dbus/chromeos_modem_proxy.h" |
| 41 | #include "shill/dbus/chromeos_modem_simple_proxy.h" |
Peter Qiu | da6745b | 2015-08-17 16:32:34 -0700 | [diff] [blame] | 42 | #endif // DISABLE_CELLULAR |
| 43 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 44 | #if !defined(DISABLE_WIMAX) |
| 45 | #include "shill/dbus/chromeos_wimax_device_proxy.h" |
| 46 | #include "shill/dbus/chromeos_wimax_manager_proxy.h" |
| 47 | #include "shill/dbus/chromeos_wimax_network_proxy.h" |
| 48 | #endif // DISABLE_WIMAX |
| 49 | |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 50 | using chromeos::dbus_utils::ExportedObjectManager; |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 51 | using std::string; |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 52 | |
| 53 | namespace shill { |
| 54 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 55 | // static. |
| 56 | const char ChromeosDBusControl::kNullPath[] = "/"; |
| 57 | |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 58 | ChromeosDBusControl::ChromeosDBusControl( |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 59 | const scoped_refptr<dbus::Bus>& bus, |
| 60 | EventDispatcher* dispatcher) |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 61 | : adaptor_bus_(bus), |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 62 | dispatcher_(dispatcher), |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 63 | null_identifier_(kNullPath) { |
| 64 | dbus::Bus::Options options; |
| 65 | options.bus_type = dbus::Bus::SYSTEM; |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 66 | |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 67 | proxy_bus_ = new dbus::Bus(options); |
| 68 | CHECK(proxy_bus_->Connect()); |
| 69 | } |
| 70 | |
| 71 | ChromeosDBusControl::~ChromeosDBusControl() { |
| 72 | if (proxy_bus_) { |
| 73 | proxy_bus_->ShutdownAndBlock(); |
| 74 | } |
| 75 | } |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 76 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 77 | const string& ChromeosDBusControl::NullRPCIdentifier() { |
| 78 | return null_identifier_; |
| 79 | } |
| 80 | |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 81 | template <typename Object, typename AdaptorInterface, typename Adaptor> |
| 82 | AdaptorInterface* ChromeosDBusControl::CreateAdaptor(Object* object) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 83 | return new Adaptor(adaptor_bus_, object); |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | DeviceAdaptorInterface* ChromeosDBusControl::CreateDeviceAdaptor( |
| 87 | Device* device) { |
| 88 | return |
| 89 | CreateAdaptor<Device, DeviceAdaptorInterface, ChromeosDeviceDBusAdaptor>( |
| 90 | device); |
| 91 | } |
| 92 | |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 93 | IPConfigAdaptorInterface* ChromeosDBusControl::CreateIPConfigAdaptor( |
| 94 | IPConfig* config) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 95 | return |
| 96 | CreateAdaptor<IPConfig, IPConfigAdaptorInterface, |
| 97 | ChromeosIPConfigDBusAdaptor>(config); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | ManagerAdaptorInterface* ChromeosDBusControl::CreateManagerAdaptor( |
| 101 | Manager* manager) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 102 | return |
| 103 | CreateAdaptor<Manager, ManagerAdaptorInterface, |
| 104 | ChromeosManagerDBusAdaptor>(manager); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | ProfileAdaptorInterface* ChromeosDBusControl::CreateProfileAdaptor( |
| 108 | Profile* profile) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 109 | return |
| 110 | CreateAdaptor<Profile, ProfileAdaptorInterface, |
| 111 | ChromeosProfileDBusAdaptor>(profile); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | RPCTaskAdaptorInterface* ChromeosDBusControl::CreateRPCTaskAdaptor( |
| 115 | RPCTask* task) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 116 | return |
| 117 | CreateAdaptor<RPCTask, RPCTaskAdaptorInterface, |
| 118 | ChromeosRPCTaskDBusAdaptor>(task); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | ServiceAdaptorInterface* ChromeosDBusControl::CreateServiceAdaptor( |
| 122 | Service* service) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 123 | return |
| 124 | CreateAdaptor<Service, ServiceAdaptorInterface, |
| 125 | ChromeosServiceDBusAdaptor>(service); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | #ifndef DISABLE_VPN |
| 129 | ThirdPartyVpnAdaptorInterface* ChromeosDBusControl::CreateThirdPartyVpnAdaptor( |
| 130 | ThirdPartyVpnDriver* driver) { |
Peter Qiu | 484261a | 2015-07-07 13:42:58 -0700 | [diff] [blame] | 131 | return |
| 132 | CreateAdaptor<ThirdPartyVpnDriver, ThirdPartyVpnAdaptorInterface, |
| 133 | ChromeosThirdPartyVpnDBusAdaptor>(driver); |
Peter Qiu | 24b34a0 | 2015-06-30 10:22:26 -0700 | [diff] [blame] | 134 | } |
| 135 | #endif |
| 136 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 137 | RPCServiceWatcherInterface* ChromeosDBusControl::CreateRPCServiceWatcher( |
| 138 | const std::string& connection_name, |
| 139 | const base::Closure& on_connection_vanished) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 140 | return new ChromeosDBusServiceWatcher(proxy_bus_, |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 141 | connection_name, |
| 142 | on_connection_vanished); |
| 143 | } |
| 144 | |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 145 | DBusServiceProxyInterface* ChromeosDBusControl::CreateDBusServiceProxy() { |
| 146 | return nullptr; |
| 147 | } |
| 148 | |
| 149 | PowerManagerProxyInterface* ChromeosDBusControl::CreatePowerManagerProxy( |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 150 | PowerManagerProxyDelegate* delegate, |
| 151 | const base::Closure& service_appeared_callback, |
| 152 | const base::Closure& service_vanished_callback) { |
| 153 | return new ChromeosPowerManagerProxy(dispatcher_, |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 154 | proxy_bus_, |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 155 | delegate, |
| 156 | service_appeared_callback, |
| 157 | service_vanished_callback); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | #if !defined(DISABLE_WIFI) || !defined(DISABLE_WIRED_8021X) |
| 161 | SupplicantProcessProxyInterface* |
| 162 | ChromeosDBusControl::CreateSupplicantProcessProxy( |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 163 | const base::Closure& service_appeared_callback, |
| 164 | const base::Closure& service_vanished_callback) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 165 | return new ChromeosSupplicantProcessProxy(dispatcher_, |
| 166 | proxy_bus_, |
| 167 | service_appeared_callback, |
| 168 | service_vanished_callback); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | SupplicantInterfaceProxyInterface* |
| 172 | ChromeosDBusControl::CreateSupplicantInterfaceProxy( |
| 173 | SupplicantEventDelegateInterface* delegate, |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 174 | const string& object_path) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 175 | return new ChromeosSupplicantInterfaceProxy( |
| 176 | proxy_bus_, object_path, delegate); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | SupplicantNetworkProxyInterface* |
| 180 | ChromeosDBusControl::CreateSupplicantNetworkProxy( |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 181 | const string& object_path) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 182 | return new ChromeosSupplicantNetworkProxy(proxy_bus_, object_path); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 183 | } |
| 184 | #endif // DISABLE_WIFI || DISABLE_WIRED_8021X |
| 185 | |
| 186 | #if !defined(DISABLE_WIFI) |
| 187 | SupplicantBSSProxyInterface* ChromeosDBusControl::CreateSupplicantBSSProxy( |
| 188 | WiFiEndpoint* wifi_endpoint, |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 189 | const string& object_path) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 190 | return new ChromeosSupplicantBSSProxy(proxy_bus_, object_path, wifi_endpoint); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 191 | } |
| 192 | #endif // DISABLE_WIFI |
| 193 | |
Peter Qiu | 8200124 | 2015-07-31 10:06:42 -0700 | [diff] [blame] | 194 | DHCPCDListenerInterface* ChromeosDBusControl::CreateDHCPCDListener( |
| 195 | DHCPProvider* provider) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 196 | return new ChromeosDHCPCDListener(proxy_bus_, dispatcher_, provider); |
Peter Qiu | 8200124 | 2015-07-31 10:06:42 -0700 | [diff] [blame] | 197 | } |
| 198 | |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 199 | DHCPProxyInterface* ChromeosDBusControl::CreateDHCPProxy( |
| 200 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 201 | return new ChromeosDHCPCDProxy(proxy_bus_, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | UpstartProxyInterface* ChromeosDBusControl::CreateUpstartProxy() { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 205 | return new ChromeosUpstartProxy(proxy_bus_); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | PermissionBrokerProxyInterface* |
| 209 | ChromeosDBusControl::CreatePermissionBrokerProxy() { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 210 | return new ChromeosPermissionBrokerProxy(proxy_bus_); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | #if !defined(DISABLE_CELLULAR) |
Peter Qiu | 607796a | 2015-08-27 12:37:04 -0700 | [diff] [blame^] | 214 | DBusPropertiesProxyInterface* ChromeosDBusControl::CreateDBusPropertiesProxy( |
| 215 | const string& path, |
| 216 | const string& service) { |
| 217 | return new ChromeosDBusPropertiesProxy(proxy_bus_, path, service); |
| 218 | } |
| 219 | |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 220 | DBusObjectManagerProxyInterface* |
| 221 | ChromeosDBusControl::CreateDBusObjectManagerProxy( |
| 222 | const string& path, |
Peter Qiu | 05d87e3 | 2015-08-14 23:46:21 -0700 | [diff] [blame] | 223 | const string& service, |
| 224 | const base::Closure& service_appeared_callback, |
| 225 | const base::Closure& service_vanished_callback) { |
Peter Qiu | da6745b | 2015-08-17 16:32:34 -0700 | [diff] [blame] | 226 | return new ChromeosDBusObjectManagerProxy(dispatcher_, |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 227 | proxy_bus_, |
Peter Qiu | da6745b | 2015-08-17 16:32:34 -0700 | [diff] [blame] | 228 | path, |
| 229 | service, |
| 230 | service_appeared_callback, |
| 231 | service_vanished_callback); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | ModemManagerProxyInterface* |
| 235 | ChromeosDBusControl::CreateModemManagerProxy( |
| 236 | ModemManagerClassic* manager, |
| 237 | const string& path, |
Peter Qiu | 05d87e3 | 2015-08-14 23:46:21 -0700 | [diff] [blame] | 238 | const string& service, |
Peter Qiu | f576f1b | 2015-08-19 09:14:41 -0700 | [diff] [blame] | 239 | const base::Closure& service_appeared_callback, |
| 240 | const base::Closure& service_vanished_callback) { |
| 241 | return new ChromeosModemManagerProxy(dispatcher_, |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 242 | proxy_bus_, |
Peter Qiu | f576f1b | 2015-08-19 09:14:41 -0700 | [diff] [blame] | 243 | manager, |
| 244 | path, |
| 245 | service, |
| 246 | service_appeared_callback, |
| 247 | service_vanished_callback); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | ModemProxyInterface* ChromeosDBusControl::CreateModemProxy( |
| 251 | const string& path, |
| 252 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 253 | return new ChromeosModemProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | ModemSimpleProxyInterface* ChromeosDBusControl::CreateModemSimpleProxy( |
| 257 | const string& path, |
| 258 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 259 | return new ChromeosModemSimpleProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 260 | } |
| 261 | |
| 262 | ModemCDMAProxyInterface* ChromeosDBusControl::CreateModemCDMAProxy( |
| 263 | const string& path, |
| 264 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 265 | return new ChromeosModemCDMAProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | ModemGSMCardProxyInterface* ChromeosDBusControl::CreateModemGSMCardProxy( |
| 269 | const string& path, |
| 270 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 271 | return new ChromeosModemGSMCardProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | ModemGSMNetworkProxyInterface* ChromeosDBusControl::CreateModemGSMNetworkProxy( |
| 275 | const string& path, |
| 276 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 277 | return new ChromeosModemGSMNetworkProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | ModemGobiProxyInterface* ChromeosDBusControl::CreateModemGobiProxy( |
| 281 | const string& path, |
| 282 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 283 | return new ChromeosModemGobiProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | // Proxies for ModemManager1 interfaces |
| 287 | mm1::ModemModem3gppProxyInterface* |
| 288 | ChromeosDBusControl::CreateMM1ModemModem3gppProxy( |
| 289 | const string& path, |
| 290 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 291 | return new mm1::ChromeosModemModem3gppProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 292 | } |
| 293 | |
| 294 | mm1::ModemModemCdmaProxyInterface* |
| 295 | ChromeosDBusControl::CreateMM1ModemModemCdmaProxy( |
| 296 | const string& path, |
| 297 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 298 | return new mm1::ChromeosModemModemCdmaProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 299 | } |
| 300 | |
| 301 | mm1::ModemProxyInterface* ChromeosDBusControl::CreateMM1ModemProxy( |
| 302 | const string& path, |
| 303 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 304 | return new mm1::ChromeosModemProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | mm1::ModemSimpleProxyInterface* ChromeosDBusControl::CreateMM1ModemSimpleProxy( |
| 308 | const string& path, |
| 309 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 310 | return new mm1::ChromeosModemSimpleProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | mm1::SimProxyInterface* ChromeosDBusControl::CreateSimProxy( |
| 314 | const string& path, |
| 315 | const string& service) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 316 | return new mm1::ChromeosSimProxy(proxy_bus_, path, service); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 317 | } |
| 318 | #endif // DISABLE_CELLULAR |
| 319 | |
| 320 | #if !defined(DISABLE_WIMAX) |
| 321 | WiMaxDeviceProxyInterface* ChromeosDBusControl::CreateWiMaxDeviceProxy( |
| 322 | const string& path) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 323 | return new ChromeosWiMaxDeviceProxy(proxy_bus_, path); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 324 | } |
| 325 | |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 326 | WiMaxManagerProxyInterface* ChromeosDBusControl::CreateWiMaxManagerProxy( |
| 327 | const base::Closure& service_appeared_callback, |
| 328 | const base::Closure& service_vanished_callback) { |
| 329 | return new ChromeosWiMaxManagerProxy(dispatcher_, |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 330 | proxy_bus_, |
Peter Qiu | c00d1fa | 2015-08-13 15:00:55 -0700 | [diff] [blame] | 331 | service_appeared_callback, |
| 332 | service_vanished_callback); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | WiMaxNetworkProxyInterface* ChromeosDBusControl::CreateWiMaxNetworkProxy( |
| 336 | const string& path) { |
Peter Qiu | 526ed5f | 2015-08-25 13:30:47 -0700 | [diff] [blame] | 337 | return new ChromeosWiMaxNetworkProxy(proxy_bus_, path); |
Peter Qiu | 0d8b91f | 2015-07-30 16:35:26 -0700 | [diff] [blame] | 338 | } |
| 339 | #endif // DISABLE_WIMAX |
| 340 | |
Peter Qiu | 72e7e25 | 2015-06-26 16:23:46 -0700 | [diff] [blame] | 341 | } // namespace shill |