1 #pragma once 2 3 #include "common/utils.hpp" 4 #include "libpldmresponder/pdr_utils.hpp" 5 6 #include <cstdint> 7 8 namespace pldm 9 { 10 11 namespace responder 12 { 13 14 namespace pdr 15 { 16 17 /** @brief Build (if not built already) and retrieve PDR by the PDR types 18 * 19 * @param[in] dir - directory housing platform specific PDR JSON files 20 * @param[in] pdrType - the type of PDRs 21 * 22 * @return Repo - Instance of pdr::Repo 23 */ 24 void getRepoByType(const pldm::responder::pdr_utils::Repo& inRepo, 25 pldm::responder::pdr_utils::Repo& outRepo, 26 pldm::responder::pdr_utils::Type pdrType); 27 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 */ 37 const pldm_pdr_record* 38 getRecordByHandle(const pldm::responder::pdr_utils::RepoInterface& pdrRepo, 39 pldm::responder::pdr_utils::RecordHandle recordHandle, 40 pldm::responder::pdr_utils::PdrEntry& pdrEntry); 41 42 } // namespace pdr 43 } // namespace responder 44 } // namespace pldm 45