implement commands for dump xfer

This commit implements the writeFile command
for dumpHandler in PLDM oem. This is for offloading
the dump from host memory to an external location
via bmc. Also it implements the newfileAvailable
notification handler in libpldmresponder.This caters
to the new dump notification coming from the Host

Change-Id: Ibf7c1facea282ec4f772dfee646cca9f7877bb7d
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index f0555d7..9ff8f86 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -173,6 +173,11 @@
                                                         size_t payloadLength) {
             return this->readFileByType(request, payloadLength);
         });
+        handlers.emplace(PLDM_WRITE_FILE_BY_TYPE,
+                         [this](const pldm_msg* request, size_t payloadLength) {
+                             return this->writeFileByType(request,
+                                                          payloadLength);
+                         });
         handlers.emplace(PLDM_GET_FILE_TABLE,
                          [this](const pldm_msg* request, size_t payloadLength) {
                              return this->getFileTable(request, payloadLength);
@@ -194,6 +199,11 @@
                              return this->getAlertStatus(request,
                                                          payloadLength);
                          });
+        handlers.emplace(PLDM_NEW_FILE_AVAILABLE,
+                         [this](const pldm_msg* request, size_t payloadLength) {
+                             return this->newFileAvailable(request,
+                                                           payloadLength);
+                         });
     }
 
     /** @brief Handler for readFileIntoMemory command
@@ -235,7 +245,7 @@
     Response readFileByTypeIntoMemory(const pldm_msg* request,
                                       size_t payloadLength);
 
-    /** @brief Handler for readFileByType command
+    /** @brief Handler for writeFileByType command
      *
      *  @param[in] request - pointer to PLDM request payload
      *  @param[in] payloadLength - length of the message
@@ -244,6 +254,8 @@
      */
     Response readFileByType(const pldm_msg* request, size_t payloadLength);
 
+    Response writeFileByType(const pldm_msg* request, size_t payloadLength);
+
     /** @brief Handler for GetFileTable command
      *
      *  @param[in] request - pointer to PLDM request payload
@@ -281,6 +293,15 @@
      *  @return PLDM response message
      */
     Response getAlertStatus(const pldm_msg* request, size_t payloadLength);
+
+    /** @brief Handler for newFileAvailable command
+     *
+     *  @param[in] request - PLDM request msg
+     *  @param[in] payloadLength - length of the message payload
+     *
+     *  @return PLDM response message
+     */
+    Response newFileAvailable(const pldm_msg* request, size_t payloadLength);
 };
 
 } // namespace oem_ibm