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