diff options
| author | Lennart Poettering <lennart@poettering.net> | 2007-08-11 19:08:06 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2007-08-11 19:08:06 +0000 | 
| commit | 50e014e7a9bc1742d5a9f37f7fa057a6a23a1d6c (patch) | |
| tree | 13f39e9e01556531e433a887086a0c05aa3ee7e7 /src/pulsecore/core.h | |
| parent | a3cd8002b524ab323b964847fc0daa08e85f1bc8 (diff) | |
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
Diffstat (limited to 'src/pulsecore/core.h')
| -rw-r--r-- | src/pulsecore/core.h | 38 | 
1 files changed, 21 insertions, 17 deletions
| 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 <pulsecore/sink-input.h>  #include <pulsecore/msgobject.h> +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); | 
