From 0a2fced2ee54917819a5cbbfd631419c7540965b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 3 Aug 2008 16:42:16 +0200 Subject: [PATCH] add new api function pa_cli_get_module() --- src/pulsecore/cli.c | 6 ++++++ src/pulsecore/cli.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c index 2057b67a..67bf1e73 100644 --- a/src/pulsecore/cli.c +++ b/src/pulsecore/cli.c @@ -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->userdata = userdata; } + +pa_module *pa_cli_get_module(pa_cli *c) { + pa_assert(c); + + return c->client->module; +} diff --git a/src/pulsecore/cli.h b/src/pulsecore/cli.h index 3f7a6fa4..d8604611 100644 --- a/src/pulsecore/cli.h +++ b/src/pulsecore/cli.h @@ -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); /* 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 -- 2.11.4.GIT