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

uint32_t pa_context_get_index ( pa_context s  ) 

Return the client index this context is identified in the server with. This is useful for usage with the introspection functions, such as pa_context_get_client_info().

Since:
0.9.11

Definition at line 1330 of file context.c.

References PA_CONTEXT_READY, PA_ERR_BADSTATE, PA_ERR_FORKED, PA_ERR_NOTSUPPORTED, and PA_INVALID_INDEX.

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

    PA_CHECK_VALIDITY_RETURN_ANY(c, !pa_detect_fork(), PA_ERR_FORKED, PA_INVALID_INDEX);
    PA_CHECK_VALIDITY_RETURN_ANY(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE, PA_INVALID_INDEX);
    PA_CHECK_VALIDITY_RETURN_ANY(c, c->version >= 13, PA_ERR_NOTSUPPORTED, PA_INVALID_INDEX);

    return c->client_index;
}


Generated by  Doxygen 1.6.0   Back to index