mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
* modify pa_context_exit_daemon() to return a pa_operation object
* add callback prototypes to all introspection functions in client lib * add proper validity checking and error handling to all functions in the client lib * other minor cleanups * todo update git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@531 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
98cb6aa4a3
commit
71b3bff681
20 changed files with 784 additions and 515 deletions
|
|
@ -128,7 +128,7 @@ struct pa_stream {
|
|||
void *underflow_userdata;
|
||||
};
|
||||
|
||||
typedef void (*pa_operation_callback_t)(void);
|
||||
typedef void (*pa_operation_cb_t)(void);
|
||||
|
||||
struct pa_operation {
|
||||
int ref;
|
||||
|
|
@ -138,7 +138,7 @@ struct pa_operation {
|
|||
|
||||
pa_operation_state_t state;
|
||||
void *userdata;
|
||||
pa_operation_callback_t callback;
|
||||
pa_operation_cb_t callback;
|
||||
};
|
||||
|
||||
void pa_command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
|
||||
|
|
@ -146,7 +146,7 @@ void pa_command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag,
|
|||
void pa_command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
|
||||
void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
|
||||
|
||||
pa_operation *pa_operation_new(pa_context *c, pa_stream *s);
|
||||
pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t callback, void *userdata);
|
||||
void pa_operation_done(pa_operation *o);
|
||||
|
||||
void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
|
||||
|
|
@ -169,12 +169,6 @@ void pa_stream_trash_ipol(pa_stream *s);
|
|||
return -pa_context_set_error((context), (error)); \
|
||||
} while(0)
|
||||
|
||||
#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) do { \
|
||||
if (!(expression)) { \
|
||||
pa_context_set_error((context), (error)); \
|
||||
return NULL; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) do { \
|
||||
if (!(expression)) { \
|
||||
|
|
@ -183,4 +177,7 @@ void pa_stream_trash_ipol(pa_stream *s);
|
|||
} \
|
||||
} while(0)
|
||||
|
||||
#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue