buffet: XmppChannel listens for connectivity changes

ShillClent provides notifications for network changes.
XmppChannel issue XMPP ping on every network change and restart if
failed. Only exception is soon scheduled upcoming reconnect.

BUG=brillo:1139
TEST=register device, disconnect network, wait device is offline in
     GCD dashboard, connect network.
     Dashboard should show device as online in less then 60 seconds.

Change-Id: I73dffc54400777b2325c26fb8aaf259b515174ce
Reviewed-on: https://chromium-review.googlesource.com/281413
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/device_registration_info.h b/buffet/device_registration_info.h
index 860a8fc..ed96db0 100644
--- a/buffet/device_registration_info.h
+++ b/buffet/device_registration_info.h
@@ -37,6 +37,10 @@
 class KeyValueStore;
 }  // namespace chromeos
 
+namespace privetd {
+class ShillClient;
+}
+
 namespace buffet {
 
 class StateManager;
@@ -60,7 +64,8 @@
       const std::shared_ptr<StateManager>& state_manager,
       std::unique_ptr<BuffetConfig> config,
       const std::shared_ptr<chromeos::http::Transport>& transport,
-      bool notifications_enabled);
+      bool notifications_enabled,
+      privetd::ShillClient* shill_client);
 
   ~DeviceRegistrationInfo() override;
 
@@ -300,6 +305,8 @@
   NotificationChannel* current_notification_channel_{nullptr};
   bool notification_channel_starting_{false};
 
+  privetd::ShillClient* shill_client_{nullptr};
+
   // Tracks our current registration status.
   RegistrationStatus registration_status_{RegistrationStatus::kUnconfigured};