blob: a2a066fca8a9cc33152211939530b9b80c987872 [file] [log] [blame]
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05001#pragma once
2
George Liue53193f2020-02-24 09:23:26 +08003#include "libpldmresponder/pdr_utils.hpp"
George Liua2870722020-02-11 11:09:30 +08004#include "utils.hpp"
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05005
6#include <stdint.h>
7
George Liue53193f2020-02-24 09:23:26 +08008using namespace pldm::responder::pdr_utils;
9
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -050010namespace pldm
11{
12
13namespace responder
14{
15
16namespace pdr
17{
George Liue53193f2020-02-24 09:23:26 +080018
19/** @brief Build (if not built already) and retrieve PDR by the PDR types
20 *
21 * @param[in] dir - directory housing platform specific PDR JSON files
22 * @param[in] pdrType - the type of PDRs
23 *
24 * @return Repo - Instance of pdr::Repo
25 */
Deepak Kodihallic682fe22020-03-04 00:42:54 -060026void getRepoByType(const Repo& inRepo, Repo& outRepo, Type pdrType);
George Liue53193f2020-02-24 09:23:26 +080027
28/** @brief Get the record of PDR by the record handle
29 *
30 * @param[in] pdrRepo - pdr::RepoInterface
31 * @param[in] recordHandle - The recordHandle value for the PDR to be
32 * retrieved.
33 * @param[out] pdrEntry - PDR entry structure reference
34 *
35 * @return pldm_pdr_record - Instance of pdr::RepoInterface
36 */
Deepak Kodihallic682fe22020-03-04 00:42:54 -060037const pldm_pdr_record* getRecordByHandle(const RepoInterface& pdrRepo,
George Liue53193f2020-02-24 09:23:26 +080038 RecordHandle recordHandle,
39 PdrEntry& pdrEntry);
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -050040
41} // namespace pdr
42} // namespace responder
43} // namespace pldm