backend-native: Add backend pointer to transport_data

This removes the inverse/recursive dependency of backend-native on the
`pa_bluetooth_discovery` struct, which is supposed to be opaque outside
of `bluez5-util` in favour of the many accessor functions defined in
`bluez5-util.h`.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
This commit is contained in:
Marijn Suijten 2022-08-02 12:05:15 +02:00 committed by Tanu Kaskinen
parent c6bd6656a2
commit 391dac58a9
3 changed files with 23 additions and 11 deletions

View file

@ -1179,6 +1179,13 @@ bool pa_bluetooth_discovery_get_enable_msbc(pa_bluetooth_discovery *y)
return y->enable_msbc;
}
pa_hashmap* pa_bluetooth_discovery_get_transports(pa_bluetooth_discovery *y) {
pa_assert(y);
pa_assert(PA_REFCNT_VALUE(y) > 0);
return y->transports;
}
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_discovery *y, const char *remote, const char *local) {
pa_bluetooth_device *d;
void *state = NULL;