buffet: Add state change ID to state queue

Each state update will now increment a state change ID to help correlate
device state and command updates.

Right now, each call to NotifyPropertiesUpdated() will increment the ID.

This functionality will be used in subsequent CLs to implement ordering
of state and command updates on GCD server.

BUG=brillo:1202
TEST=`FEATURES=test emerge-link buffet`

Change-Id: I8cd591ec83cef7c1f1019728c0492fdee23d64dc
Reviewed-on: https://chromium-review.googlesource.com/282081
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/states/state_change_queue_interface.h b/buffet/states/state_change_queue_interface.h
index 44e0f79..7c67829 100644
--- a/buffet/states/state_change_queue_interface.h
+++ b/buffet/states/state_change_queue_interface.h
@@ -10,7 +10,7 @@
 #include <base/time/time.h>
 #include <chromeos/variant_dictionary.h>
 
-#include "commands/schema_utils.h"
+#include "buffet/commands/schema_utils.h"
 
 namespace buffet {
 
@@ -29,6 +29,8 @@
 // change notification events.
 class StateChangeQueueInterface {
  public:
+  using UpdateID = uint64_t;
+
   // Returns true if the state change notification queue is empty.
   virtual bool IsEmpty() const = 0;
 
@@ -40,9 +42,13 @@
   // Returns the recorded state changes since last time this method was called.
   virtual std::vector<StateChange> GetAndClearRecordedStateChanges() = 0;
 
+  // Returns an ID of last state change update. Each NotifyPropertiesUpdated()
+  // invocation increments this value by 1.
+  virtual UpdateID GetLastStateChangeId() const = 0;
+
  protected:
   // No one should attempt do destroy the queue through the interface.
-  ~StateChangeQueueInterface() {}
+  virtual ~StateChangeQueueInterface() {}
 };
 
 }  // namespace buffet