pldmd: implement a new handler registration scheme
Implement a PLDM request handler registration scheme that requires
handlers to be C++ objects rather than plain functions. This was needed
for a couple of reasons:
- Perform specific actions at the PLDM daemon startup (that's when the
handlers are loaded).
- Share data across PLDM request messages (for eg FRU/BIOS tables),
without having to resort to globals and statics.
Tested:
- existing unit tests still pass
- added tests for the new registration scheme
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I1cf1c0a6fccd15da54f08120e61a5f256df6bc36
diff --git a/test/libpldmresponder_bios_test.cpp b/test/libpldmresponder_bios_test.cpp
index 7271567..1271dda 100644
--- a/test/libpldmresponder_bios_test.cpp
+++ b/test/libpldmresponder_bios_test.cpp
@@ -177,7 +177,7 @@
table.insert(table.end(), padSize, 0);
table.insert(table.end(), sizeof(uint32_t) /*checksum*/, 0);
- pldm::responder::traverseBIOSAttrTable(
+ pldm::responder::bios::traverseBIOSAttrTable(
table, [&](const struct pldm_bios_attr_table_entry* entry) {
int rc;
switch (entry->attr_type)