add a couple of additional hooks for modules to use

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1600 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-08-09 21:05:20 +00:00
parent ed01e1adb5
commit 30ccf9a5c9
6 changed files with 75 additions and 13 deletions

View file

@ -164,10 +164,22 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
c->is_system_instance = 0;
pa_hook_init(&c->hook_sink_input_new, c);
pa_hook_init(&c->hook_sink_new, c);
pa_hook_init(&c->hook_sink_new_post, c);
pa_hook_init(&c->hook_sink_disconnect, c);
pa_hook_init(&c->hook_source_output_new, c);
pa_hook_init(&c->hook_sink_disconnect_post, c);
pa_hook_init(&c->hook_source_new, c);
pa_hook_init(&c->hook_source_new_post, c);
pa_hook_init(&c->hook_source_disconnect, c);
pa_hook_init(&c->hook_source_disconnect_post, c);
pa_hook_init(&c->hook_sink_input_new, c);
pa_hook_init(&c->hook_sink_input_new_post, c);
pa_hook_init(&c->hook_sink_input_disconnect, c);
pa_hook_init(&c->hook_sink_input_disconnect_post, c);
pa_hook_init(&c->hook_source_output_new, c);
pa_hook_init(&c->hook_source_output_new_post, c);
pa_hook_init(&c->hook_source_output_disconnect, c);
pa_hook_init(&c->hook_source_output_disconnect_post, c);
pa_property_init(c);
@ -226,10 +238,22 @@ static void core_free(pa_object *o) {
c->mainloop->io_free(c->asyncmsgq_event);
pa_hook_free(&c->hook_sink_input_new);
pa_hook_free(&c->hook_sink_new);
pa_hook_free(&c->hook_sink_new_post);
pa_hook_free(&c->hook_sink_disconnect);
pa_hook_free(&c->hook_source_output_new);
pa_hook_free(&c->hook_sink_disconnect_post);
pa_hook_free(&c->hook_source_new);
pa_hook_free(&c->hook_source_new_post);
pa_hook_free(&c->hook_source_disconnect);
pa_hook_free(&c->hook_source_disconnect_post);
pa_hook_free(&c->hook_sink_input_new);
pa_hook_free(&c->hook_sink_input_new_post);
pa_hook_free(&c->hook_sink_input_disconnect);
pa_hook_free(&c->hook_sink_input_disconnect_post);
pa_hook_free(&c->hook_source_output_new);
pa_hook_free(&c->hook_source_output_new_post);
pa_hook_free(&c->hook_source_output_disconnect);
pa_hook_free(&c->hook_source_output_disconnect_post);
pa_xfree(c);
}