blob: d3c6152a73d406e062c8ef9c580508b13c7fe9ad [file] [log] [blame]
#pragma once
#include <map>
#include <sdbusplus/server.hpp>
#include <string>
#include <vector>
namespace ibm
{
namespace logging
{
using DbusInterface = std::string;
using DbusProperty = std::string;
using Value = sdbusplus::message::variant<bool, uint32_t, uint64_t, std::string,
std::vector<std::string>>;
using DbusPropertyMap = std::map<DbusProperty, Value>;
using DbusInterfaceMap = std::map<DbusInterface, DbusPropertyMap>;
using DbusInterfaceList = std::vector<DbusInterface>;
using ObjectValueTree =
std::map<sdbusplus::message::object_path, DbusInterfaceMap>;
/**
* Returns the managed objects for an object path and service
*
* Returns an empty map if there are any failures.
*
* @param[in] bus - the D-Bus object
* @param[in] service - the D-Bus service name
* @param[in] objPath - the D-Bus object path
*
* @return ObjectValueTree - A map of object paths to their
* interfaces and properties.
*/
ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& objPath);
}
}