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 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_CALLBACKS_H_ |
| 6 | #define SHILL_CALLBACKS_H_ |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 7 | |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 8 | #include <string> |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 9 | #include <vector> |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 10 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 11 | #include <base/callback.h> |
| 12 | |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 13 | #include "shill/accessor_interface.h" |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 14 | #include "shill/dbus_properties.h" |
| 15 | |
| 16 | namespace shill { |
| 17 | |
| 18 | class Error; |
| 19 | // Convenient typedefs for some commonly used callbacks. |
| 20 | typedef base::Callback<void(const Error &)> ResultCallback; |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 21 | typedef base::Callback<void(const Error &, bool)> ResultBoolCallback; |
| 22 | typedef base::Callback<void(const Error &, |
| 23 | const std::string &)> ResultStringCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 24 | typedef base::Callback<void(const Error &)> EnabledStateChangedCallback; |
| 25 | typedef base::Callback<void(const DBusPropertiesMap &, |
| 26 | const Error &)> DBusPropertyMapCallback; |
| 27 | typedef base::Callback<void(const std::vector<DBusPropertiesMap> &, |
| 28 | const Error &)> DBusPropertyMapsCallback; |
Arman Uguray | 2c39fab | 2012-12-12 16:56:34 -0800 | [diff] [blame] | 29 | typedef base::Callback<void(const DBusEnumValueMap &, |
| 30 | const Error &)> DBusEnumValueMapCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 31 | typedef base::Callback<void(const DBus::Path &, |
| 32 | const Error &)> DBusPathCallback; |
| 33 | typedef base::Callback<void( |
| 34 | const std::vector<DBus::Path> &, const Error &)> DBusPathsCallback; |
| 35 | typedef base::Callback<void(const std::string &, const Error &)> StringCallback; |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame] | 36 | typedef base::Callback<void(uint32_t, uint32_t, const DBusPropertiesMap &)> |
| 37 | ActivationStateSignalCallback; |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 38 | typedef base::Callback<void(const Stringmaps &, |
| 39 | const Error &)> ResultStringmapsCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 40 | |
| 41 | } // namespace shill |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 42 | |
| 43 | #endif // SHILL_CALLBACKS_H_ |