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.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/libstrongswan/plugins/plugin_loader.h b/src/libstrongswan/plugins/plugin_loader.h
index 6230f9d68..f72c91c60 100644
--- a/src/libstrongswan/plugins/plugin_loader.h
+++ b/src/libstrongswan/plugins/plugin_loader.h
@@ -28,33 +28,37 @@ typedef struct plugin_loader_t plugin_loader_t;
/**
* The plugin_loader loads plugins from a directory and initializes them
*/
-struct plugin_loader_t {
-
+struct plugin_loader_t {
+
/**
* Load a list of plugins from a directory.
*
- * @param path path containing loadable plugins
+ * Each plugin in list may have a ending exclamation mark (!) to mark it
+ * as a critical plugin. If loading a critical plugin fails, plugin loading
+ * is aborted and FALSE is returned.
+ *
+ * @param path path containing loadable plugins, NULL for default
* @param list space separated list of plugins to load
- * @return number of successfully loaded plugins
+ * @return TRUE if all critical plugins loaded successfully
*/
- int (*load)(plugin_loader_t *this, char *path, char *list);
-
+ bool (*load)(plugin_loader_t *this, char *path, char *list);
+
/**
* Unload all loaded plugins.
*/
void (*unload)(plugin_loader_t *this);
-
+
/**
* Create an enumerator over all loaded plugin names.
*
* @return enumerator over char*
*/
enumerator_t* (*create_plugin_enumerator)(plugin_loader_t *this);
-
+
/**
- * Unload loaded plugins, destroy plugin_loader instance.
- */
- void (*destroy)(plugin_loader_t *this);
+ * Unload loaded plugins, destroy plugin_loader instance.
+ */
+ void (*destroy)(plugin_loader_t *this);
};
/**