Peter Qiu | c0beca5 | 2015-09-03 11:25:46 -0700 | [diff] [blame] | 1 | // |
| 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 Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 16 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 17 | #ifndef SHILL_CALLBACKS_H_ |
| 18 | #define SHILL_CALLBACKS_H_ |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 19 | |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 20 | #include <string> |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 21 | #include <vector> |
Christopher Wiley | 0d9cf0c | 2013-02-19 19:24:57 -0800 | [diff] [blame] | 22 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 23 | #include <base/callback.h> |
| 24 | |
Prathmesh Prabhu | 49ffffd | 2014-01-09 18:28:55 -0800 | [diff] [blame] | 25 | #include "shill/accessor_interface.h" |
Peter Qiu | 05d87e3 | 2015-08-14 23:46:21 -0700 | [diff] [blame] | 26 | #include "shill/key_value_store.h" |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 27 | |
| 28 | namespace shill { |
| 29 | |
| 30 | class Error; |
| 31 | // Convenient typedefs for some commonly used callbacks. |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 32 | typedef base::Callback<void(const Error&)> ResultCallback; |
| 33 | typedef base::Callback<void(const Error&, bool)> ResultBoolCallback; |
| 34 | typedef base::Callback<void(const Error&, |
| 35 | const std::string&)> ResultStringCallback; |
| 36 | typedef base::Callback<void(const Error&)> EnabledStateChangedCallback; |
Peter Qiu | 05d87e3 | 2015-08-14 23:46:21 -0700 | [diff] [blame] | 37 | typedef base::Callback<void(const KeyValueStore&, |
| 38 | const Error&)> KeyValueStoreCallback; |
| 39 | typedef base::Callback<void(const std::vector<KeyValueStore>&, |
| 40 | const Error&)> KeyValueStoresCallback; |
| 41 | typedef base::Callback<void(const std::string&, |
| 42 | const Error&)> RpcIdentifierCallback; |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 43 | typedef base::Callback<void(const std::string&, const Error&)> StringCallback; |
Peter Qiu | 05d87e3 | 2015-08-14 23:46:21 -0700 | [diff] [blame] | 44 | typedef base::Callback<void(uint32_t, uint32_t, const KeyValueStore&)> |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame] | 45 | ActivationStateSignalCallback; |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 46 | typedef base::Callback<void(const Stringmaps&, |
| 47 | const Error&)> ResultStringmapsCallback; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 48 | |
| 49 | } // namespace shill |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 50 | |
| 51 | #endif // SHILL_CALLBACKS_H_ |