Added asynchronous callDbusMethod
This path added two callDbusMethod methods, one without method return
value (default return ec), and the other with method return value.
Change-Id: I16503fe24adc0f3896a861972751d532b6361ef9
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/dbus-sdr/sdrutils.cpp b/dbus-sdr/sdrutils.cpp
index 303a696..9523593 100644
--- a/dbus-sdr/sdrutils.cpp
+++ b/dbus-sdr/sdrutils.cpp
@@ -449,15 +449,15 @@
return ipmiDecoratorPaths;
}
+ using Paths = std::vector<std::string>;
boost::system::error_code ec;
- std::vector<std::string> paths =
- (*ctx)->bus->yield_method_call<std::vector<std::string>>(
- (*ctx)->yield, ec, "xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", "/",
- int32_t(0),
- std::array<const char*, 1>{
- "xyz.openbmc_project.Inventory.Decorator.Ipmi"});
+ Paths paths = ipmi::callDbusMethod<Paths>(
+ *ctx, ec, "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", "/", int32_t(0),
+ std::array<const char*, 1>{
+ "xyz.openbmc_project.Inventory.Decorator.Ipmi"});
+
if (ec)
{
return ipmiDecoratorPaths;