bluetooth: Rename former device_is_audio()

Use a more accurate name for the function since it doesn't just check
if it is an audio device (which can be detected quite early), but it
also checks if the most relevant properties (device info, etc.) have
been received.

Besides, add the const qualifier to the pointer since it's not going to
be modified.
This commit is contained in:
Mikel Astiz 2012-11-22 15:20:25 +01:00 committed by Tanu Kaskinen
parent 6545cc77f4
commit 59c8476d64

View file

@ -187,7 +187,7 @@ static void device_free(pa_bluetooth_device *d) {
pa_xfree(d);
}
static pa_bool_t device_is_audio(pa_bluetooth_device *d) {
static pa_bool_t device_is_audio_ready(const pa_bluetooth_device *d) {
pa_assert(d);
return
@ -467,7 +467,7 @@ static int parse_audio_property(pa_bluetooth_discovery *u, int *state, DBusMessa
static void run_callback(pa_bluetooth_device *d, pa_bool_t dead) {
pa_assert(d);
if (!device_is_audio(d))
if (!device_is_audio_ready(d))
return;
d->dead = dead;
@ -949,7 +949,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discover
while ((d = pa_hashmap_iterate(y->devices, &state, NULL)))
if (pa_streq(d->address, address))
return device_is_audio(d) ? d : NULL;
return device_is_audio_ready(d) ? d : NULL;
return NULL;
}
@ -965,7 +965,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *
pa_bluetooth_discovery_sync(y);
if ((d = pa_hashmap_get(y->devices, path)))
if (device_is_audio(d))
if (device_is_audio_ready(d))
return d;
return NULL;