1 #pragma once 2 3 #include <map> 4 #include <sdbusplus/server.hpp> 5 #include <string> 6 #include <vector> 7 8 namespace ibm 9 { 10 namespace logging 11 { 12 13 using DbusInterface = std::string; 14 using DbusProperty = std::string; 15 using Value = sdbusplus::message::variant<bool, uint32_t, uint64_t, std::string, 16 std::vector<std::string>>; 17 18 using DbusPropertyMap = std::map<DbusProperty, Value>; 19 using DbusInterfaceMap = std::map<DbusInterface, DbusPropertyMap>; 20 using DbusInterfaceList = std::vector<DbusInterface>; 21 22 using ObjectValueTree = 23 std::map<sdbusplus::message::object_path, DbusInterfaceMap>; 24 25 /** 26 * Returns the managed objects for an object path and service 27 * 28 * Returns an empty map if there are any failures. 29 * 30 * @param[in] bus - the D-Bus object 31 * @param[in] service - the D-Bus service name 32 * @param[in] objPath - the D-Bus object path 33 * 34 * @return ObjectValueTree - A map of object paths to their 35 * interfaces and properties. 36 */ 37 ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus, 38 const std::string& service, 39 const std::string& objPath); 40 } 41 } 42