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>
diff --git a/property_store.h b/property_store.h
index 54c8056..51576e1 100644
--- a/property_store.h
+++ b/property_store.h
@@ -68,6 +68,10 @@
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 @@
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 @@
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 @@
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_;