shill: cellular: Don't generate MM proxies when SHILL_CELLULAR=0.
This eliminates the need for shill to have virtual/modemmanager as a
build time dependency when USE=-cellular.
Also, cellular_error.o is included only with cellular support now.
BUG=chromium:221431
TEST=amd64-generic build packages, build image, unit tests with and
without SHILL_CELLULAR=0
Change-Id: I322bed69d437207b2a46c1846f6bfb9798b349f2
Reviewed-on: https://gerrit.chromium.org/gerrit/45978
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Darin Petkov <petkov@chromium.org>
diff --git a/proxy_factory.cc b/proxy_factory.cc
index 3cfe9ca..eb0fcc1 100644
--- a/proxy_factory.cc
+++ b/proxy_factory.cc
@@ -4,11 +4,21 @@
#include "shill/proxy_factory.h"
-#include "shill/dbus_objectmanager_proxy.h"
#include "shill/dbus_properties_proxy.h"
#include "shill/dbus_service_proxy.h"
#include "shill/dhcpcd_proxy.h"
#include "shill/logging.h"
+#include "shill/power_manager_proxy.h"
+#include "shill/supplicant_bss_proxy.h"
+#include "shill/supplicant_interface_proxy.h"
+#include "shill/supplicant_network_proxy.h"
+#include "shill/supplicant_process_proxy.h"
+#include "shill/wimax_device_proxy.h"
+#include "shill/wimax_manager_proxy.h"
+#include "shill/wimax_network_proxy.h"
+
+#if !defined(DISABLE_CELLULAR)
+#include "shill/dbus_objectmanager_proxy.h"
#include "shill/mm1_bearer_proxy.h"
#include "shill/mm1_modem_location_proxy.h"
#include "shill/mm1_modem_modem3gpp_proxy.h"
@@ -24,14 +34,7 @@
#include "shill/modem_manager_proxy.h"
#include "shill/modem_proxy.h"
#include "shill/modem_simple_proxy.h"
-#include "shill/power_manager_proxy.h"
-#include "shill/supplicant_bss_proxy.h"
-#include "shill/supplicant_interface_proxy.h"
-#include "shill/supplicant_network_proxy.h"
-#include "shill/supplicant_process_proxy.h"
-#include "shill/wimax_device_proxy.h"
-#include "shill/wimax_manager_proxy.h"
-#include "shill/wimax_network_proxy.h"
+#endif
using std::string;
@@ -55,12 +58,6 @@
connection_.reset(new DBus::Connection(DBus::Connection::SystemBus()));
}
-DBusObjectManagerProxyInterface *ProxyFactory::CreateDBusObjectManagerProxy(
- const string &path,
- const string &service) {
- return new DBusObjectManagerProxy(connection(), path, service);
-}
-
DBusPropertiesProxyInterface *ProxyFactory::CreateDBusPropertiesProxy(
const string &path,
const string &service) {
@@ -128,6 +125,12 @@
#if !defined(DISABLE_CELLULAR)
+DBusObjectManagerProxyInterface *ProxyFactory::CreateDBusObjectManagerProxy(
+ const string &path,
+ const string &service) {
+ return new DBusObjectManagerProxy(connection(), path, service);
+}
+
ModemManagerProxyInterface *ProxyFactory::CreateModemManagerProxy(
ModemManagerClassic *manager,
const string &path,