add new api function pa_cli_get_module()

This commit is contained in:
Lennart Poettering 2008-08-03 16:42:16 +02:00
parent 5042284d45
commit 0a2fced2ee
2 changed files with 9 additions and 1 deletions

View file

@ -151,3 +151,9 @@ void pa_cli_set_eof_callback(pa_cli *c, pa_cli_eof_cb_t cb, void *userdata) {
c->eof_callback = cb; c->eof_callback = cb;
c->userdata = userdata; c->userdata = userdata;
} }
pa_module *pa_cli_get_module(pa_cli *c) {
pa_assert(c);
return c->client->module;
}

View file

@ -35,6 +35,8 @@ pa_cli* pa_cli_new(pa_core *core, pa_iochannel *io, pa_module *m);
void pa_cli_free(pa_cli *cli); void pa_cli_free(pa_cli *cli);
/* Set a callback function that is called whenever the command line session is terminated */ /* Set a callback function that is called whenever the command line session is terminated */
void pa_cli_set_eof_callback(pa_cli *cli, void (*cb)(pa_cli*c, void *userdata), void *userdata); void pa_cli_set_eof_callback(pa_cli *cli, pa_cli_eof_cb_t cb, void *userdata);
pa_module *pa_cli_get_module(pa_cli *c);
#endif #endif