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