diff --git a/include/sdbus-c++/IProxy.h b/include/sdbus-c++/IProxy.h index c15f9fb..c317cdf 100644 --- a/include/sdbus-c++/IProxy.h +++ b/include/sdbus-c++/IProxy.h @@ -128,7 +128,7 @@ namespace sdbus { * @copydoc IProxy::callMethod(const MethodCall&,async_reply_handler,uint64_t) */ template - void callMethod(const MethodCall& message, async_reply_handler asyncReplyCallback, const std::chrono::duration<_Rep, _Period>& timeout); + PendingAsyncCall callMethod(const MethodCall& message, async_reply_handler asyncReplyCallback, const std::chrono::duration<_Rep, _Period>& timeout); /*! * @brief Registers a handler for the desired signal emitted by the proxied D-Bus object @@ -318,10 +318,10 @@ namespace sdbus { } template - inline void IProxy::callMethod(const MethodCall& message, async_reply_handler asyncReplyCallback, const std::chrono::duration<_Rep, _Period>& timeout) + inline PendingAsyncCall IProxy::callMethod(const MethodCall& message, async_reply_handler asyncReplyCallback, const std::chrono::duration<_Rep, _Period>& timeout) { auto microsecs = std::chrono::duration_cast(timeout); - callMethod(message, std::move(asyncReplyCallback), microsecs.count()); + return callMethod(message, std::move(asyncReplyCallback), microsecs.count()); } inline MethodInvoker IProxy::callMethod(const std::string& methodName)