plugins marked with a '!' are handled as critical: cancel if loading fails

This commit is contained in:
Martin Willi
2009-09-01 16:08:28 +02:00
parent 9412bbfa7c
commit d6a45127dc
2 changed files with 37 additions and 14 deletions
+9 -5
View File
@@ -33,11 +33,15 @@ struct plugin_loader_t {
/**
* Load a list of plugins from a directory.
*
* 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
* @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.
@@ -52,9 +56,9 @@ struct plugin_loader_t {
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);
};
/**