From 50e014e7a9bc1742d5a9f37f7fa057a6a23a1d6c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 11 Aug 2007 19:08:06 +0000 Subject: use single array for storing pa_core hook lists, add sink state changed hook, drop NO_HOOKS flags for sink inputs/source outputs, listen for resume events in module-suspend-on-idle.c git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1640 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/core.h | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'src/pulsecore/core.h') diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h index 003b24b1..c49a77d5 100644 --- a/src/pulsecore/core.h +++ b/src/pulsecore/core.h @@ -42,6 +42,26 @@ typedef struct pa_core pa_core; #include #include +typedef enum pa_core_hook { + PA_CORE_HOOK_SINK_NEW_POST, + PA_CORE_HOOK_SINK_DISCONNECT, + PA_CORE_HOOK_SINK_DISCONNECT_POST, + PA_CORE_HOOK_SINK_STATE_CHANGED, + PA_CORE_HOOK_SOURCE_NEW_POST, + PA_CORE_HOOK_SOURCE_DISCONNECT, + PA_CORE_HOOK_SOURCE_DISCONNECT_POST, + PA_CORE_HOOK_SOURCE_STATE_CHANGED, + PA_CORE_HOOK_SINK_INPUT_NEW, + PA_CORE_HOOK_SINK_INPUT_PUT, + PA_CORE_HOOK_SINK_INPUT_DISCONNECT, + PA_CORE_HOOK_SINK_INPUT_DISCONNECT_POST, + PA_CORE_HOOK_SOURCE_OUTPUT_NEW, + PA_CORE_HOOK_SOURCE_OUTPUT_PUT, + PA_CORE_HOOK_SOURCE_OUTPUT_DISCONNECT, + PA_CORE_HOOK_SOURCE_OUTPUT_DISCONNECT_POST, + PA_CORE_HOOK_MAX +} pa_core_hook_t; + /* The core structure of PulseAudio. Every PulseAudio daemon contains * exactly one of these. It is used for storing kind of global * variables for the daemon. */ @@ -89,23 +109,7 @@ struct pa_core { int is_system_instance; /* hooks */ - pa_hook - hook_sink_new, - hook_sink_new_post, - hook_sink_disconnect, - hook_sink_disconnect_post, - hook_source_new, - hook_source_new_post, - hook_source_disconnect, - hook_source_disconnect_post, - hook_sink_input_new, - hook_sink_input_new_post, - hook_sink_input_disconnect, - hook_sink_input_disconnect_post, - hook_source_output_new, - hook_source_output_new_post, - hook_source_output_disconnect, - hook_source_output_disconnect_post; + pa_hook hooks[PA_CORE_HOOK_MAX]; }; PA_DECLARE_CLASS(pa_core); -- cgit