buffet: Add Manager class

This class implements the Manager DBus interface and is responsible for
global operations of Buffet.  For instance, this class is responsible
for initiating device regsitration and accepting state updates to be
published to the cloud.

BUG=chromium:355387
TEST=buffet_BasicDBusAPI passes.

Change-Id: Id38d9698048bd0fa722dc297a957c80e0a488870
diff --git a/buffet/dbus_utils.cc b/buffet/dbus_utils.cc
new file mode 100644
index 0000000..fcda628
--- /dev/null
+++ b/buffet/dbus_utils.cc
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <base/logging.h>
+
+#include "buffet/dbus_utils.h"
+
+namespace buffet {
+
+namespace dbus_utils {
+
+scoped_ptr<dbus::Response> GetBadArgsError(dbus::MethodCall* method_call,
+                                           const std::string& message) {
+  LOG(ERROR) << "Error while handling DBus call: " << message;
+  scoped_ptr<dbus::ErrorResponse> resp(dbus::ErrorResponse::FromMethodCall(
+      method_call, "org.freedesktop.DBus.Error.InvalidArgs", message));
+  return scoped_ptr<dbus::Response>(resp.release());
+}
+
+}  // namespace dbus_utils
+
+}  // namespace buffet