void pa_simple_protocol_disconnect(pa_simple_protocol *p, pa_module *m) {
    connection *c;
    void *state = NULL;

    pa_assert(p);
    pa_assert(m);

    while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
        if (c->options->module == m)
            connection_unlink(c);
}
Exemple #2
0
void pa_cli_protocol_disconnect(pa_cli_protocol *p, pa_module *m) {
    pa_cli *c;
    void *state = NULL;

    pa_assert(p);
    pa_assert(m);

    while ((c = pa_idxset_iterate(p->connections, &state, NULL)))
        if (pa_cli_get_module(c) == m)
            cli_unlink(p, c);
}
Exemple #3
0
static void defer_cb(pa_mainloop_api*api, pa_defer_event *e, void *userdata) {
    void *state = NULL;
    pa_core *c = PA_CORE(userdata);
    pa_module *m;

    pa_core_assert_ref(c);
    api->defer_enable(e, 0);

    while ((m = pa_idxset_iterate(c->modules, &state, NULL)))
        if (m->unload_requested)
            pa_module_unload(c, m, TRUE);
}
void pa_sink_input_ext_discover(struct userdata *u)
{
    void                 *state = NULL;
    pa_idxset            *idxset;
    struct pa_sink_input *sinp;

    pa_assert(u);
    pa_assert(u->core);
    pa_assert_se((idxset = u->core->sink_inputs));

    while ((sinp = pa_idxset_iterate(idxset, &state, NULL)) != NULL)
        handle_new_sink_input(u, sinp);
}
void pa_client_ext_discover(struct userdata *u)
{
    void             *state = NULL;
    pa_idxset        *idxset;
    struct pa_client *client;

    pa_assert(u);
    pa_assert(u->core);
    pa_assert_se((idxset = u->core->clients));

    while ((client = pa_idxset_iterate(idxset, &state, NULL)) != NULL)
        handle_new_or_modified_client(u, client);
}