varlink: Add new varlink_collect method
authorArthur Shau <arthurshau@meta.com>
Wed, 20 Sep 2023 01:52:39 +0000 (18:52 -0700)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 19 Oct 2023 09:52:09 +0000 (11:52 +0200)
commit1bd0b9c05384bcbf6bf1837b2c7897924f63ce35
treeea8e9a574ad1684a2e1cb77023a19ab072a62039
parent4820c9d41748640ce6a29fc76d6463c822a31662
varlink: Add new varlink_collect method

varlink_collect is meant to be used when the client is willing to wait for the reply from the varlink method, much like varlink_call.
However, unlike varlink_call, it allows the client to collect all "more" replies that may be sent by method before the "final" reply is enqueued.
It aggregates all of these replies into a json variant array that it returns to the client.
src/shared/varlink.c
src/shared/varlink.h
src/test/test-varlink.c