xref: /openbmc/ibm-logging/policy_find.hpp (revision 66e07073)
14a6ea6afSMatt Spinler #pragma once
24a6ea6afSMatt Spinler 
34a6ea6afSMatt Spinler #include "dbus.hpp"
44a6ea6afSMatt Spinler #include "policy_table.hpp"
54a6ea6afSMatt Spinler 
64a6ea6afSMatt Spinler namespace ibm
74a6ea6afSMatt Spinler {
84a6ea6afSMatt Spinler namespace logging
94a6ea6afSMatt Spinler {
104a6ea6afSMatt Spinler namespace policy
114a6ea6afSMatt Spinler {
124a6ea6afSMatt Spinler 
134a6ea6afSMatt Spinler constexpr auto EIDField = 0;
144a6ea6afSMatt Spinler constexpr auto MsgField = 1;
154a6ea6afSMatt Spinler using PolicyProps = std::tuple<std::string, std::string>;
164a6ea6afSMatt Spinler 
174a6ea6afSMatt Spinler /**
184a6ea6afSMatt Spinler  * Finds the policy table details based on the properties
194a6ea6afSMatt Spinler  * in the xyz.openbmc_project.Logging.Entry interface.
204a6ea6afSMatt Spinler  *
214a6ea6afSMatt Spinler  * @param[in] policy - the policy table object
224a6ea6afSMatt Spinler  * @param[in] errorLogProperties - the map of the error log
234a6ea6afSMatt Spinler  *            properties for the xyz.openbmc_project.Logging.Entry
244a6ea6afSMatt Spinler  *            interface
254a6ea6afSMatt Spinler  * @return PolicyProps - a tuple of policy details.
264a6ea6afSMatt Spinler  */
27259e7277SMatt Spinler PolicyProps find(const Table& policy,
284a6ea6afSMatt Spinler                  const DbusPropertyMap& errorLogProperties);
29*66e07073SMatt Spinler } // namespace policy
30*66e07073SMatt Spinler } // namespace logging
31*66e07073SMatt Spinler } // namespace ibm
32