mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
bluetooth: Remove deprecated transport hooks
All code has migrated to the new centralized hooks listed in pa_bluetooth_hook_t so the old transport-specific hooks can be removed.
This commit is contained in:
parent
7c2465d5f9
commit
abcb741299
2 changed files with 0 additions and 21 deletions
|
|
@ -178,13 +178,8 @@ static pa_bluetooth_device* device_new(pa_bluetooth_discovery *discovery, const
|
|||
}
|
||||
|
||||
static void transport_free(pa_bluetooth_transport *t) {
|
||||
unsigned i;
|
||||
|
||||
pa_assert(t);
|
||||
|
||||
for (i = 0; i < PA_BLUETOOTH_TRANSPORT_HOOK_MAX; i++)
|
||||
pa_hook_done(&t->hooks[i]);
|
||||
|
||||
pa_xfree(t->owner);
|
||||
pa_xfree(t->path);
|
||||
pa_xfree(t->config);
|
||||
|
|
@ -206,7 +201,6 @@ static void device_free(pa_bluetooth_device *d) {
|
|||
pa_hashmap_remove(d->discovery->transports, t->path);
|
||||
t->state = PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED;
|
||||
pa_hook_fire(&d->discovery->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED], t);
|
||||
pa_hook_fire(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED], NULL);
|
||||
transport_free(t);
|
||||
}
|
||||
|
||||
|
|
@ -823,7 +817,6 @@ static int pa_bluetooth_transport_parse_property(pa_bluetooth_transport *t, DBus
|
|||
t->nrec = value;
|
||||
pa_log_debug("Transport %s: Property 'NREC' changed to %s.", t->path, t->nrec ? "True" : "False");
|
||||
pa_hook_fire(&t->device->discovery->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_NREC_CHANGED], t);
|
||||
pa_hook_fire(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_NREC_CHANGED], NULL);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -1112,7 +1105,6 @@ static int setup_dbus(pa_bluetooth_discovery *y) {
|
|||
static pa_bluetooth_transport *transport_new(pa_bluetooth_device *d, const char *owner, const char *path, enum profile p,
|
||||
const uint8_t *config, int size) {
|
||||
pa_bluetooth_transport *t;
|
||||
unsigned i;
|
||||
|
||||
t = pa_xnew0(pa_bluetooth_transport, 1);
|
||||
t->device = d;
|
||||
|
|
@ -1128,9 +1120,6 @@ static pa_bluetooth_transport *transport_new(pa_bluetooth_device *d, const char
|
|||
|
||||
t->state = pa_bt_audio_state_to_transport_state(d->profile_state[p]);
|
||||
|
||||
for (i = 0; i < PA_BLUETOOTH_TRANSPORT_HOOK_MAX; i++)
|
||||
pa_hook_init(&t->hooks[i], t);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
@ -1261,7 +1250,6 @@ static DBusMessage *endpoint_clear_configuration(DBusConnection *c, DBusMessage
|
|||
pa_hashmap_remove(y->transports, t->path);
|
||||
t->state = PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED;
|
||||
pa_hook_fire(&y->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED], t);
|
||||
pa_hook_fire(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED], NULL);
|
||||
transport_free(t);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,13 +79,6 @@ typedef enum pa_bluetooth_hook {
|
|||
PA_BLUETOOTH_HOOK_MAX
|
||||
} pa_bluetooth_hook_t;
|
||||
|
||||
/* 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;
|
||||
|
||||
typedef enum pa_bluetooth_transport_state {
|
||||
PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED,
|
||||
PA_BLUETOOTH_TRANSPORT_STATE_IDLE, /* Connected but not playing */
|
||||
|
|
@ -103,8 +96,6 @@ struct pa_bluetooth_transport {
|
|||
|
||||
pa_bluetooth_transport_state_t state;
|
||||
pa_bool_t nrec;
|
||||
|
||||
pa_hook hooks[PA_BLUETOOTH_TRANSPORT_HOOK_MAX];
|
||||
};
|
||||
|
||||
/* This enum is shared among Audio, Headset, AudioSink, and AudioSource, although not all values are acceptable in all profiles */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue