blob: 43b200fa3f3846bbce915c18134df4e40ace5a05 [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <map>
#include <string>
#include <vector>
#include <base/callback.h>
#include <brillo/any.h>
#include "shill/data_types.h"
#include "shill/key_value_store.h"
namespace shill {
class Error;
// Convenient typedefs for some commonly used callbacks.
using ResultCallback = base::Callback<void(const Error&)>;
using ResultBoolCallback = base::Callback<void(const Error&, bool)>;
using ResultStringCallback =
base::Callback<void(const Error&, const std::string&)>;
using EnabledStateChangedCallback = base::Callback<void(const Error&)>;
using KeyValueStoreCallback =
base::Callback<void(const KeyValueStore&, const Error&)>;
using KeyValueStoresCallback =
base::Callback<void(const std::vector<KeyValueStore>&, const Error&)>;
using RpcIdentifierCallback =
base::Callback<void(const RpcIdentifier&, const Error&)>;
using StringCallback = base::Callback<void(const std::string&, const Error&)>;
using ActivationStateSignalCallback =
base::Callback<void(uint32_t, uint32_t, const KeyValueStore&)>;
using ResultStringmapsCallback =
base::Callback<void(const Stringmaps&, const Error&)>;
using BrilloAnyCallback =
base::Callback<void(const std::map<uint32_t, brillo::Any>&,
const Error&)>;
} // namespace shill