2 .TH "SD_BUS_MESSAGE_APPEND_BASIC" "3" "" "systemd 215" "sd_bus_message_append_basic"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
17 .\" disable justification (adjust text to left margin only)
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
23 sd_bus_message_append_basic \- Attach a single part to a message
28 #include <systemd/sd\-bus\&.h>
31 .HP \w'int\ sd_bus_message_append_basic('u
32 .BI "int sd_bus_message_append_basic(sd_bus_message\ *" "m" ", char\ " "type" ", char\ void\ *" "p" ");"
35 \fBsd_bus_message_append_basic\fR
36 appends a single item to the message
39 determines how pointer
43 must be one of the basic types as defined by the
44 \m[blue]\fBBasic Types\fR\m[]\&\s-2\u[1]\d\s+2
45 section of the D\-Bus specification, and listed in the table below\&.
48 .nr an-no-space-flag 1
51 .B Table\ \&1.\ \&Item format specifiers
81 \fBSD_BUS_TYPE_BYTE\fR
90 \fBSD_BUS_TYPE_BOOLEAN\fR
99 \fBSD_BUS_TYPE_INT16\fR
108 \fBSD_BUS_TYPE_UINT16\fR
117 \fBSD_BUS_TYPE_INT32\fR
126 \fBSD_BUS_TYPE_UINT32\fR
135 \fBSD_BUS_TYPE_INT64\fR
144 \fBSD_BUS_TYPE_UINT64\fR
153 \fBSD_BUS_TYPE_DOUBLE\fR
162 \fBSD_BUS_TYPE_STRING\fR
171 \fBSD_BUS_TYPE_OBJECT_PATH\fR
180 \fBSD_BUS_TYPE_SIGNATURE\fR
189 \fBSD_BUS_TYPE_UNIX_FD\fR
198 The value of the parameter is copied into the memory area containing the message and may be changed after this call\&. If
202 (UNIX file descriptor), it is always "consumed" by this call, and either successfully appended to the message or closed\&.
209 is interpreted as a pointer to a
210 \fBNUL\fR\-terminated character sequence\&. As a special case, a
212 pointer is interpreted as an empty string\&. The string should be valid Unicode string encoded as UTF\-8\&. In case of the two latter types, the additional requirements for a D\-Bus object path or type signature should be satisfied\&. Those requirements should be verified by the recepient of the message\&.
215 On success, this call returns 0 or a positive integer\&. On failure, it returns a negative errno\-style error code\&.
218 Returned errors may indicate the following problems:
222 Specified parameter is invalid\&.
227 Message has been sealed\&.
232 Message is in invalid state\&.
237 Message cannot be appended to\&.
242 Memory allocation failed\&.
247 \fBsd_bus_append_basic()\fR
248 function described here is available as a shared library, which can be compiled and linked to with the
249 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
255 \fBsd_bus_message_append\fR(3),
256 \m[blue]\fBThe D\-Bus specification\fR\m[]\&\s-2\u[2]\d\s+2
261 \%http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types
264 The D-Bus specification
266 \%http://dbus.freedesktop.org/doc/dbus-specification.html