bluetooth: Extend discovery to support multiple hooks

Add the infrastructure to support several hooks inside
pa_bluetooth_discovery, while using hook names that describe more
accurately their purpose.
This commit is contained in:
Mikel Astiz 2012-12-06 15:55:27 +01:00 committed by Tanu Kaskinen
parent c8944dbb4b
commit e425fd61b8
4 changed files with 28 additions and 13 deletions

View file

@ -152,7 +152,8 @@ int pa__init(pa_module* m) {
if (!(u->discovery = pa_bluetooth_discovery_get(u->core)))
goto fail;
u->slot = pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery), PA_HOOK_NORMAL, (pa_hook_cb_t) load_module_for_device, u);
u->slot = pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED),
PA_HOOK_NORMAL, (pa_hook_cb_t) load_module_for_device, u);
if (!async)
pa_bluetooth_discovery_sync(u->discovery);