pa_assert(d);
- while ((t = pa_hashmap_steal_first(d->transports)))
+ while ((t = pa_hashmap_steal_first(d->transports))) {
+ pa_hook_fire(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED], NULL);
transport_free(t);
+ }
pa_hashmap_free(d->transports, NULL, NULL);
if ((t = pa_hashmap_get(d->transports, path))) {
pa_log_debug("Clearing transport %s profile %d", t->path, t->profile);
pa_hashmap_remove(d->transports, t->path);
+ pa_hook_fire(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED], NULL);
transport_free(t);
break;
}
/* Hook data: pa_bluetooth_transport pointer. */
typedef enum pa_bluetooth_transport_hook {
PA_BLUETOOTH_TRANSPORT_HOOK_NREC_CHANGED, /* Call data: NULL. */
+ PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED, /* Call data: NULL. */
PA_BLUETOOTH_TRANSPORT_HOOK_MAX
} pa_bluetooth_transport_hook_t;