Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_slot_get_bus.3

raw
1 '\" t
2 .TH "SD_BUS_SLOT_GET_BUS" "3" "" "systemd 261~rc3" "sd_bus_slot_get_bus"
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_slot_get_bus, sd_bus_slot_get_current_handler, sd_bus_slot_get_current_message, sd_bus_slot_get_current_userdata \- Query information attached to a bus slot object
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'typedef\ int\ (*sd_bus_message_handler_t)('u
32 .BI "typedef int (*sd_bus_message_handler_t)(sd_bus_message\ *" "m" ", void\ *" "userdata" ", sd_bus_error\ *" "ret_error" ");"
33 .HP \w'sd_bus\ *sd_bus_slot_get_bus('u
34 .BI "sd_bus *sd_bus_slot_get_bus(sd_bus_slot\ *" "slot" ");"
35 .HP \w'sd_bus_message_handler_t\ sd_bus_slot_get_current_handler('u
36 .BI "sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot\ *" "slot" ");"
37 .HP \w'sd_bus_message\ *sd_bus_slot_get_current_message('u
38 .BI "sd_bus_message *sd_bus_slot_get_current_message(sd_bus_slot\ *" "slot" ");"
39 .HP \w'void\ *sd_bus_slot_get_current_userdata('u
40 .BI "void *sd_bus_slot_get_current_userdata(sd_bus_slot\ *" "slot" ");"
41 .SH "DESCRIPTION"
42 .PP
43 \fBsd_bus_slot_get_bus()\fR
44 returns the bus object that message
45 \fIslot\fR
46 is attached to\&.
47 .PP
48 \fBsd_bus_slot_get_current_handler()\fR,
49 \fBsd_bus_slot_get_current_message()\fR
50 and
51 \fBsd_bus_slot_get_current_userdata()\fR
52 return the current handler, message and userdata respectively of the bus
53 \fIslot\fR
54 is attached to if we\*(Aqre currently executing the callback associated with
55 \fIslot\fR\&.
56 .SH "RETURN VALUE"
57 .PP
58 \fBsd_bus_slot_get_bus()\fR
59 always returns the bus object\&.
60 .PP
61 On success,
62 \fBsd_bus_slot_get_current_handler()\fR,
63 \fBsd_bus_slot_get_current_message()\fR
64 and
65 \fBsd_bus_slot_get_current_userdata()\fR
66 return the requested object\&. On failure, they return
67 \fBNULL\fR\&.
68 .SH "NOTES"
69 .PP
70 Functions described here are available as a shared library, which can be compiled against and linked to with the
71 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
72 file\&.
73 .PP
74 The code described here uses
75 \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
76 \fBsetenv\fR(3)
77 from a parallel thread\&. It is recommended to only do calls to
78 \fBsetenv()\fR
79 from an early phase of the program when no other threads have been started\&.
80 .SH "HISTORY"
81 .PP
82 \fBsd_bus_slot_get_bus()\fR,
83 \fBsd_bus_slot_get_current_handler()\fR,
84 \fBsd_bus_slot_get_current_message()\fR, and
85 \fBsd_bus_slot_get_current_userdata()\fR
86 were added in version 246\&.
87 .SH "SEE ALSO"
88 .PP
89 \fBsystemd\fR(1), \fBsd-bus\fR(3)