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/modem.h b/modem.h
index e3e5f67..78a1e97 100644
--- a/modem.h
+++ b/modem.h
@@ -23,7 +23,7 @@
 
 // Handles an instance of ModemManager.Modem and an instance of a Cellular
 // device.
-class Modem {
+class Modem : public DBusPropertiesProxyListener {
  public:
   // |owner| is the ModemManager DBus service owner (e.g., ":1.17"). |path| is
   // the ModemManager.Modem DBus object path (e.g.,
@@ -35,7 +35,8 @@
         Manager *manager);
   ~Modem();
 
-  // Initializes support for the modem, possibly constructing a Cellular device.
+  // Asynchronously initializes support for the modem, possibly constructing a
+  // Cellular device.
   void Init();
 
  private:
@@ -59,6 +60,15 @@
   // properties are invalid.
   void CreateCellularDevice(const DBusPropertiesMap &properties);
 
+  // Signal callbacks inherited from DBusPropertiesProxyListener.
+  virtual void OnDBusPropertiesChanged(
+      const std::string &interface,
+      const DBusPropertiesMap &changed_properties,
+      const std::vector<std::string> &invalidated_properties);
+  virtual void OnModemManagerPropertiesChanged(
+      const std::string &interface,
+      const DBusPropertiesMap &properties);
+
   // A proxy to the org.freedesktop.DBus.Properties interface used to obtain
   // ModemManager.Modem properties and watch for property changes.
   scoped_ptr<DBusPropertiesProxyInterface> dbus_properties_proxy_;