xref: /openbmc/ibm-logging/policy_find.hpp (revision 66e07073)
1 #pragma once
2 
3 #include "dbus.hpp"
4 #include "policy_table.hpp"
5 
6 namespace ibm
7 {
8 namespace logging
9 {
10 namespace policy
11 {
12 
13 constexpr auto EIDField = 0;
14 constexpr auto MsgField = 1;
15 using PolicyProps = std::tuple<std::string, std::string>;
16 
17 /**
18  * Finds the policy table details based on the properties
19  * in the xyz.openbmc_project.Logging.Entry interface.
20  *
21  * @param[in] policy - the policy table object
22  * @param[in] errorLogProperties - the map of the error log
23  *            properties for the xyz.openbmc_project.Logging.Entry
24  *            interface
25  * @return PolicyProps - a tuple of policy details.
26  */
27 PolicyProps find(const Table& policy,
28                  const DbusPropertyMap& errorLogProperties);
29 } // namespace policy
30 } // namespace logging
31 } // namespace ibm
32