#ifndef MODULE_DIR_H
#define MODULE_DIR_H
struct module_dir_load_settings {
/* If abi_version is non-NULL and the module contains a version symbol,
fail the load if they're different. In both strings ignore anything
after the first '(' character, so the version can be e.g.:
2.2.ABIv1(2.2.15) */
const char *abi_version;
/* Binary name used for checking if plugin is tried to be loaded for
wrong binary. */
const char *binary_name;
/* Setting name used in plugin dependency error message */
const char *setting_name;
/* If non-NULL, load only modules where filter_callback returns TRUE */
void *filter_context;
/* Require all plugins to have <plugin_name>_init() function */
/* Enable debug logging */
/* If dlopen() fails for some modules, silently skip it. */
/* Don't fail if some specified modules weren't found */
};
struct module {
void *handle;
void (*deinit)(void);
};
/* Load modules in given directory. module_names is a space separated list of
module names to load. */
const struct module_dir_load_settings *set)
ATTR_NULL(2);
/* Load modules that aren't already loaded. */
struct module *
const char *dir, const char *module_names,
const struct module_dir_load_settings *set)
/* Load modules that aren't already loaded. */
const char *dir, const char *module_names,
const struct module_dir_load_settings *set,
const char **error_r)
/* Call init() in all modules */
/* Call deinit() in all modules and mark them NULL so module_dir_unload()
won't do it again. */
/* Unload all modules */
/* Find a module by name. */
/* Returns module's base name from the filename. */
const char *module_file_get_name(const char *fname);
/* Returns module's name without "_plugin" suffix. */
#endif