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