Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

pa_operation* pa_context_drain ( pa_context c,
pa_context_notify_cb_t  cb,
void *  userdata 
)

Drain the context. If there is nothing to drain, the function returns NULL

Definition at line 846 of file context.c.

References PA_CONTEXT_READY, and PA_ERR_BADSTATE.

                                                                                         {
    pa_operation *o;

    pa_assert(c);
    pa_assert(PA_REFCNT_VALUE(c) >= 1);

    PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
    PA_CHECK_VALIDITY_RETURN_NULL(c, pa_context_is_pending(c), PA_ERR_BADSTATE);

    o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
    set_dispatch_callbacks(pa_operation_ref(o));

    return o;
}


Generated by  Doxygen 1.6.0   Back to index