Deepak Kodihalli | 16e8754 | 2017-02-27 07:07:33 -0600 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <vector> |
| 4 | #include <string> |
| 5 | #include <phosphor-logging/elog-errors.hpp> |
| 6 | #include "elog_entry.hpp" |
| 7 | |
| 8 | namespace phosphor |
| 9 | { |
| 10 | namespace logging |
| 11 | { |
| 12 | namespace metadata |
| 13 | { |
| 14 | |
| 15 | using Metadata = std::string; |
| 16 | |
| 17 | namespace associations |
| 18 | { |
| 19 | |
| 20 | using Type = void(const std::string&, |
| 21 | const std::vector<std::string>&, |
| 22 | AssociationList& list); |
| 23 | |
| 24 | /** @brief Build error associations specific to metadata. Specialize this |
| 25 | * template for handling a specific type of metadata. |
| 26 | * @tparam M - type of metadata |
| 27 | * @param [in] data - metadata to be handled |
| 28 | * @param [in] data - metadata key=value entries |
| 29 | * @param [out] list - list of error association objects |
| 30 | */ |
| 31 | template <typename M> |
| 32 | void build(const std::string& match, |
| 33 | const std::vector<std::string>& data, |
| 34 | AssociationList& list) = delete; |
| 35 | |
| 36 | } // namespace associations |
| 37 | } // namespace metadata |
| 38 | } // namespace logging |
| 39 | } // namespace phosphor |