diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-01-02 14:18:20 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-01-02 14:18:20 +0100 |
commit | 2ea5b8ab2fa64487af984af2162039596a06015a (patch) | |
tree | 58f9a4372d6007b33b1fca63ab18b53aa34b090d /src/libstrongswan/plugins/plugin_loader.h | |
parent | 4e331141b8693e5214b82fdd6c3c6f4fa65eafca (diff) | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-2ea5b8ab2fa64487af984af2162039596a06015a.tar.gz vyos-strongswan-2ea5b8ab2fa64487af984af2162039596a06015a.zip |
Merge tag 'upstream/5.0.1'
Upstream version 5.0.1
Diffstat (limited to 'src/libstrongswan/plugins/plugin_loader.h')
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/plugin_loader.h b/src/libstrongswan/plugins/plugin_loader.h index 7fd07044d..94181dbb6 100644 --- a/src/libstrongswan/plugins/plugin_loader.h +++ b/src/libstrongswan/plugins/plugin_loader.h @@ -26,12 +26,36 @@ typedef struct plugin_loader_t plugin_loader_t; #include <utils/enumerator.h> +/* to avoid circular references we can't include plugin_feature.h */ +struct plugin_feature_t; + /** * The plugin_loader loads plugins from a directory and initializes them */ struct plugin_loader_t { /** + * Add static plugin features, not loaded via plugins. + * + * Similar to features provided by plugins they are evaluated during load(), + * and unloaded when unload() is called. + * + * If critical is TRUE load() will fail if any of the added features could + * not be loaded. + * + * @note The name should be unique otherwise a plugin with the same name is + * not loaded. + * + * @param name name of the component adding the features + * @param features array of plugin features + * @param count number of features in the array + * @param critical TRUE if the features are critical + */ + void (*add_static_features) (plugin_loader_t *this, const char *name, + struct plugin_feature_t *features, int count, + bool critical); + + /** * Load a list of plugins from a directory. * * Each plugin in list may have a ending exclamation mark (!) to mark it |