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/supplicant_interface_proxy.h b/supplicant_interface_proxy.h
index cd7a95e..509b5c3 100644
--- a/supplicant_interface_proxy.h
+++ b/supplicant_interface_proxy.h
@@ -22,6 +22,7 @@
: public SupplicantInterfaceProxyInterface {
public:
SupplicantInterfaceProxy(const WiFiRefPtr &wifi,
+ DBus::Connection *bus,
const ::DBus::Path &object_path,
const char *dbus_addr);
virtual ~SupplicantInterfaceProxy();
@@ -38,8 +39,10 @@
class Proxy : public fi::w1::wpa_supplicant1::Interface_proxy,
public ::DBus::ObjectProxy {
public:
- Proxy(const WiFiRefPtr &wifi, DBus::Connection *bus,
- const ::DBus::Path &object_path, const char *dbus_addr);
+ Proxy(const WiFiRefPtr &wifi,
+ DBus::Connection *bus,
+ const ::DBus::Path &object_path,
+ const char *dbus_addr);
virtual ~Proxy();
private:
@@ -64,7 +67,6 @@
DISALLOW_COPY_AND_ASSIGN(Proxy);
};
- DBus::Connection connection_;
Proxy proxy_;
DISALLOW_COPY_AND_ASSIGN(SupplicantInterfaceProxy);