buffet: Add support for DEVICE_DELETED XMPP notification
When DEVICE_DELETED notification is received over XMPP channel,
buffet will remove any cloud registration information (credentials,
robot account) and close server connections (XMPP channel, etc).
BUG=brillo:1215
TEST=`FEATURES=test emerge-link buffet`
Test manually on the device.
Change-Id: I86e19659b9fbc06685bcabb6c659a633e797cae5
Reviewed-on: https://chromium-review.googlesource.com/281666
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/device_registration_info.h b/buffet/device_registration_info.h
index 19c698c..43c70a4 100644
--- a/buffet/device_registration_info.h
+++ b/buffet/device_registration_info.h
@@ -275,11 +275,12 @@
void OnCommandDefsChanged();
void OnStateChanged();
- // Overrides from NotificationDelegate
+ // Overrides from NotificationDelegate.
void OnConnected(const std::string& channel_name) override;
void OnDisconnected() override;
void OnPermanentFailure() override;
void OnCommandCreated(const base::DictionaryValue& command) override;
+ void OnDeviceDeleted(const std::string& device_id) override;
// Wipes out the device registration information and stops server connections.
void MarkDeviceUnregistered();