From b750101eb236130cf056c675997decbac904cc49 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:35:18 +0200 Subject: Adding upstream version 252.22. Signed-off-by: Daniel Baumann --- man/sd_bus_slot_set_destroy_callback.xml | 130 +++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 man/sd_bus_slot_set_destroy_callback.xml (limited to 'man/sd_bus_slot_set_destroy_callback.xml') diff --git a/man/sd_bus_slot_set_destroy_callback.xml b/man/sd_bus_slot_set_destroy_callback.xml new file mode 100644 index 0000000..4de77d2 --- /dev/null +++ b/man/sd_bus_slot_set_destroy_callback.xml @@ -0,0 +1,130 @@ + + + + + + + + sd_bus_slot_set_destroy_callback + systemd + + + + sd_bus_slot_set_destroy_callback + 3 + + + + sd_bus_slot_set_destroy_callback + sd_bus_slot_get_destroy_callback + sd_bus_track_set_destroy_callback + sd_bus_track_get_destroy_callback + sd_bus_destroy_t + + Define the callback function for resource cleanup + + + + + #include <systemd/sd-bus.h> + + + typedef int (*sd_bus_destroy_t) + void *userdata + + + + int sd_bus_slot_set_destroy_callback + sd_bus_slot *slot + sd_bus_destroy_t callback + + + + int sd_bus_slot_get_destroy_callback + sd_bus_slot *slot + sd_bus_destroy_t *callback + + + + int sd_bus_track_set_destroy_callback + sd_bus_track *track + sd_bus_destroy_t callback + + + + int sd_bus_track_get_destroy_callback + sd_bus_track *track + sd_bus_destroy_t *callback + + + + + + Description + + sd_bus_slot_set_destroy_callback() sets callback as the callback + function to be called right before the bus slot object slot is deallocated. The + userdata pointer from the slot object will be passed as the userdata + parameter. This pointer can be set by an argument to the constructor functions, see + sd_bus_add_match3, or directly, + see sd_bus_slot_set_userdata3. + This callback function is called even if userdata is NULL. Note that + this callback is invoked at a time where the bus slot object itself is already invalidated, and executing + operations or taking new references to the bus slot object is not permissible. + + sd_bus_slot_get_destroy_callback() returns the current callback + for slot in the callback parameter. + + sd_bus_track_set_destroy_callback() and + sd_bus_track_get_destroy_callback() provide equivalent functionality for the + userdata pointer associated with bus peer tracking objects. For details about bus peer + tracking objects, see + sd_bus_track_new3. + + + + Return Value + + On success, sd_bus_slot_set_destroy_callback() and + sd_bus_track_set_destroy_callback() return 0 or a positive integer. On failure, they + return a negative errno-style error code. + + sd_bus_slot_get_destroy_callback() and + sd_bus_track_get_destroy_callback() return positive if the destroy callback function + is set, 0 if not. On failure, they return a negative errno-style error code. + + + Errors + + Returned errors may indicate the following problems: + + + + -EINVAL + + The slot or track parameter is + NULL. + + + + + + + + + See Also + + + systemd1, + sd-bus3, + sd_bus_slot_set_floating3, + sd_bus_add_match3, + sd_bus_track_new3, + sd_bus_slot_set_userdata3, + sd_bus_track_set_userdata3 + + + + -- cgit v1.2.3