EsoRex Plugin Listing Functions.
Creates a string array of the names of available plugins.
- Parameters
-
list_of_pllibs | String array of pllibs |
- Return values
-
list_of_plugin_names | String array of plugin names |
This function creates a string array of all plugins contained in list of pllibs specified in a string array. The function does not display these in any way.
Creates a string array of plugin libraries in a given directory.
- Parameters
-
directories_to_search | An array of directory names. |
- Returns
- Pointer to stringarray
This function establishes new stringarrays, list_of_pllibs
and list_of_pypllibs
. It then calls the search_directory
function to recursively search the specified directory_to_search . search_directory
will add the filenames of any found plugin files to list_of_pllibs
or list_of_pypllibs
depending on the type of plugin. When this operation is complete, the function will concolidate the two lists of plugins into a single list and return this as a stringarray.
int er_pluginlist_get_libpath |
( |
er_stringarray_t * |
list_of_pllibs, |
|
|
const char * |
plugin_name, |
|
|
char * |
libpath |
|
) |
| |
Gets the full pathname of the library containing the named plugin.
- Parameters
-
| list_of_pllibs | String array of plugin libraries |
| plugin_name | Name to look for in pllibs given in string array |
[out] | libpath | Filled with the library path string |
- Returns
- the length of the library path found, or 0, in the case that no suitable library was found
The function takes a list of plugin library path names, and opens all of them searching for the named plugin: plugin_name
. While doing this, the funciton also checks for the existence of multiple plugins with the same name. Should multiples be found, then the function will print a warning message to this effect, indicating which one it chose to use.
The choice is made based on the version number. If the same version number exists multiple times, then the first one it finds in the library path is used.
cpl_plugin* er_pluginlist_get_plugin |
( |
const char * |
library_name, |
|
|
const char * |
plugin_name, |
|
|
lt_dlhandle * |
module |
|
) |
| |
Gets a plugin, of a given name, from a given library.
- Parameters
-
library_name | Path/filename of the shared library |
plugin_name | Name of plugin to recover. |
module | (output) A handle to the plugin library. This handle should be closed (with lt_dlclose) when the returned plugin is no longer used. If the requested plugin could not be found or we are dealing with a Python plugin, then this is set to NULL. |
- Returns
- Pointer to Plugin, or NULL if the requested plugin could not be found
Neatly print a list of all the plugins.
- Parameters
-
list_of_pllibs | String array of plugin library names. |
This function will take a stringarray, list_of_pllibs , which contains the names of all the plugin files (i.e. the dynamic libraries) which are visible within the current path. It then extracts from these files the plugins themselves, and makes use of CPL calls to access the name and synopsis of each individual file, before printing them.