oem-ibm: Handler support for newFileAvailableWithMetaData
The commits adds handler support for the oem-ibm file I/O
newFileAvailableWithMetaData command.
This also adds a support for NotifyDump method call as part
of DumpHandler for the newFileAvailableWithMetaData command.
Tested: The newFileAvailableWithMetaData command was honored and
the Notify Dump was triggered when the file type was DUMP.
Change-Id: I654c4586341019850b3010e975a9948ed22b50f9
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index 5d70f53..ed2cd6e 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -236,6 +236,13 @@
[this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
return this->fileAckWithMetaData(request, payloadLength);
});
+ handlers.emplace(
+ PLDM_NEW_FILE_AVAILABLE_WITH_META_DATA,
+ [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
+ return this->newFileAvailableWithMetaData(request,
+ payloadLength);
+ });
+
resDumpMatcher = std::make_unique<sdbusplus::bus::match_t>(
pldm::utils::DBusHandler::getBus(),
sdbusplus::bus::match::rules::interfacesAdded() +
@@ -428,6 +435,16 @@
*/
Response fileAckWithMetaData(const pldm_msg* request, size_t payloadLength);
+ /** @brief Handler for newFileAvailableWithMetaData command
+ *
+ * @param[in] request - PLDM request msg
+ * @param[in] payloadLength - length of the message payload
+ *
+ * @return PLDM response messsage
+ */
+ Response newFileAvailableWithMetaData(const pldm_msg* request,
+ size_t payloadLength);
+
private:
oem_platform::Handler* oemPlatformHandler;
using DBusInterfaceAdded = std::vector<std::pair<