blob: 5b65d5aa2b91c04f5ae5a01f5c063c991ce62dad [file] [log] [blame]
#pragma once
#include <map>
#include <string>
#include <sdbusplus/message.hpp>
#include <experimental/any>
#include <functional>
namespace phosphor
{
namespace inventory
{
namespace manager
{
class Manager;
namespace any_ns = std::experimental;
/** @brief Inventory manager supported property types. */
using InterfaceVariantType =
sdbusplus::message::variant<bool, int64_t, std::string>;
template <typename T> using InterfaceType = std::map<std::string, T>;
template <typename T>
using ObjectType = std::map<std::string, InterfaceType<T>>;
using Interface = InterfaceType<InterfaceVariantType>;
using Object = ObjectType<InterfaceVariantType>;
using Action = std::function<void(sdbusplus::bus::bus&, Manager&)>;
using Filter = std::function<bool(sdbusplus::bus::bus&,
sdbusplus::message::message&, Manager&)>;
using PathCondition =
std::function<bool(const std::string&, sdbusplus::bus::bus&, Manager&)>;
} // namespace manager
} // namespace inventory
} // namespace phosphor
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4