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/fw-update/inventory_manager.cpp b/fw-update/inventory_manager.cpp
index ea80e69..f5a797b 100644
--- a/fw-update/inventory_manager.cpp
+++ b/fw-update/inventory_manager.cpp
@@ -19,7 +19,7 @@
 {
     for (const auto& eid : eids)
     {
-        auto instanceId = requester.getInstanceId(eid);
+        auto instanceId = instanceIdDb.next(eid);
         Request requestMsg(sizeof(pldm_msg_hdr) +
                            PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES);
         auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
@@ -27,7 +27,7 @@
             instanceId, PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES, request);
         if (rc)
         {
-            requester.markFree(eid, instanceId);
+            instanceIdDb.free(eid, instanceId);
             error(
                 "encode_query_device_identifiers_req failed, EID={EID}, RC = {RC}",
                 "EID", unsigned(eid), "RC", rc);
@@ -150,7 +150,7 @@
 
 void InventoryManager::sendGetFirmwareParametersRequest(mctp_eid_t eid)
 {
-    auto instanceId = requester.getInstanceId(eid);
+    auto instanceId = instanceIdDb.next(eid);
     Request requestMsg(sizeof(pldm_msg_hdr) +
                        PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES);
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
@@ -158,7 +158,7 @@
         instanceId, PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES, request);
     if (rc)
     {
-        requester.markFree(eid, instanceId);
+        instanceIdDb.free(eid, instanceId);
         error("encode_get_firmware_parameters_req failed, EID={EID}, RC = {RC}",
               "EID", unsigned(eid), "RC", rc);
         return;