buffet: Anticipate addition of several new DBus facing objects
The draft of DBusManager was written with the idea that only the
DBusManager would expose methods to DBus. When we add Manager and
Command objects, we're going to need better interfaces to get
ExportedObjects for each now object instance.
BUG=chromium:355387
TEST=Compiles, and `buffet_client --testmethod` still works.
Change-Id: I479b03df0168d1e8305aca1153038fbc8d2ef6c4
diff --git a/buffet/buffet_client.cc b/buffet/buffet_client.cc
index 83d5f9c..f7072ff 100755
--- a/buffet/buffet_client.cc
+++ b/buffet/buffet_client.cc
@@ -10,6 +10,7 @@
#include <dbus/object_proxy.h>
#include <gflags/gflags.h>
+#include "buffet/dbus_constants.h"
#include "buffet/dbus_manager.h"
DEFINE_bool(testmethod, false, "Call the Buffet Test Method.");
@@ -18,14 +19,14 @@
dbus::ObjectProxy* GetBuffetDBusProxy(dbus::Bus *bus) {
return bus->GetObjectProxy(
- buffet::kBuffetServiceName,
- dbus::ObjectPath(buffet::kBuffetServicePath));
+ buffet::dbus_constants::kServiceName,
+ dbus::ObjectPath(buffet::dbus_constants::kRootServicePath));
}
void CallTestMethod(dbus::ObjectProxy* proxy) {
int timeout_ms = 1000;
- dbus::MethodCall method_call(buffet::kBuffetInterface,
- buffet::kTestMethod);
+ dbus::MethodCall method_call(buffet::dbus_constants::kRootInterface,
+ buffet::dbus_constants::kRootTestMethod);
scoped_ptr<dbus::Response> response(proxy->CallMethodAndBlock(&method_call,
timeout_ms));
if (!response) {