mainloop-signal.h File Reference

UNIX signal support for main loops. More...

Go to the source code of this file.

Typedefs

typedef struct pa_signal_event pa_signal_event
 An opaque UNIX signal event source object.
typedef void(* pa_signal_cb_t )(pa_mainloop_api *api, pa_signal_event *e, int sig, void *userdata)
 Callback prototype for signal events.
typedef void(* pa_signal_destroy_cb_t )(pa_mainloop_api *api, pa_signal_event *e, void *userdata)
 Destroy callback prototype for signal events.

Functions

int pa_signal_init (pa_mainloop_api *api)
 Initialize the UNIX signal subsystem and bind it to the specified main loop.
void pa_signal_done (void)
 Cleanup the signal subsystem.
pa_signal_eventpa_signal_new (int sig, pa_signal_cb_t callback, void *userdata)
 Create a new UNIX signal event source object.
void pa_signal_free (pa_signal_event *e)
 Free a UNIX signal event source object.
void pa_signal_set_destroy (pa_signal_event *e, pa_signal_destroy_cb_t callback)
 Set a function that is called when the signal event source is destroyed.


Detailed Description

UNIX signal support for main loops.

In contrast to other main loop event sources such as timer and IO events, UNIX signal support requires modification of the global process environment. Due to this the generic main loop abstraction layer as defined in mainloop-api.h doesn't have direct support for UNIX signals. However, you may hook signal support into an abstract main loop via the routines defined herein.


Typedef Documentation

typedef void(* pa_signal_cb_t)(pa_mainloop_api *api, pa_signal_event *e, int sig, void *userdata)

Callback prototype for signal events.

typedef void(* pa_signal_destroy_cb_t)(pa_mainloop_api *api, pa_signal_event *e, void *userdata)

Destroy callback prototype for signal events.

An opaque UNIX signal event source object.

Examples:
pacat.c, and paplay.c.


Function Documentation

void pa_signal_done ( void   ) 

Cleanup the signal subsystem.

Examples:
pacat.c, and paplay.c.

void pa_signal_free ( pa_signal_event e  ) 

Free a UNIX signal event source object.

int pa_signal_init ( pa_mainloop_api api  ) 

Initialize the UNIX signal subsystem and bind it to the specified main loop.

Examples:
pacat.c, and paplay.c.

pa_signal_event* pa_signal_new ( int  sig,
pa_signal_cb_t  callback,
void *  userdata 
)

Create a new UNIX signal event source object.

Examples:
pacat.c, and paplay.c.

void pa_signal_set_destroy ( pa_signal_event e,
pa_signal_destroy_cb_t  callback 
)

Set a function that is called when the signal event source is destroyed.

Use this to free the userdata argument if required


Generated on Mon Jun 14 16:31:37 2010 for PulseAudio by  doxygen 1.5.6