mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
modules: get rid of struct module_info
Since this struct only contained function pointers, make all modules export those functions directly. The plugin manager now defines a module interface struct, and fills it it by dlsym:ing the functions that used to be in module_info.
This commit is contained in:
parent
07b1615a41
commit
bc62843c91
16 changed files with 57 additions and 111 deletions
|
@ -530,7 +530,7 @@ network_new(const char *iface, struct particle *label)
|
|||
return mod;
|
||||
}
|
||||
|
||||
static struct module *
|
||||
struct module *
|
||||
from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
||||
{
|
||||
const struct yml_node *name = yml_get_value(node, "name");
|
||||
|
@ -540,7 +540,7 @@ from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
|||
yml_value_as_string(name), conf_to_particle(content, inherited));
|
||||
}
|
||||
|
||||
static bool
|
||||
bool
|
||||
verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||
{
|
||||
static const struct attr_info attrs[] = {
|
||||
|
@ -552,8 +552,3 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
|||
|
||||
return conf_verify_dict(chain, node, attrs);
|
||||
}
|
||||
|
||||
const struct module_info plugin_info = {
|
||||
.verify_conf = &verify_conf,
|
||||
.from_conf = &from_conf,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue