summaryrefslogtreecommitdiffstats
path: root/src/module.h
blob: 1cc7d775b81c66711a66f433ba216f2d5cbb0eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef foomodulehfoo
#define foomodulehfoo

#include <inttypes.h>
#include <ltdl.h>

#include "core.h"

struct pa_module {
    struct pa_core *core;
    char *name, *argument;
    uint32_t index;

    lt_dlhandle dl;
    
    int (*init)(struct pa_core *c, struct pa_module*m);
    void (*done)(struct pa_core *c, struct pa_module*m);

    void *userdata;
};

struct pa_module* pa_module_load(struct pa_core *c, const char *name, const char*argument);
void pa_module_unload(struct pa_core *c, struct pa_module *m);
void pa_module_unload_by_index(struct pa_core *c, uint32_t index);

void pa_module_unload_all(struct pa_core *c);

char *pa_module_list_to_string(struct pa_core *c);

void pa_module_unload_request(struct pa_core *c, struct pa_module *m);


#endif