mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
allow plugins to be compiled into the f00bar main binary
This commit is contained in:
parent
00679dbeeb
commit
0d591fe5a1
25 changed files with 400 additions and 72 deletions
|
@ -350,7 +350,7 @@ battery_new(const char *battery, struct particle *label, int poll_interval_secs)
|
|||
}
|
||||
|
||||
struct module *
|
||||
from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
||||
battery_from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
||||
{
|
||||
const struct yml_node *c = yml_get_value(node, "content");
|
||||
const struct yml_node *name = yml_get_value(node, "name");
|
||||
|
@ -363,7 +363,7 @@ from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
|||
}
|
||||
|
||||
bool
|
||||
verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||
battery_verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||
{
|
||||
static const struct attr_info attrs[] = {
|
||||
{"name", true, &conf_verify_string},
|
||||
|
@ -375,3 +375,12 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
|||
|
||||
return conf_verify_dict(chain, node, attrs);
|
||||
}
|
||||
|
||||
#if defined(CORE_PLUGINS_AS_SHARED_LIBRARIES)
|
||||
|
||||
bool verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||
__attribute__((weak, alias("battery_verify_conf")));
|
||||
struct deco *from_conf(const struct yml_node *node, struct conf_inherit inherited)
|
||||
__attribute__((weak, alias("battery_from_conf")));
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue