summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/plugin_loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/plugin_loader.h')
-rw-r--r--src/libstrongswan/plugins/plugin_loader.h24
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