mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: Remove pa_bluetooth_device_get_transport()
With the use of an array to represent a device's transpors, the function becomes trivial and thus can be removed.
This commit is contained in:
parent
faaf8cd39e
commit
ebdb18bca4
3 changed files with 2 additions and 11 deletions
|
|
@ -974,15 +974,6 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile) {
|
|
||||||
pa_assert(d);
|
|
||||||
|
|
||||||
if (profile == PROFILE_OFF)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return d->transports[profile];
|
|
||||||
}
|
|
||||||
|
|
||||||
bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d) {
|
bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d) {
|
||||||
pa_assert(d);
|
pa_assert(d);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,6 @@ void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *d);
|
||||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
|
pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
|
||||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
|
pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
|
||||||
|
|
||||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile);
|
|
||||||
bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d);
|
bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d);
|
||||||
|
|
||||||
int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu);
|
int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu);
|
||||||
|
|
|
||||||
|
|
@ -1984,9 +1984,10 @@ static int setup_transport(struct userdata *u) {
|
||||||
|
|
||||||
pa_assert(u);
|
pa_assert(u);
|
||||||
pa_assert(!u->transport);
|
pa_assert(!u->transport);
|
||||||
|
pa_assert(u->profile != PROFILE_OFF);
|
||||||
|
|
||||||
/* check if profile has a transport */
|
/* check if profile has a transport */
|
||||||
t = pa_bluetooth_device_get_transport(u->device, u->profile);
|
t = u->device->transports[u->profile];
|
||||||
if (t == NULL) {
|
if (t == NULL) {
|
||||||
pa_log_warn("Profile has no transport");
|
pa_log_warn("Profile has no transport");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue