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

pa_operation* pa_context_set_name ( pa_context c,
const char *  name,
pa_context_success_cb_t  cb,
void *  userdata 
)

Set a different application name for context on the server.

Since:
0.5

Definition at line 979 of file context.c.

References PA_CONTEXT_READY, and PA_ERR_BADSTATE.

                                                                                                               {
    pa_tagstruct *t;
    pa_operation *o;
    uint32_t tag;

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

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

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

    t = pa_tagstruct_command(c, PA_COMMAND_SET_CLIENT_NAME, &tag);
    pa_tagstruct_puts(t, name);
    pa_pstream_send_tagstruct(c->pstream, t);
    pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT,  pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);

    return o;
}


Generated by  Doxygen 1.6.0   Back to index