libRoadRunner Plugin C API  1.0.0
Plugin Framework for libRoadRunner
 All Data Structures Files Functions Variables Typedefs Groups Pages
Functions
Plugin Manager

Plugin Manager Library Functions. More...

Functions

RRPluginManagerHandle createPluginManager (const char *pluginDir)
 Create a new instance of a plugin manager. More...
 
bool freePluginManager (RRPluginManagerHandle handle)
 Free the plugin manager. A call to this function will also unload any loaded plugins. More...
 
bool loadPlugins (RRPluginManagerHandle handle)
 Load plugins. The function will look in the default plugin folder for plugins, and load them. More...
 
bool unLoadPlugins (RRPluginManagerHandle handle)
 Unload plugins. More...
 
RRPluginHandle loadPlugin (RRPluginManagerHandle handle, const char *pluginName)
 Load a particular plugin. More...
 
bool unLoadPlugin (RRPluginManagerHandle handle, RRPluginHandle plugin)
 unload a particular plugin More...
 
int getNumberOfPlugins (RRPluginManagerHandle handle)
 Get Number of loaded plugins. More...
 
char * getPluginNames (RRPluginManagerHandle handle)
 Function to retrieve the names of currently loaded plugins. More...
 
char * getPluginLibraryNames (RRPluginManagerHandle handle)
 Function to retrieve the library name of currently loaded plugins. More...
 
RRPluginHandle getFirstPlugin (RRPluginManagerHandle handle)
 getFirstPlugin retrieves the "first" plugin in the plugin managers internal list of plugins. This function is typically used together with the getNextPlugin and the getPreviousPlugin functions. More...
 
RRPluginHandle getNextPlugin (RRPluginManagerHandle handle)
 getNextPlugin retrieves the "next" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirstPlugin and getPreviousPlugin functions. More...
 
RRPluginHandle getPreviousPlugin (RRPluginManagerHandle handle)
 getPreviousPlugin retrieves the "previous" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirstPlugin and getNextPlugin functions. More...
 
RRPluginHandle getCurrentPlugin (RRPluginManagerHandle handle)
 getCurrentPlugin retrieves the "current" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirst, Next and getPreviousPlugin functions. More...
 
RRPluginHandle getPlugin (RRPluginManagerHandle handle, const char *pluginName)
 GetPluginHandle. More...
 
long getPluginSharedLibHandle (RRPluginManagerHandle handle, RRPluginHandle pluginHandle)
 Get a handle to a plugins shared library. More...
 

Detailed Description

Plugin Manager Library Functions.

Function Documentation

RRPluginManagerHandle createPluginManager ( const char *  pluginDir)

Create a new instance of a plugin manager.

A PluginManager manages a collection of plugins, loaded and unloaded by the load and unload API functions respectively.

Parameters
pluginDirFull path to folder containing plugins. If NULL, uses default folder.
Returns
On success, a handle to a Plugin manager, on failure, NULL.
bool freePluginManager ( RRPluginManagerHandle  handle)

Free the plugin manager. A call to this function will also unload any loaded plugins.

Parameters
handleHandle to a plugin manager.
Returns
true if success, false otherwise.

free the plugin manager

RRPluginHandle getCurrentPlugin ( RRPluginManagerHandle  handle)

getCurrentPlugin retrieves the "current" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirst, Next and getPreviousPlugin functions.

Parameters
handleHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns NULL if the plugin is not found
RRPluginHandle getFirstPlugin ( RRPluginManagerHandle  handle)

getFirstPlugin retrieves the "first" plugin in the plugin managers internal list of plugins. This function is typically used together with the getNextPlugin and the getPreviousPlugin functions.

Parameters
handleHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns NULL if the plugin is not found
RRPluginHandle getNextPlugin ( RRPluginManagerHandle  handle)

getNextPlugin retrieves the "next" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirstPlugin and getPreviousPlugin functions.

Parameters
handleHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns NULL if the plugin is not found
int getNumberOfPlugins ( RRPluginManagerHandle  handle)

Get Number of loaded plugins.

Parameters
handleHandle to a PluginManager instance
Returns
Returns the number of loaded plugins, -1 if a problem is encountered
RRPluginHandle getPlugin ( RRPluginManagerHandle  handle,
const char *  pluginName 
)

GetPluginHandle.

Parameters
handleHandle to a PluginManager instance
pluginNamePointer to string holding the name of a plugin
Returns
Returns a handle to a plugin, with name as supplied in the parameter pluginName. Returns NULL if the plugin is not found
char* getPluginLibraryNames ( RRPluginManagerHandle  handle)

Function to retrieve the library name of currently loaded plugins.

Parameters
handleHandle to a PluginManager instance
Returns
Returns names for loaded plugins as a RRStringArrayPtr, NULL otherwise
char* getPluginNames ( RRPluginManagerHandle  handle)

Function to retrieve the names of currently loaded plugins.

Parameters
handleHandle to a PluginManager instance
Returns
Returns names for loaded plugins as a RRStringArrayPtr, NULL otherwise
long getPluginSharedLibHandle ( RRPluginManagerHandle  handle,
RRPluginHandle  pluginHandle 
)

Get a handle to a plugins shared library.

Parameters
handleHandle to a PluginManager instance
pluginHandleHandle to a plugin
Returns
Returns a handle to the shared library holding a plugin. Returns -1 if the handle can't be retrieved.
Note
This function is not yet implemented..
RRPluginHandle getPreviousPlugin ( RRPluginManagerHandle  handle)

getPreviousPlugin retrieves the "previous" plugin in the plugin managers internal list of plugins. This function is typically used together with the getFirstPlugin and getNextPlugin functions.

Parameters
handleHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns NULL if the plugin is not found
RRPluginHandle loadPlugin ( RRPluginManagerHandle  handle,
const char *  pluginName 
)

Load a particular plugin.

Parameters
handleHandle to a PluginManager instance
pluginNameName of the plugin to load. The plugin name is the plugins shared library name, without path and extension.
Returns
Returns a handle to a plugin, NULL if unsuccesfull
bool loadPlugins ( RRPluginManagerHandle  handle)

Load plugins. The function will look in the default plugin folder for plugins, and load them.

Parameters
handleHandle to a PluginManager instance
Returns
Returns true if Plugins are loaded, false otherwise
bool unLoadPlugin ( RRPluginManagerHandle  handle,
RRPluginHandle  plugin 
)

unload a particular plugin

Parameters
handleHandle to a PluginManager instance
pluginHandle to a Plugin instance
Returns
Returns true if the Plugin are unloaded succesfully, false otherwise
bool unLoadPlugins ( RRPluginManagerHandle  handle)

Unload plugins.

Parameters
handleHandle to a PluginManager instance
Returns
Returns true if Plugins are unloaded succesfully, false otherwise