980821945be9e41e7f8dc33f29df3499053bbeb6
[profile/ivi/pulseaudio.git] / 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 dependency_module {
10     lt_dlhandle dl;
11     struct dependency_module *next;
12 };
13
14 struct module {
15     struct core *core;
16     char *name, *argument;
17     uint32_t index;
18
19     lt_dlhandle dl;
20     
21     int (*init)(struct core *c, struct module*m);
22     void (*done)(struct core *c, struct module*m);
23
24     void *userdata;
25 };
26
27 struct module* module_load(struct core *c, const char *name, const char*argument);
28 void module_unload(struct core *c, struct module *m);
29 void module_unload_by_index(struct core *c, uint32_t index);
30
31 void module_unload_all(struct core *c);
32
33 #endif