Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_message_copy.3

raw
1 '\" t
2 .TH "SD_BUS_MESSAGE_COPY" "3" "" "systemd 261~rc3" "sd_bus_message_copy"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_message_copy \- Copy the contents of one message to another
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_message_copy('u
32 .BI "int sd_bus_message_copy(sd_bus_message\ *" "m" ", sd_bus_message\ *" "source" ", int\ " "all" ");"
33 .SH "DESCRIPTION"
34 .PP
35 \fBsd_bus_message_copy()\fR
36 copies the contents from message
37 \fIsource\fR
38 to
39 \fIm\fR\&. If
40 \fIall\fR
41 is false, a single complete type is copied (basic or container)\&. If
42 \fIall\fR
43 is true, the contents are copied until the end of the currently open container or the end of
44 \fIsource\fR\&.
45 .SH "RETURN VALUE"
46 .PP
47 On success, this call returns true if anything was copied, and false if there was nothing to copy\&. On failure, it returns a negative errno\-style error code\&.
48 .SS "Errors"
49 .PP
50 Returned errors may indicate the following problems:
51 .PP
52 \fB\-EINVAL\fR
53 .RS 4
54 \fIsource\fR
55 or
56 \fIm\fR
57 are
58 \fBNULL\fR\&.
59 .RE
60 .PP
61 \fB\-EPERM\fR
62 .RS 4
63 Message
64 \fIm\fR
65 has been sealed or
66 \fIsource\fR
67 has
68 \fInot\fR
69 been sealed\&.
70 .RE
71 .PP
72 \fB\-ESTALE\fR
73 .RS 4
74 Destination message is in invalid state\&.
75 .RE
76 .PP
77 \fB\-ENXIO\fR
78 .RS 4
79 Destination message cannot be appended to\&.
80 .RE
81 .PP
82 \fB\-ENOMEM\fR
83 .RS 4
84 Memory allocation failed\&.
85 .RE
86 .SH "NOTES"
87 .PP
88 Functions described here are available as a shared library, which can be compiled against and linked to with the
89 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
90 file\&.
91 .PP
92 The code described here uses
93 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
94 \fBsetenv\fR(3)
95 from a parallel thread\&. It is recommended to only do calls to
96 \fBsetenv()\fR
97 from an early phase of the program when no other threads have been started\&.
98 .SH "SEE ALSO"
99 .PP
100 \fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_message_append\fR(3)