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