summaryrefslogtreecommitdiff
path: root/property_store.h
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2012-07-10 20:48:44 -0700
committerGerrit <chrome-bot@google.com>2012-07-11 14:46:33 -0700
commite18c33bc332e558a51a1a29c20b00a935483fb96 (patch)
treee0d0d2dc451e0e788deb76b61ffa521a4c993de0 /property_store.h
parent1ac4e84148e03752d99aecea4f743abb094f28b0 (diff)
downloadshill-e18c33bc332e558a51a1a29c20b00a935483fb96.tar.gz
shill: Add uint64 properties
This is a fairly minimal addition, since we will only need read-only derived types. BUG=chromium-os:31584 TEST=New unit tests; list-devices on a real machine Change-Id: I7b65224ae329443066f563b620b379f29006f8a0 Reviewed-on: https://gerrit.chromium.org/gerrit/27157 Reviewed-by: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org> Commit-Ready: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'property_store.h')
-rw-r--r--property_store.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/property_store.h b/property_store.h
index 51576e10..829dcc4b 100644
--- a/property_store.h
+++ b/property_store.h
@@ -68,6 +68,10 @@ class PropertyStore {
uint32 value,
Error *error);
+ virtual bool SetUint64Property(const std::string &name,
+ uint64 value,
+ Error *error);
+
virtual bool SetRpcIdentifierProperty(const std::string &name,
const RpcIdentifier &value,
Error *error);
@@ -109,6 +113,7 @@ class PropertyStore {
ReadablePropertyConstIterator<uint8> GetUint8PropertiesIter() const;
ReadablePropertyConstIterator<uint16> GetUint16PropertiesIter() const;
ReadablePropertyConstIterator<uint32> GetUint32PropertiesIter() const;
+ ReadablePropertyConstIterator<uint64> GetUint64PropertiesIter() const;
// Methods for registering a property.
//
@@ -172,6 +177,8 @@ class PropertyStore {
const StringsAccessor &accessor);
void RegisterDerivedUint16(const std::string &name,
const Uint16Accessor &accessor);
+ void RegisterDerivedUint64(const std::string &name,
+ const Uint64Accessor &accessor);
private:
template <class V>
@@ -197,6 +204,7 @@ class PropertyStore {
std::map<std::string, Uint8Accessor> uint8_properties_;
std::map<std::string, Uint16Accessor> uint16_properties_;
std::map<std::string, Uint32Accessor> uint32_properties_;
+ std::map<std::string, Uint64Accessor> uint64_properties_;
DISALLOW_COPY_AND_ASSIGN(PropertyStore);
};