blob: 4ce9935e8acc8d8649b8cb5215eb5a4cf8654e64 [file] [log] [blame]
Matt Spinler4a6ea6a2018-03-27 14:25:12 -05001#pragma once
2
3#include "dbus.hpp"
4#include "policy_table.hpp"
5
Andrew Geissler29c2ec62020-05-16 13:48:44 -05006#include <string>
7
Matt Spinler4a6ea6a2018-03-27 14:25:12 -05008namespace ibm
9{
10namespace logging
11{
12namespace policy
13{
14
15constexpr auto EIDField = 0;
16constexpr auto MsgField = 1;
17using 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 */
Matt Spinler259e7272018-03-29 10:57:17 -050029PolicyProps find(const Table& policy,
30 const DbusPropertyMap& errorLogProperties);
Matt Spinler66e07072018-09-12 10:36:14 -050031} // namespace policy
32} // namespace logging
33} // namespace ibm