shill: add Lucid Sleep DBus API to Manager and Device

Added skeleton implementation and documentation of Lucid Sleep DBus API.

Extended IPAddressStore to allow removal of IPAddresses and access to
the underlying set.

BUG=chromium:399137
TEST='emerge-squawks platform2' succeeds; unit tests

Change-Id: I5ab41dc17d0e95f2291b3d1dd4287dec9d31c9bc
Reviewed-on: https://chromium-review.googlesource.com/211510
Tested-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
diff --git a/manager.h b/manager.h
index ecf0b3a..06f37c3 100644
--- a/manager.h
+++ b/manager.h
@@ -140,6 +140,18 @@
       Error *error);
   ServiceRefPtr FindMatchingService(const KeyValueStore &args, Error *error);
 
+  // Requests that NICs be programmed to wake up from
+  // suspend on the arrival of packets on any TCP connection
+  // with a source IP address matching the IP address
+  // specified in the string argument.
+  void AddWakeOnPacketConnection(const std::string &ip_endpoints,
+                                 Error *error);
+  // Removes a NIC programming request established by AddWakeOnPacketConnection.
+  void RemoveWakeOnPacketConnection(const std::string &ip_endpoints,
+                                    Error *error);
+  // Removes all NIC programming requests.
+  void RemoveAllWakeOnPacketConnections(Error *error);
+
   // Retrieve geolocation data from the Manager.
   const std::map<std::string, GeolocationInfos>
       &GetNetworksForGeolocation() const;
@@ -563,6 +575,14 @@
     power_manager_.reset(power_manager);
   }
 
+  // Removes all wake on packet connections rules registered on the device
+  // that is connected to the old service and adds them to the device connected
+  // to the new service
+  void TransferWakeOnPacketConnections(const ServiceRefPtr &old_service,
+                                       const ServiceRefPtr &new_service);
+
+  DeviceRefPtr GetDeviceConnectedToService(ServiceRefPtr service);
+
   EventDispatcher *dispatcher_;
   const base::FilePath run_path_;
   const base::FilePath storage_path_;