summaryrefslogtreecommitdiff
path: root/property_store.h
diff options
context:
space:
mode:
authorJason Glasgow <jglasgow@chromium.org>2012-03-30 14:12:22 -0400
committerGerrit <chrome-bot@google.com>2012-03-30 13:01:24 -0700
commitacdc11f4961994f894f978713d1a22f2eb23687d (patch)
tree4c33522f87e1773b11d3925de9f5b286b66a3029 /property_store.h
parenta31e79c0c8b66eeabd2b13c833c25380c99559ad (diff)
downloadshill-acdc11f4961994f894f978713d1a22f2eb23687d.tar.gz
shill: Change service.device property to be a DBus::Path
Change service.device property to be a DBus::Path because it is a path not a string. Flimflam exports the property as a path. Exporting it as a string causes cashew to die. Change the unit tests to use valid DBus paths which can contain elements separated by /. Each element can contain only [A-z][a-z][0-9]_ and cannot end in a trailing /. BUG=chromium-os:28734 TEST=run shill unit tests, run shill on DUT. Run cashew. Change-Id: I65fb843fb93f76d95eea6da334ad326ccb9fbd6f Reviewed-on: https://gerrit.chromium.org/gerrit/19366 Commit-Ready: Jason Glasgow <jglasgow@chromium.org> Reviewed-by: Jason Glasgow <jglasgow@chromium.org> Tested-by: Jason Glasgow <jglasgow@chromium.org>
Diffstat (limited to 'property_store.h')
-rw-r--r--property_store.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/property_store.h b/property_store.h
index 54c80563..51576e10 100644
--- a/property_store.h
+++ b/property_store.h
@@ -68,6 +68,10 @@ class PropertyStore {
uint32 value,
Error *error);
+ virtual bool SetRpcIdentifierProperty(const std::string &name,
+ const RpcIdentifier &value,
+ Error *error);
+
// Clearing a property resets it to its "factory" value. This value
// is generally the value that it (the property) had when it was
// registered with PropertyStore.
@@ -94,6 +98,8 @@ class PropertyStore {
ReadablePropertyConstIterator<int32> GetInt32PropertiesIter() const;
ReadablePropertyConstIterator<KeyValueStore> GetKeyValueStorePropertiesIter(
) const;
+ ReadablePropertyConstIterator<RpcIdentifier> GetRpcIdentifierPropertiesIter(
+ ) const;
ReadablePropertyConstIterator<RpcIdentifiers> GetRpcIdentifiersPropertiesIter(
) const;
ReadablePropertyConstIterator<std::string> GetStringPropertiesIter() const;
@@ -152,6 +158,8 @@ class PropertyStore {
const Int32Accessor &accessor);
void RegisterDerivedKeyValueStore(const std::string &name,
const KeyValueStoreAccessor &accessor);
+ void RegisterDerivedRpcIdentifier(const std::string &name,
+ const RpcIdentifierAccessor &acc);
void RegisterDerivedRpcIdentifiers(const std::string &name,
const RpcIdentifiersAccessor &accessor);
void RegisterDerivedString(const std::string &name,
@@ -180,6 +188,7 @@ class PropertyStore {
std::map<std::string, Int16Accessor> int16_properties_;
std::map<std::string, Int32Accessor> int32_properties_;
std::map<std::string, KeyValueStoreAccessor> key_value_store_properties_;
+ std::map<std::string, RpcIdentifierAccessor> rpc_identifier_properties_;
std::map<std::string, RpcIdentifiersAccessor> rpc_identifiers_properties_;
std::map<std::string, StringAccessor> string_properties_;
std::map<std::string, StringmapAccessor> stringmap_properties_;