blob: d3c6152a73d406e062c8ef9c580508b13c7fe9ad [file] [log] [blame]
Matt Spinlere0017eb2018-03-27 11:17:38 -05001#pragma once
2
3#include <map>
4#include <sdbusplus/server.hpp>
5#include <string>
6#include <vector>
7
8namespace ibm
9{
10namespace logging
11{
12
13using DbusInterface = std::string;
14using DbusProperty = std::string;
Matt Spinler259e7272018-03-29 10:57:17 -050015using Value = sdbusplus::message::variant<bool, uint32_t, uint64_t, std::string,
Matt Spinlere0017eb2018-03-27 11:17:38 -050016 std::vector<std::string>>;
17
18using DbusPropertyMap = std::map<DbusProperty, Value>;
19using DbusInterfaceMap = std::map<DbusInterface, DbusPropertyMap>;
20using DbusInterfaceList = std::vector<DbusInterface>;
21
Matt Spinlerbc997492018-03-27 11:24:45 -050022using ObjectValueTree =
23 std::map<sdbusplus::message::object_path, DbusInterfaceMap>;
24
Matt Spinler32219be2018-05-23 11:29:41 -050025/**
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 */
Matt Spinler259e7272018-03-29 10:57:17 -050037ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus,
38 const std::string& service,
39 const std::string& objPath);
Matt Spinlere0017eb2018-03-27 11:17:38 -050040}
41}