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/host-bmc/host_pdr_handler.hpp b/host-bmc/host_pdr_handler.hpp
index 64f2442..15ce1ac 100644
--- a/host-bmc/host_pdr_handler.hpp
+++ b/host-bmc/host_pdr_handler.hpp
@@ -4,7 +4,7 @@
#include "common/utils.hpp"
#include "libpldmresponder/event_parser.hpp"
#include "libpldmresponder/pdr_utils.hpp"
-#include "pldmd/dbus_impl_requester.hpp"
+#include "pldmd/instance_id.hpp"
#include "requester/handler.hpp"
#include <libpldm/base.h>
@@ -83,7 +83,7 @@
* @param[in] eventsJsonDir - directory path which has the config JSONs
* @param[in] entityTree - Pointer to BMC and Host entity association tree
* @param[in] bmcEntityTree - pointer to BMC's entity association tree
- * @param[in] requester - reference to Requester object
+ * @param[in] instanceIdDb - reference to an InstanceIdDb object
* @param[in] handler - PLDM request handler
*/
explicit HostPDRHandler(
@@ -91,7 +91,7 @@
pldm_pdr* repo, const std::string& eventsJsonsDir,
pldm_entity_association_tree* entityTree,
pldm_entity_association_tree* bmcEntityTree,
- pldm::dbus_api::Requester& requester,
+ pldm::InstanceIdDb& instanceIdDb,
pldm::requester::Handler<pldm::requester::Request>* handler);
/** @brief fetch PDRs from host firmware. See @class.
@@ -230,10 +230,10 @@
/** @brief Pointer to BMC's entity association tree */
pldm_entity_association_tree* bmcEntityTree;
- /** @brief reference to Requester object, primarily used to access API to
- * obtain PLDM instance id.
+ /** @brief reference to Instance ID database object, used to obtain PLDM
+ * instance IDs
*/
- pldm::dbus_api::Requester& requester;
+ pldm::InstanceIdDb& instanceIdDb;
/** @brief PLDM request handler */
pldm::requester::Handler<pldm::requester::Request>* handler;