[systemd-devel] sd-bus: get size of array container in D-Bus message

Stanislav Angelovič stanislav.angelovic at protonmail.com
Wed Aug 2 06:39:47 UTC 2023


Hi folks,

I have a quick question: is there a way to get container size when deserializing an array from a D-Bus message (be it an array of trivial or non-trivial D-Bus types)? Say I enter a container with sd_bus_message_enter_container​, and then, before reading individual elements, I'd like to get the number of elements in that array in that message (so I can reserve storage on my side, etc.).

If not, could such an API function be added?

Thanks in advance.

Stanislav.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230802/e2f8486b/attachment.htm>


More information about the systemd-devel mailing list