oem-ibm: Add util API to get the connector object paths
This commit adds a common API to find all the port object paths
if present under a connected adapter.
Change-Id: I340838570a3c5add02ef92ecac3df9278b0faffb
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/oem/ibm/libpldmresponder/utils.hpp b/oem/ibm/libpldmresponder/utils.hpp
index f2e2153..ac7549f 100644
--- a/oem/ibm/libpldmresponder/utils.hpp
+++ b/oem/ibm/libpldmresponder/utils.hpp
@@ -2,6 +2,7 @@
#include <cstdint>
#include <string>
+#include <vector>
namespace pldm
{
@@ -44,6 +45,14 @@
*/
bool checkIfIBMFru(const std::string& objPath);
+/** @brief finds the ports under an adapter
+ *
+ * @param[in] adapterObjPath - D-Bus object path for the adapter
+ *
+ * @return std::vector<std::string> - port object paths
+ */
+std::vector<std::string> findPortObjects(const std::string& adapterObjPath);
+
} // namespace utils
} // namespace responder
} // namespace pldm