blob: 6314531381d69b498d24868cc7e34178aa89dd9b [file] [log] [blame]
Christopher Wileya4915c42014-03-27 14:45:37 -07001// Copyright 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BUFFET_DBUS_UTILS_H_
6#define BUFFET_DBUS_UTILS_H_
7
8#include <string>
9
10#include <base/memory/scoped_ptr.h>
Christopher Wiley90016242014-04-01 17:33:29 -070011#include <dbus/exported_object.h>
Christopher Wileya4915c42014-03-27 14:45:37 -070012#include <dbus/message.h>
13
Alex Vakulenkob3aac252014-05-07 17:35:24 -070014#include "buffet/error.h"
15
Christopher Wileya4915c42014-03-27 14:45:37 -070016namespace buffet {
17
18namespace dbus_utils {
19
20scoped_ptr<dbus::Response> GetBadArgsError(dbus::MethodCall* method_call,
21 const std::string& message);
22
Alex Vakulenkob3aac252014-05-07 17:35:24 -070023scoped_ptr<dbus::Response> GetDBusError(dbus::MethodCall* method_call,
Alex Vakulenkoaf23b322014-05-08 16:25:45 -070024 const Error* error);
Alex Vakulenkob3aac252014-05-07 17:35:24 -070025
26
Christopher Wiley90016242014-04-01 17:33:29 -070027dbus::ExportedObject::MethodCallCallback GetExportableDBusMethod(
28 base::Callback<scoped_ptr<dbus::Response>(dbus::MethodCall*)> handler);
29
Christopher Wileya4915c42014-03-27 14:45:37 -070030} // namespace dbus_utils
31
32} // namespace buffet
33
34#endif // BUFFET_DBUS_UTILS_H_
35