[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/dbus_adaptor_unittest.cc b/dbus_adaptor_unittest.cc
index 0454a51..4aeba6b 100644
--- a/dbus_adaptor_unittest.cc
+++ b/dbus_adaptor_unittest.cc
@@ -156,17 +156,16 @@
EXPECT_CALL(store, SetStringProperty("", StrEq(string_path), _))
.WillOnce(Return(true));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", bool_v_, e1));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", path_v, e2));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", string_v_, e3));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", strings_v_, e4));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", int16_v_, e5));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", int32_v_, e6));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", uint16_v_, e7));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", uint32_v_, e8));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", stringmap_v_, e9));
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", byte_v_, e10));
-
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", bool_v_, &e1));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", path_v, &e2));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", string_v_, &e3));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", strings_v_, &e4));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", int16_v_, &e5));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", int32_v_, &e6));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", uint16_v_, &e7));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", uint32_v_, &e8));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", stringmap_v_, &e9));
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(&store, "", byte_v_, &e10));
}
} // namespace shill