shill: On Service::Connect, connect the modem device to the network.
Also, uncouple the DBusProperties signal callbacks from Modem to make the proxy
implementation more consistent with the other proxies.
BUG=chromium-os:18727
TEST=unit tests
Change-Id: Icdddea8d2a30803150f2a159fdc5a719e960f95d
Reviewed-on: http://gerrit.chromium.org/gerrit/5444
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/dbus_properties_proxy.cc b/dbus_properties_proxy.cc
index 6f43fbc..c8a19e3 100644
--- a/dbus_properties_proxy.cc
+++ b/dbus_properties_proxy.cc
@@ -6,18 +6,16 @@
#include <base/logging.h>
-#include "shill/modem.h"
-
namespace shill {
using std::string;
using std::vector;
-DBusPropertiesProxy::DBusPropertiesProxy(DBus::Connection *connection,
- Modem *modem,
+DBusPropertiesProxy::DBusPropertiesProxy(DBusPropertiesProxyListener *listener,
+ DBus::Connection *connection,
const string &path,
const string &service)
- : proxy_(connection, modem, path, service) {}
+ : proxy_(listener, connection, path, service) {}
DBusPropertiesProxy::~DBusPropertiesProxy() {}
@@ -25,26 +23,29 @@
return proxy_.GetAll(interface_name);
}
-DBusPropertiesProxy::Proxy::Proxy(DBus::Connection *connection,
- Modem *modem,
+DBusPropertiesProxy::Proxy::Proxy(DBusPropertiesProxyListener *listener,
+ DBus::Connection *connection,
const string &path,
const string &service)
: DBus::ObjectProxy(*connection, path, service.c_str()),
- modem_(modem) {}
+ listener_(listener) {}
DBusPropertiesProxy::Proxy::~Proxy() {}
void DBusPropertiesProxy::Proxy::MmPropertiesChanged(
const string &interface,
const DBusPropertiesMap &properties) {
- LOG(INFO) << "MmPropertiesChanged: " << interface;
+ VLOG(2) << __func__ << "(" << interface << ")";
+ listener_->OnModemManagerPropertiesChanged(interface, properties);
}
void DBusPropertiesProxy::Proxy::PropertiesChanged(
const string &interface,
const DBusPropertiesMap &changed_properties,
const vector<string> &invalidated_properties) {
- LOG(INFO) << "PropertiesChanged: " << interface;
+ VLOG(2) << __func__ << "(" << interface << ")";
+ listener_->OnDBusPropertiesChanged(
+ interface, changed_properties, invalidated_properties);
}
} // namespace shill