shill: vpn: Associate VPN device with service and update IP configuration.

BUG=chromium-os:27384,chromium-os:27385
TEST=unit tests

Change-Id: I5b35bebeadd25f50f7044d2e4ec5bc121a56835e
Reviewed-on: https://gerrit.chromium.org/gerrit/17488
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/device.h b/device.h
index c27681a..d710619 100644
--- a/device.h
+++ b/device.h
@@ -106,6 +106,7 @@
   const std::string &link_name() const { return link_name_; }
   int interface_index() const { return interface_index_; }
   const ConnectionRefPtr &connection() const { return connection_; }
+  const IPConfigRefPtr &ipconfig() const { return ipconfig_; }
   bool powered() const { return powered_; }
   virtual Technology::Identifier technology() const { return technology_; }
   std::string GetTechnologyString(Error *error);
@@ -158,6 +159,9 @@
   // request was successfully sent.
   bool AcquireIPConfig();
 
+  // Callback invoked on every IP configuration update.
+  void OnIPConfigUpdated(const IPConfigRefPtr &ipconfig, bool success);
+
   // Maintain connection state (Routes, IP Addresses and DNS) in the OS.
   void CreateConnection();
 
@@ -223,9 +227,6 @@
   static const char kStoragePowered[];
   static const char kStorageIPConfigs[];
 
-  // Callback invoked on every IP configuration update.
-  void IPConfigUpdatedCallback(const IPConfigRefPtr &ipconfig, bool success);
-
   // Right now, Devices reference IPConfigs directly when persisted to disk
   // It's not clear that this makes sense long-term, but that's how it is now.
   // This call generates a string in the right format for this persisting.