shill: Convert DHCP Proxy to use a model similar to Supplicant and ModemManager.

Also, don't create a DBus connection for each proxy since this doesn't work in
some event callbacks and wastes resources. Instead use a shared connection
provided by the ProxyFactory.

BUG=chromium-os:17735
TEST=unit tests, tested on device

Change-Id: I4d16b430783c1159501c0414ef3b846bce1a4c0e
Reviewed-on: http://gerrit.chromium.org/gerrit/4279
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
diff --git a/dhcp_provider.h b/dhcp_provider.h
index 53375d5..771e9e1 100644
--- a/dhcp_provider.h
+++ b/dhcp_provider.h
@@ -6,17 +6,17 @@
 #define SHILL_DHCP_PROVIDER_
 
 #include <map>
+#include <string>
 
 #include <base/memory/scoped_ptr.h>
 #include <base/memory/singleton.h>
-#include <dbus-c++/connection.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
 #include "shill/refptr_types.h"
 
 namespace shill {
 
-class DHCPListenerInterface;
+class DHCPCDListener;
 class GLib;
 
 // DHCPProvider is a singleton providing the main DHCP configuration
@@ -31,9 +31,9 @@
   static DHCPProvider *GetInstance();
 
   // Initializes the provider singleton. This method hooks up a D-Bus signal
-  // listener to |connection| that catches signals from spawned DHCP clients and
-  // dispatches them to the appropriate DHCP configuration instance.
-  void Init(DBus::Connection *connection, GLib *glib);
+  // listener that catches signals from spawned DHCP clients and dispatches them
+  // to the appropriate DHCP configuration instance.
+  void Init(GLib *glib);
 
   // Creates a new DHCPConfig for |device_name|. The DHCP configuration for the
   // device can then be initiated through DHCPConfig::Request and
@@ -68,7 +68,7 @@
 
   // A single listener is used to catch signals from all DHCP clients and
   // dispatch them to the appropriate DHCP configuration instance.
-  scoped_ptr<DHCPListenerInterface> listener_;
+  scoped_ptr<DHCPCDListener> listener_;
 
   // A map that binds PIDs to DHCP configuration instances.
   PIDConfigMap configs_;