1 #pragma once 2 3 #include <functional> 4 #include <map> 5 #include <sdbusplus/message.hpp> 6 #include <string> 7 8 namespace phosphor 9 { 10 namespace inventory 11 { 12 namespace manager 13 { 14 15 class Manager; 16 17 /** @brief Inventory manager supported property types. */ 18 using InterfaceVariantType = 19 sdbusplus::message::variant<bool, int64_t, std::string>; 20 21 template <typename T> 22 using InterfaceType = std::map<std::string, T>; 23 24 template <typename T> 25 using ObjectType = std::map<std::string, InterfaceType<T>>; 26 27 using Interface = InterfaceType<InterfaceVariantType>; 28 using Object = ObjectType<InterfaceVariantType>; 29 30 using Action = std::function<void(sdbusplus::bus::bus&, Manager&)>; 31 using Filter = std::function<bool(sdbusplus::bus::bus&, 32 sdbusplus::message::message&, Manager&)>; 33 using PathCondition = 34 std::function<bool(const std::string&, sdbusplus::bus::bus&, Manager&)>; 35 template <typename T> 36 using GetProperty = std::function<T(Manager&)>; 37 } // namespace manager 38 } // namespace inventory 39 } // namespace phosphor 40 41 // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 42