libchromeos: Switch ExportedObjectManager to use DBusObject
Use DBusObject helper class to implement D-Bus object for
ExportedObjectManager.
Now that Variant data type serialization on D-Bus is supported,
switch a number of method handler to be a higher-level C++
callbacks that return native data types which can automatically
be sent over D-Bus with the help of AppendValueToWriter() functions.
Removed remaining scoped_ptr in dbus_utils and dbus_object
and replaced them with std::unique_ptr.
BUG=None
TEST=FEATURES=test emerge-link libchromeos
USE=buffet P2_TEST_FILTER="buffet::*" FEATURES=test emerge-link platform2
Change-Id: I53bdb5301ec6c3460873c5ac1559fb5d171850a4
Reviewed-on: https://chromium-review.googlesource.com/213963
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/manager.cc b/buffet/manager.cc
index ee7379f..6c359fc 100644
--- a/buffet/manager.cc
+++ b/buffet/manager.cc
@@ -31,7 +31,7 @@
object_manager->GetBus(),
dbus::ObjectPath(dbus_constants::kManagerServicePath)) {}
-void Manager::Init(const AsyncEventSequencer::CompletionAction& cb) {
+void Manager::RegisterAsync(const AsyncEventSequencer::CompletionAction& cb) {
chromeos::dbus_utils::DBusInterface* itf =
dbus_object_.AddOrGetInterface(dbus_constants::kManagerInterface);
itf->AddMethodHandler(dbus_constants::kManagerCheckDeviceRegistered,