mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
ioline: add callback that can be called when the ioline object is fully drained
This commit is contained in:
parent
4cb6ea2d96
commit
a64097ab1f
2 changed files with 25 additions and 1 deletions
|
|
@ -32,6 +32,7 @@
|
|||
typedef struct pa_ioline pa_ioline;
|
||||
|
||||
typedef void (*pa_ioline_cb_t)(pa_ioline*io, const char *s, void *userdata);
|
||||
typedef void (*pa_ioline_drain_cb_t)(pa_ioline *io, void *userdata);
|
||||
|
||||
pa_ioline* pa_ioline_new(pa_iochannel *io);
|
||||
void pa_ioline_unref(pa_ioline *l);
|
||||
|
|
@ -47,6 +48,9 @@ void pa_ioline_printf(pa_ioline *s, const char *format, ...) PA_GCC_PRINTF_ATTR(
|
|||
/* Set the callback function that is called for every recieved line */
|
||||
void pa_ioline_set_callback(pa_ioline*io, pa_ioline_cb_t callback, void *userdata);
|
||||
|
||||
/* Set the callback function that is called when everything has been written */
|
||||
void pa_ioline_set_drain_callback(pa_ioline*io, pa_ioline_drain_cb_t callback, void *userdata);
|
||||
|
||||
/* Make sure to close the ioline object as soon as the send buffer is emptied */
|
||||
void pa_ioline_defer_close(pa_ioline *io);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue