@@ -455,7 +455,7 @@ namespace sdbus {
455455 *
456456 * @throws sdbus::Error in case of failure
457457 */
458- virtual PendingAsyncCall callMethodAsync (const MethodCall& message, async_reply_handler asyncReplyCallback) = 0;
458+ virtual PendingAsyncCall callMethodAsync (const MethodCall& message, async_reply_handler&& asyncReplyCallback) = 0;
459459
460460 /* !
461461 * @brief Calls method on the D-Bus object asynchronously
@@ -480,7 +480,7 @@ namespace sdbus {
480480 * @throws sdbus::Error in case of failure
481481 */
482482 [[nodiscard]] virtual Slot callMethodAsync ( const MethodCall& message
483- , async_reply_handler asyncReplyCallback
483+ , async_reply_handler&& asyncReplyCallback
484484 , return_slot_t ) = 0;
485485
486486 /* !
@@ -506,7 +506,7 @@ namespace sdbus {
506506 * @throws sdbus::Error in case of failure
507507 */
508508 virtual PendingAsyncCall callMethodAsync ( const MethodCall& message
509- , async_reply_handler asyncReplyCallback
509+ , async_reply_handler&& asyncReplyCallback
510510 , uint64_t timeout ) = 0;
511511
512512 /* !
@@ -533,7 +533,7 @@ namespace sdbus {
533533 * @throws sdbus::Error in case of failure
534534 */
535535 [[nodiscard]] virtual Slot callMethodAsync ( const MethodCall& message
536- , async_reply_handler asyncReplyCallback
536+ , async_reply_handler&& asyncReplyCallback
537537 , uint64_t timeout
538538 , return_slot_t ) = 0;
539539
@@ -542,15 +542,15 @@ namespace sdbus {
542542 */
543543 template <typename Rep, typename Period>
544544 PendingAsyncCall callMethodAsync ( const MethodCall& message
545- , async_reply_handler asyncReplyCallback
545+ , async_reply_handler&& asyncReplyCallback
546546 , const std::chrono::duration<Rep, Period>& timeout );
547547
548548 /* !
549549 * @copydoc IProxy::callMethod(const MethodCall&,async_reply_handler,uint64_t,return_slot_t)
550550 */
551551 template <typename Rep, typename Period>
552552 [[nodiscard]] Slot callMethodAsync ( const MethodCall& message
553- , async_reply_handler asyncReplyCallback
553+ , async_reply_handler&& asyncReplyCallback
554554 , const std::chrono::duration<Rep, Period>& timeout
555555 , return_slot_t );
556556
@@ -669,7 +669,7 @@ namespace sdbus {
669669 */
670670 virtual void registerSignalHandler ( const InterfaceName& interfaceName
671671 , const SignalName& signalName
672- , signal_handler signalHandler ) = 0;
672+ , signal_handler&& signalHandler ) = 0;
673673
674674 /* !
675675 * @brief Registers a handler for the desired signal emitted by the D-Bus object
@@ -689,7 +689,7 @@ namespace sdbus {
689689 */
690690 [[nodiscard]] virtual Slot registerSignalHandler ( const InterfaceName& interfaceName
691691 , const SignalName& signalName
692- , signal_handler signalHandler
692+ , signal_handler&& signalHandler
693693 , return_slot_t ) = 0;
694694
695695 protected: // Internal API for efficiency reasons used by high-level API helper classes
@@ -700,10 +700,10 @@ namespace sdbus {
700700 [[nodiscard]] virtual MethodCall createMethodCall (const char * interfaceName, const char * methodName) const = 0;
701701 virtual void registerSignalHandler ( const char * interfaceName
702702 , const char * signalName
703- , signal_handler signalHandler ) = 0;
703+ , signal_handler&& signalHandler ) = 0;
704704 [[nodiscard]] virtual Slot registerSignalHandler ( const char * interfaceName
705705 , const char * signalName
706- , signal_handler signalHandler
706+ , signal_handler&& signalHandler
707707 , return_slot_t ) = 0;
708708 };
709709
@@ -759,7 +759,7 @@ namespace sdbus {
759759
760760 template <typename Rep, typename Period>
761761 inline PendingAsyncCall IProxy::callMethodAsync ( const MethodCall& message
762- , async_reply_handler asyncReplyCallback
762+ , async_reply_handler&& asyncReplyCallback
763763 , const std::chrono::duration<Rep, Period>& timeout )
764764 {
765765 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
@@ -768,7 +768,7 @@ namespace sdbus {
768768
769769 template <typename Rep, typename Period>
770770 inline Slot IProxy::callMethodAsync ( const MethodCall& message
771- , async_reply_handler asyncReplyCallback
771+ , async_reply_handler&& asyncReplyCallback
772772 , const std::chrono::duration<Rep, Period>& timeout
773773 , return_slot_t )
774774 {
0 commit comments