basic cli interface

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@22 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-06-18 00:22:37 +00:00
parent eb946dbdbe
commit 993d1bce74
21 changed files with 505 additions and 49 deletions

View file

@ -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);
}