varlink.github.io
varlink.github.io copied to clipboard
RFE: IDL should probably indicate whether method call can receive multiple replies
I think the IDL should have a way how we can mark method declarations in a way that indicates that it generates multiple replies (i.e. sets the "more" flag). This is a fundamental property of a method calls, and usually very specific ones, hence I think this really deserves some kind of visibility in the interface files.
My proposal: maybe a method call that receives multiple replies could be suffixed with a "+" to indicate this fact, i.e.:
method Foobar(x: bool) -> (y: int)+
would indicate a function that returns a series of integers, one in each reply.
This would imply that method replies are "similar", i.e. that the return type declaration sensibly describes all replies the same. Which I think makes sense to expect.
or hmm, varlink idl so far preferred prefix notation for arrays and such, i.e. it's []int
, and hence maybe we should also do the "+" as prefix?
method Foobar(x: bool) -> +(y:int)
or so?
anyway, ideas?
hmm, and whether an upgrade is possible should probably be shown in a similar way. maybe:
method Foobar(x: bool) -> &(y:int)
or is all that too cryptic? ideas?