blob: eb6eb127677ca9505ad3149e237743a905121428 [file] [log] [blame]
Eric Shienbrood9a245532012-03-07 14:20:39 -05001// 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
8#include <base/callback.h>
9
10#include "shill/dbus_properties.h"
11
12namespace shill {
13
14class Error;
15// Convenient typedefs for some commonly used callbacks.
16typedef base::Callback<void(const Error &)> ResultCallback;
17typedef base::Callback<void(const Error &)> EnabledStateChangedCallback;
18typedef base::Callback<void(const DBusPropertiesMap &,
19 const Error &)> DBusPropertyMapCallback;
20typedef base::Callback<void(const std::vector<DBusPropertiesMap> &,
21 const Error &)> DBusPropertyMapsCallback;
Arman Uguray2c39fab2012-12-12 16:56:34 -080022typedef base::Callback<void(const DBusEnumValueMap &,
23 const Error &)> DBusEnumValueMapCallback;
Eric Shienbrood9a245532012-03-07 14:20:39 -050024typedef base::Callback<void(const DBus::Path &,
25 const Error &)> DBusPathCallback;
26typedef base::Callback<void(
27 const std::vector<DBus::Path> &, const Error &)> DBusPathsCallback;
28typedef base::Callback<void(const std::string &, const Error &)> StringCallback;
29typedef base::Callback<void(
30 uint32, uint32, const DBusPropertiesMap &)> ActivationStateSignalCallback;
31
32} // namespace shill
33#endif // SHILL_CALLBACKS_