refactor: let callbacks take message objects by value (#367)

Signatures of callbacks async_reply_handler, signal_handler, message_handler and property_set_callback were modified to take input message objects by value, as opposed to non-const ref.

The callee assumes ownership of the message. This API is more idiomatic, more expressive, cleaner and safer. Move semantics is used to pass messages to the callback handlers. In some cases, this also improves performance.
This commit is contained in:
Stanislav Angelovič committed 2024-04-24 20:20:29 +02:00
1 parent 9412940d1e
commit 6f35f00fcf
10 files changed
+37 -35

No files matched your search

+1 -1
View File
@@ -119,7 +119,7 @@ namespace sdbus::internal {
public:
struct CallData
{
enum class State
enum class State // TODO: In release/v2.0, we no more have sync-in-terms-of-async, we can simplify code with just bool finished like before
{ NOT_ASYNC
, RUNNING
, FINISHED