Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 3 | #include "libpldmresponder/pdr_utils.hpp" |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 4 | |
| 5 | #include <stdint.h> |
| 6 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 7 | #include <string> |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 8 | |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 9 | #include "libpldm/pdr.h" |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 10 | |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 11 | using namespace pldm::responder::pdr_utils; |
| 12 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 13 | namespace pldm |
| 14 | { |
| 15 | |
| 16 | namespace responder |
| 17 | { |
| 18 | |
| 19 | namespace pdr |
| 20 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 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 | */ |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 29 | void getRepoByType(const Repo& inRepo, Repo& outRepo, Type pdrType); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 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 | */ |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 40 | const pldm_pdr_record* getRecordByHandle(const RepoInterface& pdrRepo, |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 41 | RecordHandle recordHandle, |
| 42 | PdrEntry& pdrEntry); |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 43 | |
| 44 | } // namespace pdr |
| 45 | } // namespace responder |
| 46 | } // namespace pldm |