mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-19 07:00:03 -05:00
protocol-native: Add signal receiving capability
This patch extends the client subscription API, so that signals sent from PulseAudio can be processed. Within PulseAudio, a signal can be emitted using pa_signal_post(). The interface can be used to notify the client of events that are not covered by the subscription API (for example a button press event on a bluetooth headset). Setting up signal notification is very similar to using subscriptions. First the client needs to subscribe with pa_context_subscribe_signals() and then sets up a signal handler using pa_context_set_signal_callback(). The signal handler will receive three arguments in addition to the usual context and userdata: object_path - string that specifies the origin of the signal signal - string that specifies the type of the signal signal_parameters - optional string for additional information
This commit is contained in:
parent
ed3d4f0837
commit
6f07cd10ec
12 changed files with 183 additions and 7 deletions
|
|
@ -144,6 +144,7 @@ typedef enum pa_core_hook {
|
|||
PA_CORE_HOOK_SAMPLE_CACHE_NEW,
|
||||
PA_CORE_HOOK_SAMPLE_CACHE_CHANGED,
|
||||
PA_CORE_HOOK_SAMPLE_CACHE_UNLINK,
|
||||
PA_CORE_HOOK_SEND_SIGNAL,
|
||||
PA_CORE_HOOK_MAX
|
||||
} pa_core_hook_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue