oem_ibm: Persist the remote PDRs before merging

This commit persists the remote range PDRs in the repo
before they are merged. This change was needed as the
remote terminus would not send down to BMC the entity
Association PDRs of the remote terminus after the BMC
takes a reset after the PDR exchange as the PDRs will be
in BMC range of record handles.

TESTED: Tested by triggering a PDR exchange with the
remote terminus by doing poweron test and also reset the
BMC after the PDR exchange.

Change-Id: Iec2109073f984e5980d9b6e445ce0fa4198d4a0f
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
diff --git a/libpldmresponder/oem_handler.hpp b/libpldmresponder/oem_handler.hpp
index accfc80..c21cf09 100644
--- a/libpldmresponder/oem_handler.hpp
+++ b/libpldmresponder/oem_handler.hpp
@@ -90,6 +90,23 @@
     /** @brief Interface to check the BMC state */
     virtual int checkBMCState() = 0;
 
+    /** @brief Interface to fetch the last BMC record from the PDR repository
+     *
+     *  @param[in] repo - pointer to BMC's primary PDR repo
+     *
+     *  @return the last BMC record from the repo
+     */
+    virtual const pldm_pdr_record* fetchLastBMCRecord(const pldm_pdr* repo) = 0;
+
+    /** @brief Interface to check if the record handle passed is in remote PDR
+     *         record handle range
+     *
+     *  @param[in] record_handle - record handle of the PDR
+     *
+     *  @return true if record handle passed is in host PDR record handle range
+     */
+    virtual bool checkRecordHandleInRange(const uint32_t& record_handle) = 0;
+
     virtual ~Handler() = default;
 
   protected: