[shill] Enable the getting of properties, and wire to dbus.
PropertyStore exposes getters for iterators pointing to the beginning
and end of its property maps, and a static utility method in DBusAdaptor
uses these to iterate through all the properties in the PropertyStore and build
up a map of property name -> DBus::Variant-wrapped value.
BUG=chromium-os:16343
TEST=unit tests
Change-Id: I85ebbaee167ab2feed0fcf8fe654274de352aca0
Reviewed-on: http://gerrit.chromium.org/gerrit/3359
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/service_dbus_adaptor.cc b/service_dbus_adaptor.cc
index 7d96812..10c132d 100644
--- a/service_dbus_adaptor.cc
+++ b/service_dbus_adaptor.cc
@@ -53,13 +53,15 @@
map<string, ::DBus::Variant> ServiceDBusAdaptor::GetProperties(
::DBus::Error &error) {
- return map<string, ::DBus::Variant>();
+ map<string, ::DBus::Variant> properties;
+ DBusAdaptor::GetProperties(service_, &properties, &error);
+ return properties;
}
void ServiceDBusAdaptor::SetProperty(const string& name,
const ::DBus::Variant& value,
::DBus::Error &error) {
- DBusAdaptor::DispatchOnType(service_, name, value, error);
+ DBusAdaptor::DispatchOnType(service_, name, value, &error);
}
void ServiceDBusAdaptor::ClearProperty(const string& , ::DBus::Error &error) {