[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / chromeos / dbus / dbus_method_call_status.h
blob89cae4ae6e9d6274ad3e7e3fe89f393542a6e5c2
1 // Copyright (c) 2012 The Chromium 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.
5 #ifndef CHROMEOS_DBUS_DBUS_METHOD_CALL_STATUS_H_
6 #define CHROMEOS_DBUS_DBUS_METHOD_CALL_STATUS_H_
8 #include "base/callback.h"
10 namespace dbus {
12 class ObjectPath;
14 } // namespace dbus
16 namespace chromeos {
18 // An enum to describe whether or not a DBus method call succeeded.
19 enum DBusMethodCallStatus {
20 DBUS_METHOD_CALL_FAILURE,
21 DBUS_METHOD_CALL_SUCCESS,
24 // A callback to handle responses of methods without results.
25 typedef base::Callback<void(
26 DBusMethodCallStatus call_status)> VoidDBusMethodCallback;
28 // A callback to handle responses of methods returning a bool value.
29 typedef base::Callback<void(DBusMethodCallStatus call_status,
30 bool result)> BoolDBusMethodCallback;
32 // A callback to handle responses of methods returning a string value.
33 typedef base::Callback<void(
34 DBusMethodCallStatus call_status,
35 const std::string& result)> StringDBusMethodCallback;
37 // A callback to handle responses of methods returning a ObjectPath value.
38 typedef base::Callback<void(
39 DBusMethodCallStatus call_status,
40 const dbus::ObjectPath& result)> ObjectPathDBusMethodCallback;
42 // A callback to handle responses of methods returning a ObjectPath value that
43 // doesn't get call status.
44 typedef base::Callback<void(const dbus::ObjectPath& result)> ObjectPathCallback;
46 } // namespace chromeos
48 #endif // CHROMEOS_DBUS_DBUS_METHOD_CALL_STATUS_H_