| 1 |
'\" t |
| 2 |
.TH "SD\-BUS" "3" "" "systemd 261~rc3" "sd-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 \- A lightweight D\-Bus IPC client library |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.sp |
| 26 |
.ft B |
| 27 |
.nf |
| 28 |
#include <systemd/sd\-bus\&.h> |
| 29 |
.fi |
| 30 |
.ft |
| 31 |
.HP \w'\fBpkg\-config\ \-\-cflags\ \-\-libs\ libsystemd\fR\ 'u |
| 32 |
\fBpkg\-config \-\-cflags \-\-libs libsystemd\fR |
| 33 |
.SH "DESCRIPTION" |
| 34 |
.PP |
| 35 |
sd\-bus\&.h |
| 36 |
is part of |
| 37 |
\fBlibsystemd\fR(3) |
| 38 |
and provides an implementation of a D\-Bus IPC client\&. See |
| 39 |
\m[blue]\fB\%https://www.freedesktop.org/software/dbus/\fR\m[] |
| 40 |
for more information about D\-Bus IPC\&. |
| 41 |
.PP |
| 42 |
See |
| 43 |
.RS 4 |
| 44 |
\fBsd_bus_add_match\fR(3), |
| 45 |
.RE |
| 46 |
.RS 4 |
| 47 |
\fBsd_bus_add_object\fR(3), |
| 48 |
.RE |
| 49 |
.RS 4 |
| 50 |
\fBsd_bus_add_object_manager\fR(3), |
| 51 |
.RE |
| 52 |
.RS 4 |
| 53 |
\fBsd_bus_add_object_vtable\fR(3), |
| 54 |
.RE |
| 55 |
.RS 4 |
| 56 |
\fBsd_bus_add_fallback\fR(3), |
| 57 |
.RE |
| 58 |
.RS 4 |
| 59 |
\fBsd_bus_add_fallback_vtable\fR(3), |
| 60 |
.RE |
| 61 |
.RS 4 |
| 62 |
\fBsd_bus_add_filter\fR(3), |
| 63 |
.RE |
| 64 |
.RS 4 |
| 65 |
\fBsd_bus_add_node_enumerator\fR(3), |
| 66 |
.RE |
| 67 |
.RS 4 |
| 68 |
\fBsd_bus_attach_event\fR(3), |
| 69 |
.RE |
| 70 |
.RS 4 |
| 71 |
\fBsd_bus_call\fR(3), |
| 72 |
.RE |
| 73 |
.RS 4 |
| 74 |
\fBsd_bus_call_async\fR(3), |
| 75 |
.RE |
| 76 |
.RS 4 |
| 77 |
\fBsd_bus_call_method\fR(3), |
| 78 |
.RE |
| 79 |
.RS 4 |
| 80 |
\fBsd_bus_call_method_async\fR(3), |
| 81 |
.RE |
| 82 |
.RS 4 |
| 83 |
\fBsd_bus_can_send\fR(3), |
| 84 |
.RE |
| 85 |
.RS 4 |
| 86 |
\fBsd_bus_close\fR(3), |
| 87 |
.RE |
| 88 |
.RS 4 |
| 89 |
\fBsd_bus_creds_get_pid\fR(3), |
| 90 |
.RE |
| 91 |
.RS 4 |
| 92 |
\fBsd_bus_creds_new_from_pid\fR(3), |
| 93 |
.RE |
| 94 |
.RS 4 |
| 95 |
\fBsd_bus_default\fR(3), |
| 96 |
.RE |
| 97 |
.RS 4 |
| 98 |
\fBsd_bus_emit_interfaces_added\fR(3), |
| 99 |
.RE |
| 100 |
.RS 4 |
| 101 |
\fBsd_bus_emit_interfaces_added_strv\fR(3), |
| 102 |
.RE |
| 103 |
.RS 4 |
| 104 |
\fBsd_bus_emit_interfaces_removed\fR(3), |
| 105 |
.RE |
| 106 |
.RS 4 |
| 107 |
\fBsd_bus_emit_interfaces_removed_strv\fR(3), |
| 108 |
.RE |
| 109 |
.RS 4 |
| 110 |
\fBsd_bus_emit_object_added\fR(3), |
| 111 |
.RE |
| 112 |
.RS 4 |
| 113 |
\fBsd_bus_emit_object_removed\fR(3), |
| 114 |
.RE |
| 115 |
.RS 4 |
| 116 |
\fBsd_bus_emit_properties_changed\fR(3), |
| 117 |
.RE |
| 118 |
.RS 4 |
| 119 |
\fBsd_bus_emit_properties_changed_strv\fR(3), |
| 120 |
.RE |
| 121 |
.RS 4 |
| 122 |
\fBsd_bus_emit_signal\fR(3), |
| 123 |
.RE |
| 124 |
.RS 4 |
| 125 |
\fBsd_bus_emit_signalv\fR(3), |
| 126 |
.RE |
| 127 |
.RS 4 |
| 128 |
\fBsd_bus_emit_signal_to\fR(3), |
| 129 |
.RE |
| 130 |
.RS 4 |
| 131 |
\fBsd_bus_emit_signal_tov\fR(3), |
| 132 |
.RE |
| 133 |
.RS 4 |
| 134 |
\fBsd_bus_enqueue_for_read\fR(3), |
| 135 |
.RE |
| 136 |
.RS 4 |
| 137 |
\fBsd-bus-errors\fR(3), |
| 138 |
.RE |
| 139 |
.RS 4 |
| 140 |
\fBsd_bus_error\fR(3), |
| 141 |
.RE |
| 142 |
.RS 4 |
| 143 |
\fBsd_bus_error_add_map\fR(3), |
| 144 |
.RE |
| 145 |
.RS 4 |
| 146 |
\fBsd_bus_get_address\fR(3), |
| 147 |
.RE |
| 148 |
.RS 4 |
| 149 |
\fBsd_bus_get_allow_interactive_authorization\fR(3), |
| 150 |
.RE |
| 151 |
.RS 4 |
| 152 |
\fBsd_bus_get_bus_id\fR(3), |
| 153 |
.RE |
| 154 |
.RS 4 |
| 155 |
\fBsd_bus_get_creds_mask\fR(3), |
| 156 |
.RE |
| 157 |
.RS 4 |
| 158 |
\fBsd_bus_get_current_handler\fR(3), |
| 159 |
.RE |
| 160 |
.RS 4 |
| 161 |
\fBsd_bus_get_current_message\fR(3), |
| 162 |
.RE |
| 163 |
.RS 4 |
| 164 |
\fBsd_bus_get_current_slot\fR(3), |
| 165 |
.RE |
| 166 |
.RS 4 |
| 167 |
\fBsd_bus_get_current_userdata\fR(3), |
| 168 |
.RE |
| 169 |
.RS 4 |
| 170 |
\fBsd_bus_get_exit_on_disconnect\fR(3), |
| 171 |
.RE |
| 172 |
.RS 4 |
| 173 |
\fBsd_bus_get_fd\fR(3), |
| 174 |
.RE |
| 175 |
.RS 4 |
| 176 |
\fBsd_bus_get_method_call_timeout\fR(3), |
| 177 |
.RE |
| 178 |
.RS 4 |
| 179 |
\fBsd_bus_get_n_queued_read\fR(3), |
| 180 |
.RE |
| 181 |
.RS 4 |
| 182 |
\fBsd_bus_get_name_creds\fR(3), |
| 183 |
.RE |
| 184 |
.RS 4 |
| 185 |
\fBsd_bus_get_name_machine_id\fR(3), |
| 186 |
.RE |
| 187 |
.RS 4 |
| 188 |
\fBsd_bus_get_owner_creds\fR(3), |
| 189 |
.RE |
| 190 |
.RS 4 |
| 191 |
\fBsd_bus_get_property\fR(3), |
| 192 |
.RE |
| 193 |
.RS 4 |
| 194 |
\fBsd_bus_get_property_string\fR(3), |
| 195 |
.RE |
| 196 |
.RS 4 |
| 197 |
\fBsd_bus_get_property_strv\fR(3), |
| 198 |
.RE |
| 199 |
.RS 4 |
| 200 |
\fBsd_bus_get_property_trivial\fR(3), |
| 201 |
.RE |
| 202 |
.RS 4 |
| 203 |
\fBsd_bus_get_scope\fR(3), |
| 204 |
.RE |
| 205 |
.RS 4 |
| 206 |
\fBsd_bus_get_tid\fR(3), |
| 207 |
.RE |
| 208 |
.RS 4 |
| 209 |
\fBsd_bus_get_unique_name\fR(3), |
| 210 |
.RE |
| 211 |
.RS 4 |
| 212 |
\fBsd_bus_interface_name_is_valid\fR(3), |
| 213 |
.RE |
| 214 |
.RS 4 |
| 215 |
\fBsd_bus_is_bus_client\fR(3), |
| 216 |
.RE |
| 217 |
.RS 4 |
| 218 |
\fBsd_bus_is_monitor\fR(3), |
| 219 |
.RE |
| 220 |
.RS 4 |
| 221 |
\fBsd_bus_is_open\fR(3), |
| 222 |
.RE |
| 223 |
.RS 4 |
| 224 |
\fBsd_bus_is_server\fR(3), |
| 225 |
.RE |
| 226 |
.RS 4 |
| 227 |
\fBsd_bus_list_names\fR(3), |
| 228 |
.RE |
| 229 |
.RS 4 |
| 230 |
\fBsd_bus_message_append\fR(3), |
| 231 |
.RE |
| 232 |
.RS 4 |
| 233 |
\fBsd_bus_message_append_array\fR(3), |
| 234 |
.RE |
| 235 |
.RS 4 |
| 236 |
\fBsd_bus_message_append_basic\fR(3), |
| 237 |
.RE |
| 238 |
.RS 4 |
| 239 |
\fBsd_bus_message_append_string_memfd\fR(3), |
| 240 |
.RE |
| 241 |
.RS 4 |
| 242 |
\fBsd_bus_message_append_strv\fR(3), |
| 243 |
.RE |
| 244 |
.RS 4 |
| 245 |
\fBsd_bus_message_at_end\fR(3), |
| 246 |
.RE |
| 247 |
.RS 4 |
| 248 |
\fBsd_bus_message_close_container\fR(3), |
| 249 |
.RE |
| 250 |
.RS 4 |
| 251 |
\fBsd_bus_message_copy\fR(3), |
| 252 |
.RE |
| 253 |
.RS 4 |
| 254 |
\fBsd_bus_message_dump\fR(3), |
| 255 |
.RE |
| 256 |
.RS 4 |
| 257 |
\fBsd_bus_message_enter_container\fR(3), |
| 258 |
.RE |
| 259 |
.RS 4 |
| 260 |
\fBsd_bus_message_exit_container\fR(3), |
| 261 |
.RE |
| 262 |
.RS 4 |
| 263 |
\fBsd_bus_message_get_allow_interactive_authorization\fR(3), |
| 264 |
.RE |
| 265 |
.RS 4 |
| 266 |
\fBsd_bus_message_get_cookie\fR(3), |
| 267 |
.RE |
| 268 |
.RS 4 |
| 269 |
\fBsd_bus_message_get_creds\fR(3), |
| 270 |
.RE |
| 271 |
.RS 4 |
| 272 |
\fBsd_bus_message_get_errno\fR(3), |
| 273 |
.RE |
| 274 |
.RS 4 |
| 275 |
\fBsd_bus_message_get_error\fR(3), |
| 276 |
.RE |
| 277 |
.RS 4 |
| 278 |
\fBsd_bus_message_get_monotonic_usec\fR(3), |
| 279 |
.RE |
| 280 |
.RS 4 |
| 281 |
\fBsd_bus_message_get_sender\fR(3), |
| 282 |
.RE |
| 283 |
.RS 4 |
| 284 |
\fBsd_bus_message_get_signature\fR(3), |
| 285 |
.RE |
| 286 |
.RS 4 |
| 287 |
\fBsd_bus_message_get_type\fR(3), |
| 288 |
.RE |
| 289 |
.RS 4 |
| 290 |
\fBsd_bus_message_new\fR(3), |
| 291 |
.RE |
| 292 |
.RS 4 |
| 293 |
\fBsd_bus_message_new_method_call\fR(3), |
| 294 |
.RE |
| 295 |
.RS 4 |
| 296 |
\fBsd_bus_message_new_method_error\fR(3), |
| 297 |
.RE |
| 298 |
.RS 4 |
| 299 |
\fBsd_bus_message_new_signal\fR(3), |
| 300 |
.RE |
| 301 |
.RS 4 |
| 302 |
\fBsd_bus_message_new_signal_to\fR(3), |
| 303 |
.RE |
| 304 |
.RS 4 |
| 305 |
\fBsd_bus_message_open_container\fR(3), |
| 306 |
.RE |
| 307 |
.RS 4 |
| 308 |
\fBsd_bus_message_peek_type\fR(3), |
| 309 |
.RE |
| 310 |
.RS 4 |
| 311 |
\fBsd_bus_message_read\fR(3), |
| 312 |
.RE |
| 313 |
.RS 4 |
| 314 |
\fBsd_bus_message_read_array\fR(3), |
| 315 |
.RE |
| 316 |
.RS 4 |
| 317 |
\fBsd_bus_message_read_basic\fR(3), |
| 318 |
.RE |
| 319 |
.RS 4 |
| 320 |
\fBsd_bus_message_read_strv\fR(3), |
| 321 |
.RE |
| 322 |
.RS 4 |
| 323 |
\fBsd_bus_message_rewind\fR(3), |
| 324 |
.RE |
| 325 |
.RS 4 |
| 326 |
\fBsd_bus_message_seal\fR(3), |
| 327 |
.RE |
| 328 |
.RS 4 |
| 329 |
\fBsd_bus_message_send\fR(3), |
| 330 |
.RE |
| 331 |
.RS 4 |
| 332 |
\fBsd_bus_message_sensitive\fR(3), |
| 333 |
.RE |
| 334 |
.RS 4 |
| 335 |
\fBsd_bus_message_set_allow_interactive_authorization\fR(3), |
| 336 |
.RE |
| 337 |
.RS 4 |
| 338 |
\fBsd_bus_message_set_destination\fR(3), |
| 339 |
.RE |
| 340 |
.RS 4 |
| 341 |
\fBsd_bus_message_set_expect_reply\fR(3), |
| 342 |
.RE |
| 343 |
.RS 4 |
| 344 |
\fBsd_bus_message_set_sender\fR(3), |
| 345 |
.RE |
| 346 |
.RS 4 |
| 347 |
\fBsd_bus_message_skip\fR(3), |
| 348 |
.RE |
| 349 |
.RS 4 |
| 350 |
\fBsd_bus_message_verify_type\fR(3), |
| 351 |
.RE |
| 352 |
.RS 4 |
| 353 |
\fBsd_bus_negotiate_fds\fR(3), |
| 354 |
.RE |
| 355 |
.RS 4 |
| 356 |
\fBsd_bus_new\fR(3), |
| 357 |
.RE |
| 358 |
.RS 4 |
| 359 |
\fBsd_bus_path_encode\fR(3), |
| 360 |
.RE |
| 361 |
.RS 4 |
| 362 |
\fBsd_bus_pending_method_calls\fR(3), |
| 363 |
.RE |
| 364 |
.RS 4 |
| 365 |
\fBsd_bus_process\fR(3), |
| 366 |
.RE |
| 367 |
.RS 4 |
| 368 |
\fBsd_bus_query_sender_creds\fR(3), |
| 369 |
.RE |
| 370 |
.RS 4 |
| 371 |
\fBsd_bus_query_sender_privilege\fR(3), |
| 372 |
.RE |
| 373 |
.RS 4 |
| 374 |
\fBsd_bus_reply_method_error\fR(3), |
| 375 |
.RE |
| 376 |
.RS 4 |
| 377 |
\fBsd_bus_reply_method_return\fR(3), |
| 378 |
.RE |
| 379 |
.RS 4 |
| 380 |
\fBsd_bus_request_name\fR(3), |
| 381 |
.RE |
| 382 |
.RS 4 |
| 383 |
\fBsd_bus_send\fR(3), |
| 384 |
.RE |
| 385 |
.RS 4 |
| 386 |
\fBsd_bus_send_to\fR(3), |
| 387 |
.RE |
| 388 |
.RS 4 |
| 389 |
\fBsd_bus_set_address\fR(3), |
| 390 |
.RE |
| 391 |
.RS 4 |
| 392 |
\fBsd_bus_set_allow_interactive_authorization\fR(3), |
| 393 |
.RE |
| 394 |
.RS 4 |
| 395 |
\fBsd_bus_set_bus_client\fR(3), |
| 396 |
.RE |
| 397 |
.RS 4 |
| 398 |
\fBsd_bus_set_close_on_exit\fR(3), |
| 399 |
.RE |
| 400 |
.RS 4 |
| 401 |
\fBsd_bus_set_connected_signal\fR(3), |
| 402 |
.RE |
| 403 |
.RS 4 |
| 404 |
\fBsd_bus_set_description\fR(3), |
| 405 |
.RE |
| 406 |
.RS 4 |
| 407 |
\fBsd_bus_set_exit_on_disconnect\fR(3), |
| 408 |
.RE |
| 409 |
.RS 4 |
| 410 |
\fBsd_bus_set_fd\fR(3), |
| 411 |
.RE |
| 412 |
.RS 4 |
| 413 |
\fBsd_bus_set_method_call_timeout\fR(3), |
| 414 |
.RE |
| 415 |
.RS 4 |
| 416 |
\fBsd_bus_set_monitor\fR(3), |
| 417 |
.RE |
| 418 |
.RS 4 |
| 419 |
\fBsd_bus_set_property\fR(3), |
| 420 |
.RE |
| 421 |
.RS 4 |
| 422 |
\fBsd_bus_set_propertyv\fR(3), |
| 423 |
.RE |
| 424 |
.RS 4 |
| 425 |
\fBsd_bus_set_sender\fR(3), |
| 426 |
.RE |
| 427 |
.RS 4 |
| 428 |
\fBsd_bus_set_server\fR(3), |
| 429 |
.RE |
| 430 |
.RS 4 |
| 431 |
\fBsd_bus_set_watch_bind\fR(3) |
| 432 |
.RE |
| 433 |
.RS 4 |
| 434 |
\fBsd_bus_slot_get_current_handler\fR(3), |
| 435 |
.RE |
| 436 |
.RS 4 |
| 437 |
\fBsd_bus_slot_get_current_message\fR(3), |
| 438 |
.RE |
| 439 |
.RS 4 |
| 440 |
\fBsd_bus_slot_get_current_userdata\fR(3), |
| 441 |
.RE |
| 442 |
.RS 4 |
| 443 |
\fBsd_bus_slot_set_description\fR(3), |
| 444 |
.RE |
| 445 |
.RS 4 |
| 446 |
\fBsd_bus_slot_set_destroy_callback\fR(3), |
| 447 |
.RE |
| 448 |
.RS 4 |
| 449 |
\fBsd_bus_slot_set_floating\fR(3), |
| 450 |
.RE |
| 451 |
.RS 4 |
| 452 |
\fBsd_bus_slot_set_userdata\fR(3), |
| 453 |
.RE |
| 454 |
.RS 4 |
| 455 |
\fBsd_bus_start\fR(3), |
| 456 |
.RE |
| 457 |
.RS 4 |
| 458 |
\fBsd_bus_track_add_name\fR(3), |
| 459 |
.RE |
| 460 |
.RS 4 |
| 461 |
\fBsd_bus_track_new\fR(3), |
| 462 |
.RE |
| 463 |
.RS 4 |
| 464 |
\fBsd_bus_wait\fR(3) |
| 465 |
.RE |
| 466 |
for more information about the functions available\&. |
| 467 |
.PP |
| 468 |
The |
| 469 |
\fBbusctl\fR(1) |
| 470 |
tool makes the functionality implemented by sd\-bus available from the command line\&. |
| 471 |
.SH "NOTES" |
| 472 |
.PP |
| 473 |
Functions described here are available as a shared library, which can be compiled against and linked to with the |
| 474 |
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1) |
| 475 |
file\&. |
| 476 |
.PP |
| 477 |
The code described here uses |
| 478 |
\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 |
| 479 |
\fBsetenv\fR(3) |
| 480 |
from a parallel thread\&. It is recommended to only do calls to |
| 481 |
\fBsetenv()\fR |
| 482 |
from an early phase of the program when no other threads have been started\&. |
| 483 |
.SH "SEE ALSO" |
| 484 |
.PP |
| 485 |
\fBsystemd\fR(1), \fBsd-event\fR(3), \fBbusctl\fR(1), \fBsd-varlink\fR(3), \fBdbus-daemon\fR(1), \fBdbus-send\fR(1), \fBpkg-config\fR(1) |