blob: b1dc9ae9578044c49a87b2754a1f50f4be343b6a [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
Christopher Wiley0d9cf0c2013-02-19 19:24:57 -08008#include <string>
9
Eric Shienbrood9a245532012-03-07 14:20:39 -050010#include <base/callback.h>
11
12#include "shill/dbus_properties.h"
13
14namespace shill {
15
16class Error;
17// Convenient typedefs for some commonly used callbacks.
18typedef base::Callback<void(const Error &)> ResultCallback;
Christopher Wiley0d9cf0c2013-02-19 19:24:57 -080019typedef base::Callback<void(const Error &, bool)> ResultBoolCallback;
20typedef base::Callback<void(const Error &,
21 const std::string &)> ResultStringCallback;
Eric Shienbrood9a245532012-03-07 14:20:39 -050022typedef base::Callback<void(const Error &)> EnabledStateChangedCallback;
23typedef base::Callback<void(const DBusPropertiesMap &,
24 const Error &)> DBusPropertyMapCallback;
25typedef base::Callback<void(const std::vector<DBusPropertiesMap> &,
26 const Error &)> DBusPropertyMapsCallback;
Arman Uguray2c39fab2012-12-12 16:56:34 -080027typedef base::Callback<void(const DBusEnumValueMap &,
28 const Error &)> DBusEnumValueMapCallback;
Eric Shienbrood9a245532012-03-07 14:20:39 -050029typedef base::Callback<void(const DBus::Path &,
30 const Error &)> DBusPathCallback;
31typedef base::Callback<void(
32 const std::vector<DBus::Path> &, const Error &)> DBusPathsCallback;
33typedef base::Callback<void(const std::string &, const Error &)> StringCallback;
34typedef base::Callback<void(
35 uint32, uint32, const DBusPropertiesMap &)> ActivationStateSignalCallback;
36
37} // namespace shill
38#endif // SHILL_CALLBACKS_