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 81 82 83 84 85 86 87 88 89 90 91
|
'\" t
.TH "SD_BUS_SET_CONNECTED_SIGNAL" "3" "" "systemd 241" "sd_bus_set_connected_signal"
.\" -----------------------------------------------------------------
.\" * 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_set_connected_signal, sd_bus_get_connected_signal \- Control emmission of local connection establishment signal on bus connections
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-bus\&.h>
.fi
.ft
.HP \w'int\ sd_bus_set_connected_signal('u
.BI "int sd_bus_set_connected_signal(sd_bus\ *" "bus" ", int\ " "b" ");"
.HP \w'int\ sd_bus_get_connected_signal('u
.BI "int sd_bus_get_connected_signal(sd_bus\ *" "bus" ");"
.SH "DESCRIPTION"
.PP
\fBsd_bus_set_connected_signal()\fR
may be used to control whether a local, synthetic
\fBConnected()\fR
signal message shall be generated and enqueued for dispatching when the connection is fully established\&. If the
\fIb\fR
parameter is zero the message is not generated (the default), otherwise it is generated\&.
.PP
\fBsd_bus_get_connected_signal()\fR
may be used to query whether this feature is enabled\&. It returns zero if not, positive otherwise\&.
.PP
The
\fBConnected()\fR
signal message is generated from the
"org\&.freedesktop\&.DBus\&.Local"
service and interface, and
"/org/freedesktop/DBus/Local"
object path\&. Use
\fBsd_bus_match_signal_async\fR(3)
to match on this signal\&.
.PP
This message is particularly useful on slow transports where connections take a long time to be established\&. This is especially the case when
\fBsd_bus_set_watch_bind\fR(3)
is used\&. The signal is generated when the
\fBsd_bus_is_ready\fR(3)
returns positive for the first time\&.
.PP
The
\fBConnected()\fR
signal corresponds with the
\fBDisconnected()\fR
signal that is synthesized locally when the connection is terminated\&. The latter is generated unconditionally however, unlike the former which needs to be enabled explicitly before it is generated, with
\fBsd_bus_set_connected_signal()\fR\&.
.SH "RETURN VALUE"
.PP
On success, these functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
.SH "ERRORS"
.PP
Returned errors may indicate the following problems:
.PP
\fB\-ECHILD\fR
.RS 4
The bus connection has been created in a different process\&.
.RE
.SH "NOTES"
.PP
These APIs are implemented as a shared library, which can be compiled and linked to with the
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
file\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsd-bus\fR(3),
\fBsd_bus_match_signal_async\fR(3),
\fBsd_bus_set_watch_bind\fR(3),
\fBsd_bus_is_ready\fR(3)
|