shill: dbus_properties: Convert to callbacks instead of delegates

Use callbacks instead of proxies on the DBusPropertiesProxyInterface.
This makes the class consistent with the other proxies used for
cellular support, and in subsequent CLs will allow access to the
GetAll function without having to implement the Delegate interface.

Add a GetStrings method to dbus_properties.

BUG=none
TEST=run unit tests, run on a machine validate that changes in signal
strength are noticed.

Change-Id: I23e47f011c39a23f406ef62a52a5a613e55c55ed
Reviewed-on: https://gerrit.chromium.org/gerrit/20640
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
diff --git a/dbus_properties_proxy.h b/dbus_properties_proxy.h
index 415f901..38866d1 100644
--- a/dbus_properties_proxy.h
+++ b/dbus_properties_proxy.h
@@ -14,8 +14,7 @@
 
 class DBusPropertiesProxy : public DBusPropertiesProxyInterface {
  public:
-  DBusPropertiesProxy(DBusPropertiesProxyDelegate *delegate,
-                      DBus::Connection *connection,
+  DBusPropertiesProxy(DBus::Connection *connection,
                       const std::string &path,
                       const std::string &service);
   virtual ~DBusPropertiesProxy();
@@ -23,16 +22,25 @@
   // Inherited from DBusPropertiesProxyInterface.
   virtual DBusPropertiesMap GetAll(const std::string &interface_name);
 
+  virtual void set_properties_changed_callback(
+      const PropertiesChangedCallback &callback);
+  virtual void set_modem_manager_properties_changed_callback(
+      const ModemManagerPropertiesChangedCallback &callback);
+
  private:
   class Proxy : public org::freedesktop::DBus::Properties_proxy,
                 public DBus::ObjectProxy {
    public:
-    Proxy(DBusPropertiesProxyDelegate *delegate,
-          DBus::Connection *connection,
+    Proxy(DBus::Connection *connection,
           const std::string &path,
           const std::string &service);
     virtual ~Proxy();
 
+    virtual void set_properties_changed_callback(
+        const PropertiesChangedCallback &callback);
+    virtual void set_modem_manager_properties_changed_callback(
+        const ModemManagerPropertiesChangedCallback &callback);
+
    private:
     // Signal callbacks inherited from DBusProperties_proxy.
     virtual void MmPropertiesChanged(const std::string &interface,
@@ -43,7 +51,8 @@
         const DBusPropertiesMap &changed_properties,
         const std::vector<std::string> &invalidated_properties);
 
-    DBusPropertiesProxyDelegate *delegate_;
+    PropertiesChangedCallback properties_changed_callback_;
+    ModemManagerPropertiesChangedCallback mm_properties_changed_callback_;
 
     DISALLOW_COPY_AND_ASSIGN(Proxy);
   };