mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
basic cli interface
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@22 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
eb946dbdbe
commit
993d1bce74
21 changed files with 505 additions and 49 deletions
17
src/module.c
17
src/module.c
|
|
@ -6,6 +6,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include "module.h"
|
||||
#include "strbuf.h"
|
||||
|
||||
struct module* module_load(struct core *c, const char *name, const char *argument) {
|
||||
struct module *m = NULL;
|
||||
|
|
@ -110,3 +111,19 @@ void module_unload_all(struct core *c) {
|
|||
c->modules = NULL;
|
||||
}
|
||||
|
||||
char *module_list_to_string(struct core *c) {
|
||||
struct strbuf *s;
|
||||
struct module *m;
|
||||
uint32_t index = IDXSET_INVALID;
|
||||
assert(c);
|
||||
|
||||
s = strbuf_new();
|
||||
assert(s);
|
||||
|
||||
strbuf_printf(s, "%u module(s) loaded.\n", idxset_ncontents(c->modules));
|
||||
|
||||
for (m = idxset_first(c->modules, &index); m; m = idxset_next(c->modules, &index))
|
||||
strbuf_printf(s, " index: %u, name: <%s>, argument: <%s>\n", m->index, m->name, m->argument);
|
||||
|
||||
return strbuf_tostring_free(s);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue