bus-slot.c revision caa829849d6ac9f6e173f585f732054358311ae1
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen This file is part of systemd.
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen Copyright 2013 Lennart Poettering
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen systemd is free software; you can redistribute it and/or modify it
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen under the terms of the GNU Lesser General Public License as published by
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen the Free Software Foundation; either version 2.1 of the License, or
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen (at your option) any later version.
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen systemd is distributed in the hope that it will be useful, but
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen WITHOUT ANY WARRANTY; without even the implied warranty of
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen Lesser General Public License for more details.
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen You should have received a copy of the GNU Lesser General Public License
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen along with systemd; If not, see <http://www.gnu.org/licenses/>.
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen slot = malloc0(offsetof(sd_bus_slot, reply_callback) + extra);
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen LIST_PREPEND(slots, bus->slots, slot);
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensen_public_ sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot) {
40b71e89bae4e51768db4dc50ec64c1e9c96eec4Sebastian Thorarensenvoid bus_slot_disconnect(sd_bus_slot *slot) {
case BUS_REPLY_CALLBACK:
prioq_remove(slot->bus->reply_callbacks_prioq, &slot->reply_callback, &slot->reply_callback.prioq_idx);
case BUS_FILTER_CALLBACK:
case BUS_MATCH_CALLBACK:
bus_remove_match_internal(slot->bus, slot->match_callback.match_string, slot->match_callback.cookie);
case BUS_NODE_CALLBACK:
case BUS_NODE_ENUMERATOR:
case BUS_NODE_OBJECT_MANAGER:
LIST_REMOVE(object_managers, slot->node_object_manager.node->object_managers, &slot->node_object_manager);
case BUS_NODE_VTABLE:
const sd_bus_vtable *v;
switch (v->type) {
case _SD_BUS_VTABLE_METHOD: {
case _SD_BUS_VTABLE_PROPERTY:
case _SD_BUS_VTABLE_WRITABLE_PROPERTY: {
free(x);
if (!slot)
return NULL;
return NULL;
return NULL;
void *ret;
return ret;
return NULL;
return NULL;
return NULL;