Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 1 | // Copyright (c) 2012 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 SHILL_CALLBACKS_ |
| 6 | #define SHILL_CALLBACKS_ |
| 7 | |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 10 | #include <base/callback.h> |
| 11 | |
| 12 | #include "shill/dbus_properties.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | class Error; |
| 17 | // Convenient typedefs for some commonly used callbacks. |
| 18 | typedef base::Callback<void(const Error &)> ResultCallback; |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 19 | typedef base::Callback<void(const Error &, bool)> ResultBoolCallback; |
| 20 | typedef base::Callback<void(const Error &, |
| 21 | const std::string &)> ResultStringCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 22 | typedef base::Callback<void(const Error &)> EnabledStateChangedCallback; |
| 23 | typedef base::Callback<void(const DBusPropertiesMap &, |
| 24 | const Error &)> DBusPropertyMapCallback; |
| 25 | typedef base::Callback<void(const std::vector<DBusPropertiesMap> &, |
| 26 | const Error &)> DBusPropertyMapsCallback; |
Arman Uguray | 2c39fab | 2012-12-12 16:56:34 -0800 | [diff] [blame] | 27 | typedef base::Callback<void(const DBusEnumValueMap &, |
| 28 | const Error &)> DBusEnumValueMapCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 29 | typedef base::Callback<void(const DBus::Path &, |
| 30 | const Error &)> DBusPathCallback; |
| 31 | typedef base::Callback<void( |
| 32 | const std::vector<DBus::Path> &, const Error &)> DBusPathsCallback; |
| 33 | typedef base::Callback<void(const std::string &, const Error &)> StringCallback; |
| 34 | typedef base::Callback<void( |
| 35 | uint32, uint32, const DBusPropertiesMap &)> ActivationStateSignalCallback; |
| 36 | |
| 37 | } // namespace shill |
| 38 | #endif // SHILL_CALLBACKS_ |