blob: d7bdd35b30538cc7f94a3e60265b7d7338ab7e43 [file] [log] [blame]
Peter Qiuc0beca52015-09-03 11:25:46 -07001//
2// Copyright (C) 2012 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
Eric Shienbrood9a245532012-03-07 14:20:39 -050016
Ben Chanc45688b2014-07-02 23:50:45 -070017#ifndef SHILL_CALLBACKS_H_
18#define SHILL_CALLBACKS_H_
Eric Shienbrood9a245532012-03-07 14:20:39 -050019
Christopher Wiley0d9cf0c2013-02-19 19:24:57 -080020#include <string>
Alex Vakulenko8a532292014-06-16 17:18:44 -070021#include <vector>
Christopher Wiley0d9cf0c2013-02-19 19:24:57 -080022
Eric Shienbrood9a245532012-03-07 14:20:39 -050023#include <base/callback.h>
24
Prathmesh Prabhu49ffffd2014-01-09 18:28:55 -080025#include "shill/accessor_interface.h"
Peter Qiu05d87e32015-08-14 23:46:21 -070026#include "shill/key_value_store.h"
Eric Shienbrood9a245532012-03-07 14:20:39 -050027
28namespace shill {
29
30class Error;
31// Convenient typedefs for some commonly used callbacks.
Paul Stewarta794cd62015-06-16 13:13:10 -070032typedef base::Callback<void(const Error&)> ResultCallback;
33typedef base::Callback<void(const Error&, bool)> ResultBoolCallback;
34typedef base::Callback<void(const Error&,
35 const std::string&)> ResultStringCallback;
36typedef base::Callback<void(const Error&)> EnabledStateChangedCallback;
Peter Qiu05d87e32015-08-14 23:46:21 -070037typedef base::Callback<void(const KeyValueStore&,
38 const Error&)> KeyValueStoreCallback;
39typedef base::Callback<void(const std::vector<KeyValueStore>&,
40 const Error&)> KeyValueStoresCallback;
41typedef base::Callback<void(const std::string&,
42 const Error&)> RpcIdentifierCallback;
Paul Stewarta794cd62015-06-16 13:13:10 -070043typedef base::Callback<void(const std::string&, const Error&)> StringCallback;
Peter Qiu05d87e32015-08-14 23:46:21 -070044typedef base::Callback<void(uint32_t, uint32_t, const KeyValueStore&)>
Ben Chan7fab8972014-08-10 17:14:46 -070045 ActivationStateSignalCallback;
Paul Stewarta794cd62015-06-16 13:13:10 -070046typedef base::Callback<void(const Stringmaps&,
47 const Error&)> ResultStringmapsCallback;
Eric Shienbrood9a245532012-03-07 14:20:39 -050048
49} // namespace shill
Ben Chanc45688b2014-07-02 23:50:45 -070050
51#endif // SHILL_CALLBACKS_H_