pldmd: Migrate instance ID allocation to pldm::InstanceIdDb
This removes use of `pldm::dbus_api::Requester` from around the
code-base. This makes progress towards removing the DBus API entirely
once all its consumers are converted to the libpldm instance ID APIs.
There was never a good reason for the code using the class to have
knowledge that it was related to DBus anyway, so this is, in-effect, a
double clean up improving separation of concerns.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I2d9397cae1b3c8c251c32e36ca520aad9c9b8cf6
diff --git a/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index 4e2af4f..aa3b9a9 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -170,11 +170,11 @@
{
public:
Handler(oem_platform::Handler* oemPlatformHandler, int hostSockFd,
- uint8_t hostEid, dbus_api::Requester* dbusImplReqester,
+ uint8_t hostEid, pldm::InstanceIdDb* instanceIdDb,
pldm::requester::Handler<pldm::requester::Request>* handler) :
oemPlatformHandler(oemPlatformHandler),
- hostSockFd(hostSockFd), hostEid(hostEid),
- dbusImplReqester(dbusImplReqester), handler(handler)
+ hostSockFd(hostSockFd), hostEid(hostEid), instanceIdDb(instanceIdDb),
+ handler(handler)
{
handlers.emplace(PLDM_READ_FILE_INTO_MEMORY,
[this](const pldm_msg* request, size_t payloadLength) {
@@ -229,7 +229,7 @@
pldm::utils::DBusHandler::getBus(),
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::argNpath(0, dumpObjPath),
- [this, hostSockFd, hostEid, dbusImplReqester,
+ [this, hostSockFd, hostEid, instanceIdDb,
handler](sdbusplus::message_t& msg) {
std::map<std::string,
std::map<std::string, std::variant<std::string, uint32_t>>>
@@ -258,7 +258,7 @@
.emplace_back(
std::make_unique<
pldm::requester::oem_ibm::DbusToFileHandler>(
- hostSockFd, hostEid, dbusImplReqester, path,
+ hostSockFd, hostEid, instanceIdDb, path,
handler))
->processNewResourceDump(vspstring, password);
break;
@@ -269,7 +269,7 @@
pldm::utils::DBusHandler::getBus(),
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::argNpath(0, certObjPath),
- [this, hostSockFd, hostEid, dbusImplReqester,
+ [this, hostSockFd, hostEid, instanceIdDb,
handler](sdbusplus::message_t& msg) {
std::map<std::string,
std::map<std::string, std::variant<std::string, uint32_t>>>
@@ -295,8 +295,8 @@
.emplace_back(
std::make_unique<pldm::requester::oem_ibm::
DbusToFileHandler>(
- hostSockFd, hostEid, dbusImplReqester,
- path, handler))
+ hostSockFd, hostEid, instanceIdDb, path,
+ handler))
->newCsrFileAvailable(csr, fileHandle);
break;
}
@@ -408,7 +408,7 @@
oem_platform::Handler* oemPlatformHandler;
int hostSockFd;
uint8_t hostEid;
- dbus_api::Requester* dbusImplReqester;
+ pldm::InstanceIdDb* instanceIdDb;
using DBusInterfaceAdded = std::vector<std::pair<
std::string,
std::vector<std::pair<std::string, std::variant<std::string>>>>>;