1 #pragma once 2 3 #include "libpldmresponder/pdr_utils.hpp" 4 5 #include <stdint.h> 6 7 #include <string> 8 9 #include "libpldm/pdr.h" 10 11 using namespace pldm::responder::pdr_utils; 12 13 namespace pldm 14 { 15 16 namespace responder 17 { 18 19 namespace pdr 20 { 21 22 /** @brief Build (if not built already) and retrieve PDR by the PDR types 23 * 24 * @param[in] dir - directory housing platform specific PDR JSON files 25 * @param[in] pdrType - the type of PDRs 26 * 27 * @return Repo - Instance of pdr::Repo 28 */ 29 void getRepoByType(const Repo& inRepo, Repo& outRepo, Type pdrType); 30 31 /** @brief Get the record of PDR by the record handle 32 * 33 * @param[in] pdrRepo - pdr::RepoInterface 34 * @param[in] recordHandle - The recordHandle value for the PDR to be 35 * retrieved. 36 * @param[out] pdrEntry - PDR entry structure reference 37 * 38 * @return pldm_pdr_record - Instance of pdr::RepoInterface 39 */ 40 const pldm_pdr_record* getRecordByHandle(const RepoInterface& pdrRepo, 41 RecordHandle recordHandle, 42 PdrEntry& pdrEntry); 43 44 } // namespace pdr 45 } // namespace responder 46 } // namespace pldm 47