shill: storage: Load and store uint64 values
BUG=chromium-os:31584
TEST=New unit tests; list-devices on a real machine
Change-Id: I48e58ad50e7ce15620d282d7a867b1ab253a2f56
Reviewed-on: https://gerrit.chromium.org/gerrit/27246
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
diff --git a/store_interface.h b/store_interface.h
index 9d1e7ab..8bb9933 100644
--- a/store_interface.h
+++ b/store_interface.h
@@ -77,6 +77,19 @@
const std::string &key,
int value) = 0;
+ // Gets a 64-bit unsigned integer |value| associated with |group|:|key|.
+ // Returns true on success and false on failure (including when the
+ // |group|:|key| is not present in the store).
+ virtual bool GetUint64(const std::string &group,
+ const std::string &key,
+ uint64 *value) const = 0;
+
+ // Associates |group|:|key| with a 64-bit unsigned integer |value|. Returns
+ // true on success, false otherwise.
+ virtual bool SetUint64(const std::string &group,
+ const std::string &key,
+ uint64 value) = 0;
+
// Gets a string list |value| associated with |group|:|key|. Returns true on
// success and false on failure (including when |group|:|key| is not present
// in the store).