Christopher Wiley | a4915c4 | 2014-03-27 14:45:37 -0700 | [diff] [blame] | 1 | // 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 Wiley | 9001624 | 2014-04-01 17:33:29 -0700 | [diff] [blame] | 11 | #include <dbus/exported_object.h> |
Christopher Wiley | a4915c4 | 2014-03-27 14:45:37 -0700 | [diff] [blame] | 12 | #include <dbus/message.h> |
| 13 | |
Alex Vakulenko | b3aac25 | 2014-05-07 17:35:24 -0700 | [diff] [blame] | 14 | #include "buffet/error.h" |
| 15 | |
Christopher Wiley | a4915c4 | 2014-03-27 14:45:37 -0700 | [diff] [blame] | 16 | namespace buffet { |
| 17 | |
| 18 | namespace dbus_utils { |
| 19 | |
| 20 | scoped_ptr<dbus::Response> GetBadArgsError(dbus::MethodCall* method_call, |
| 21 | const std::string& message); |
| 22 | |
Alex Vakulenko | b3aac25 | 2014-05-07 17:35:24 -0700 | [diff] [blame] | 23 | scoped_ptr<dbus::Response> GetDBusError(dbus::MethodCall* method_call, |
Alex Vakulenko | af23b32 | 2014-05-08 16:25:45 -0700 | [diff] [blame] | 24 | const Error* error); |
Alex Vakulenko | b3aac25 | 2014-05-07 17:35:24 -0700 | [diff] [blame] | 25 | |
| 26 | |
Christopher Wiley | 9001624 | 2014-04-01 17:33:29 -0700 | [diff] [blame] | 27 | dbus::ExportedObject::MethodCallCallback GetExportableDBusMethod( |
| 28 | base::Callback<scoped_ptr<dbus::Response>(dbus::MethodCall*)> handler); |
| 29 | |
Christopher Wiley | a4915c4 | 2014-03-27 14:45:37 -0700 | [diff] [blame] | 30 | } // namespace dbus_utils |
| 31 | |
| 32 | } // namespace buffet |
| 33 | |
| 34 | #endif // BUFFET_DBUS_UTILS_H_ |
| 35 | |