]> code.delx.au - pulseaudio/blob - src/module.h
fix modargs memory leak
[pulseaudio] / src / module.h
1 #ifndef foomodulehfoo
2 #define foomodulehfoo
3
4 #include <inttypes.h>
5 #include <ltdl.h>
6
7 #include "core.h"
8
9 struct pa_module {
10 struct pa_core *core;
11 char *name, *argument;
12 uint32_t index;
13
14 lt_dlhandle dl;
15
16 int (*init)(struct pa_core *c, struct pa_module*m);
17 void (*done)(struct pa_core *c, struct pa_module*m);
18
19 void *userdata;
20 };
21
22 struct pa_module* pa_module_load(struct pa_core *c, const char *name, const char*argument);
23 void pa_module_unload(struct pa_core *c, struct pa_module *m);
24 void pa_module_unload_by_index(struct pa_core *c, uint32_t index);
25
26 void pa_module_unload_all(struct pa_core *c);
27
28 void pa_module_unload_request(struct pa_core *c, struct pa_module *m);
29
30 /* These to following prototypes are for module entrypoints and not implemented by the core */
31 int pa_module_init(struct pa_core *c, struct pa_module*m);
32 void pa_module_done(struct pa_core *c, struct pa_module*m);
33
34 #endif