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