File: sd_bus_message_read_array.3

package info (click to toggle)
manpages-de 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 71,404 kB
  • sloc: sh: 1,059; makefile: 71; python: 64; perl: 37; sed: 11
file content (80 lines) | stat: -rw-r--r-- 2,766 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
'\" t
.TH "SD_BUS_MESSAGE_READ_ARRAY" "3" "" "systemd 241" "sd_bus_message_read_array"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sd_bus_message_read_array \- Access an array of elements in a message
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-bus\&.h>
.fi
.ft
.HP \w'int\ sd_bus_message_read_array('u
.BI "int sd_bus_message_read_array(sd_bus_message\ *" "m" ", char\ " "type" ", const\ void\ **" "ptr" ", size_t\ *" "size" ");"
.SH "DESCRIPTION"
.PP
\fBsd_bus_message_read_array()\fR
gives access to an element array in message
\fIm\fR\&. The "read pointer" in the message must be right before an array of type
\fItype\fR\&. As a special case,
\fItype\fR
may be
\fBNUL\fR, in which case any type is acceptable\&. A pointer to the array data is returned in the parameter
\fIptr\fR
and the size of array data (in bytes) is returned in the parameter
\fIsize\fR\&. If
\fIsize\fR
is 0, a valid non\-null pointer will be returned, but it may not be dereferenced\&. The data is aligned as appropriate for the data type\&. The data is part of the message \(em it may not be modified and is valid only as long as the message is referenced\&. After this function returns, the "read pointer" points at the next element after the array\&.
.SH "RETURN VALUE"
.PP
On success,
\fBsd_bus_message_read_array()\fR
returns 0 or a positive integer\&. On failure, it returns a negative errno\-style error code\&.
.SH "ERRORS"
.PP
Returned errors may indicate the following problems:
.PP
\fB\-EINVAL\fR
.RS 4
Specified type is invalid or the message parameter or one of the output parameters are
\fBNULL\fR\&.
.RE
.PP
\fB\-EOPNOTSUPP\fR
.RS 4
The byte order in the message is different than native byte order\&.
.RE
.PP
\fB\-EPERM\fR
.RS 4
The message is not sealed\&.
.RE
.PP
\fB\-EBADMSG\fR
.RS 4
The message cannot be parsed\&.
.RE
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsd-bus\fR(3),
\fBsd_bus_message_read\fR(3)