Add getSubtreePaths utility functions

Added a getSubTreePaths utility function that can return the
subtree dbus paths that implement the particular dbus interface.

Change-Id: Ifb8f6d571bcb2291ca3a47f285ebf46261646496
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/common/utils.hpp b/common/utils.hpp
index 10038b4..28f11d6 100644
--- a/common/utils.hpp
+++ b/common/utils.hpp
@@ -198,6 +198,7 @@
 using Interfaces = std::vector<std::string>;
 using MapperServiceMap = std::vector<std::pair<ServiceName, Interfaces>>;
 using GetSubTreeResponse = std::vector<std::pair<ObjectPath, MapperServiceMap>>;
+using GetSubTreePathsResponse = std::vector<std::string>;
 using PropertyMap = std::map<std::string, PropertyValue>;
 using InterfaceMap = std::map<std::string, PropertyMap>;
 using ObjectValueTree = std::map<sdbusplus::message::object_path, InterfaceMap>;
@@ -216,6 +217,10 @@
         getSubtree(const std::string& path, int depth,
                    const std::vector<std::string>& ifaceList) const = 0;
 
+    virtual GetSubTreePathsResponse
+        getSubTreePaths(const std::string& objectPath, int depth,
+                        const std::vector<std::string>& ifaceList) const = 0;
+
     virtual void setDbusProperty(const DBusMapping& dBusMap,
                                  const PropertyValue& value) const = 0;
 
@@ -276,6 +281,19 @@
         getSubtree(const std::string& path, int depth,
                    const std::vector<std::string>& ifaceList) const override;
 
+    /** @brief Get Subtree path response from the mapper
+     *
+     *  @param[in] path - DBUS object path
+     *  @param[in] depth - Search depth
+     *  @param[in] ifaceList - list of the interface that are being
+     *                         queried from the mapper
+     *
+     *  @return std::vector<std::string> vector of subtree paths
+     */
+    GetSubTreePathsResponse getSubTreePaths(
+        const std::string& objectPath, int depth,
+        const std::vector<std::string>& ifaceList) const override;
+
     /** @brief Get property(type: variant) from the requested dbus
      *
      *  @param[in] objPath - The Dbus object path