diff options
author | George Liu <liuxiwei@inspur.com> | 2022-12-07 11:03:22 +0300 |
---|---|---|
committer | George Liu <liuxiwei@inspur.com> | 2023-01-11 04:10:26 +0300 |
commit | 7a1dbc4803bf78bfc0c574e6676b3c5def4cdae3 (patch) | |
tree | 9d4713a0125046d112ce3eae7053364ddb2c1d26 /include/dbus_utility.hpp | |
parent | 1f2a40ce3223e024d510f2e3b32fbc7e08012728 (diff) | |
download | bmcweb-7a1dbc4803bf78bfc0c574e6676b3c5def4cdae3.tar.xz |
Refactor GetSubTreePaths method
Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and use the method in dbus_utility
uniformly.
Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to
build.
Tested: Redfish Validator Passed
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie4140d4484a7e4f4b943013f4371ffd2d44a22e9
Diffstat (limited to 'include/dbus_utility.hpp')
-rw-r--r-- | include/dbus_utility.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp index 393ffe3a52..c7fda6d33b 100644 --- a/include/dbus_utility.hpp +++ b/include/dbus_utility.hpp @@ -29,6 +29,7 @@ #include <span> #include <sstream> #include <string> +#include <string_view> #include <tuple> #include <utility> #include <variant> @@ -157,7 +158,8 @@ inline void } inline void getSubTreePaths( - const std::string& path, std::span<std::string> interfaces, + const std::string& path, int32_t depth, + std::span<const std::string_view> interfaces, std::function<void(const boost::system::error_code&, const MapperGetSubTreePathsResponse&)>&& callback) { @@ -169,7 +171,7 @@ inline void getSubTreePaths( }, "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", - "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", path, 0, + "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", path, depth, interfaces); } |