2004-06-08 23:54:24 +00:00
|
|
|
#ifndef foomodulehfoo
|
|
|
|
|
#define foomodulehfoo
|
|
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include <ltdl.h>
|
|
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
2004-06-11 17:18:40 +00:00
|
|
|
struct dependency_module {
|
|
|
|
|
lt_dlhandle dl;
|
|
|
|
|
struct dependency_module *next;
|
|
|
|
|
};
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
struct module {
|
2004-06-10 23:22:16 +00:00
|
|
|
struct core *core;
|
2004-06-08 23:54:24 +00:00
|
|
|
char *name, *argument;
|
|
|
|
|
uint32_t index;
|
|
|
|
|
|
2004-06-10 23:22:16 +00:00
|
|
|
lt_dlhandle dl;
|
2004-06-08 23:54:24 +00:00
|
|
|
|
|
|
|
|
int (*init)(struct core *c, struct module*m);
|
|
|
|
|
void (*done)(struct core *c, struct module*m);
|
|
|
|
|
|
|
|
|
|
void *userdata;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct module* module_load(struct core *c, const char *name, const char*argument);
|
|
|
|
|
void module_unload(struct core *c, struct module *m);
|
|
|
|
|
void module_unload_by_index(struct core *c, uint32_t index);
|
|
|
|
|
|
|
|
|
|
void module_unload_all(struct core *c);
|
|
|
|
|
|
|
|
|
|
#endif
|