X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fsd_bus_message_append_array.xml;fp=man%2Fsd_bus_message_append_array.xml;h=fe84671f3e6dffc3612b6594d388fb53b83f3910;hp=0000000000000000000000000000000000000000;hb=effbc8e4f70fc70e4a4a8a1dc77228dd187f9c22;hpb=a0e5b17733f2146d727edfdb0ebf8482a8c3bf6c diff --git a/man/sd_bus_message_append_array.xml b/man/sd_bus_message_append_array.xml new file mode 100644 index 000000000..fe84671f3 --- /dev/null +++ b/man/sd_bus_message_append_array.xml @@ -0,0 +1,190 @@ + + + + + + + + + sd_bus_message_append_array + systemd + + + + A monkey with a typewriter + Zbigniew + Jędrzejewski-Szmek + zbyszek@in.waw.pl + + + + + + sd_bus_message_append_array + 3 + + + + sd_bus_message_append_array + sd_bus_message_append_array_memfd + sd_bus_message_append_array_iovec + sd_bus_message_append_array_space + + Attach an array of items to a message + + + + + #include <systemd/sd-bus.h> + + + int sd_bus_message_append_array + sd_bus_message *m + char type + char void *ptr + size_t size + + + + int sd_bus_message_append_array_memfd + sd_bus_message *m + char type + sd_memfd *memfd + + + + int sd_bus_message_append_array_iovec + sd_bus_message *m + char type + const struct iovec *iov + unsigned n + + + + int sd_bus_message_append_array_space + char type + size_t size + char void **ptr + + + + + + Description + + Function sd_bus_message_append_array + appends items to message m as the single + array. A container will be opened, items appended, and the + container closed. Parameter type determines + how pointer p is interpreted. + type must be one of the "trivial" types + y, n, q, + i, u, x, + t, d (but not + b), as defined by the + Basic Types + section of the D-Bus specification, and listed in + sd_bus_message_append_basic3. + Pointer p must point to an array of of size + size bytes containing items of the + respective type. Size size must be a + multiple of the size of the type type. As a + special case, p may be + NULL, if size is 0. + + + The memory pointed at by p is copied + into the memory area containing the message and may be changed + after this call. + + Function + sd_bus_message_append_array_memfd appends + items to message m, similarly to + sd_bus_message_append_array. Contents of the + memory file descriptor memfd are used as + the contents of the array. Their size must be a multiple of the + size of the type type. + + Descriptor memfd will be sealed + and cannot be modified after this call. + + Function + sd_bus_message_append_array_iovec appends + items to message m, similarly to + sd_bus_message_append_array. Contents of the + iovec iov are used as the contents of the + array. The total size of iov payload (the + sum of iov_len fields) must be a multiple + of the size of the type type. + + Pointer iov must point to + n struct iovec + structures. Each structure may have the + iov_base field set, in which case the + memory pointed to will be copied into the message, or unset, in + which case a block of zeros of length + iov_len bytes will be inserted. The + memory pointed at by iov may be changed + after this call. + + Function + sd_bus_message_append_array_space appends + space for an array of items to message m. + It behaves the same as + sd_bus_message_append_array, but instead + of copying items to the message, it returns a pointer to the + destination area to the caller in pointer p. + + + + + Return Value + + On success, those calls return 0 or a positive integer. On + failure, they returns a negative errno-style error code. + + + + + + Notes + + sd_bus_append_array() and other + functions described here are available as a shared library, which + can be compiled and linked to with the + libsystemd pkg-config1 + file. + + + + See Also + + + systemd1, + sd-bus3, + sd_bus_message_append3, + sd_bus_message_append_basic3, + The D-Bus specification + + + +