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

Functions operating on Plugin Handles. More...

Functions

char * getPluginName (RRPluginHandle handle)
 Get the name of a Plugin. More...
 
char * getPluginInfo (RRPluginHandle handle)
 Return some information about a Plugin. More...
 
unsigned char * getPluginManualAsPDF (RRPluginHandle handle)
 Get Plugin manual as PDF. A plugin may embedd a help manual as a PDF. This function return such as a pointer to a string. Use the function getPluginManualNrOfBytes to get the exact length of this string. More...
 
unsigned int getPluginManualNrOfBytes (RRPluginHandle handle)
 Get the byte size for the PDF manual. More...
 
bool assignRoadRunnerInstance (RRPluginHandle pHandle, RRHandle rrHandle)
 Assign a roadrunner instance handle for the plugin to use. A plugin may use an externally created roadrunner instance for its internal work. More...
 
bool executePlugin (RRPluginHandle handle)
 The executePlugin function is the function designated to fire of a Plugins "worker". What is done when this function is entered is plugin dependent. More...
 
bool executePluginEx (RRPluginHandle handle, bool inAThread)
 The executePluginEx is similar to the executePlugin function, except it takes two extra arguments. More...
 
char * getPluginStatus (RRPluginHandle handle)
 Get some status of a plugin. See the plugins documentation on what to expect. More...
 
char * getPluginResult (RRPluginHandle handle)
 Returns a plugins result, as a string. See the plugins documentation on what to expect. More...
 
bool resetPlugin (RRPluginHandle handle)
 Reset a Plugin. Plugin dependent. A reset function should bring the internal state of a plugin to a known state. More...
 
bool isPluginWorking (RRPluginHandle handle)
 check if plugin is actively working More...
 
void terminateWork (RRPluginHandle handle)
 Terminate any work that is in progress in a plugin. If the plugins worker is executed in a thread, this function will signal the internals of the plugin to terminate. More...
 
bool isBeingTerminated (RRPluginHandle handle)
 Check if the work of a plugin is currently being terminated. More...
 
bool wasTerminated (RRPluginHandle handle)
 wasTerminated. query a plugin if work was terminated before completion More...
 
bool assignOnStartedEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired when a plugin starts its work. More...
 
bool assignOnProgressEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired as a plugin progresses. More...
 
bool assignOnFinishedEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired when a plugin finishes its work. More...
 
bool assignPluginInput (RRPluginHandle handle, void *userData)
 Hand external data to a plugin. More...
 
RRHandle getRRHandleFromPlugin (RRPluginHandle handle)
 Get roadrunner instance handle from plugin. More...
 
char * getPluginPropertiesAsXML (RRPluginHandle handle)
 Get a Plugins Parameterse as an xml document. The string returned from this function is formated as xml. More...
 
RRParametersHandle getPluginParameters (RRPluginHandle handle)
 Get a handle to a plugins parameters. More...
 
char * getListOfPluginParameterNames (RRPluginHandle handle)
 Get a list of a plugin parameter names, as a string. Space being the delimiter. More...
 
RRParameterHandle getPluginParameter (RRPluginHandle handle, const char *parameterName)
 Get a parameter handle to a parameter. More...
 
bool setPluginParameter (RRPluginHandle handle, const char *parameterName, const char *value)
 Set the value of a PluginParameter by a string. More...
 
char * getNamesFromParameterList (RRParametersHandle handle)
 Get a list of names for a plugins parameters. More...
 
bool clearParameterList (RRParametersHandle handle)
 Clear a list of parameters. More...
 

Detailed Description

Functions operating on Plugin Handles.

Function Documentation

bool assignOnFinishedEvent ( RRPluginHandle  handle,
PluginEvent  cb,
void *  userData1,
void *  userData2 
)

Assign event function fired when a plugin finishes its work.

Parameters
handleHandle to a plugin
cbFunction pointer to event routine
userData1void* pointer to user data.
userData2void* pointer to user data.
Returns
Returns true or false indicating success/failure
bool assignOnProgressEvent ( RRPluginHandle  handle,
PluginEvent  cb,
void *  userData1,
void *  userData2 
)

Assign event function fired as a plugin progresses.

Parameters
handleHandle to a plugin
cbFunction pointer to event routine
userData1void* pointer to user data.
userData2void* pointer to user data.
Returns
Returns true or false indicating success/failure
bool assignOnStartedEvent ( RRPluginHandle  handle,
PluginEvent  cb,
void *  userData1,
void *  userData2 
)

Assign event function fired when a plugin starts its work.

Parameters
handleHandle to a plugin
cbFunction pointer to event routine
userData1void* pointer to user data.
userData2void* pointer to user data.
Returns
Returns true or false indicating success/failure
bool assignPluginInput ( RRPluginHandle  handle,
void *  userData 
)

Hand external data to a plugin.

Parameters
handleHandle to a plugin
userDatavoid* pointer to user data. Plugin dependent.
Returns
Returns true or false indicating success/failure
bool assignRoadRunnerInstance ( RRPluginHandle  pHandle,
RRHandle  rrHandle 
)

Assign a roadrunner instance handle for the plugin to use. A plugin may use an externally created roadrunner instance for its internal work.

Parameters
pHandleHandle to a plugin
rrHandleHandle to a RoadRunner instance
Returns
Returns true or false indicating success/failure
bool clearParameterList ( RRParametersHandle  handle)

Clear a list of parameters.

Parameters
handleHandle to a Parameters list
Returns
Returns true or false indicating result
bool executePlugin ( RRPluginHandle  handle)

The executePlugin function is the function designated to fire of a Plugins "worker". What is done when this function is entered is plugin dependent.

Parameters
handleHandle to a plugin
Returns
Returns true or false indicating success/failure
Note
The execute function is blocking. If the plugin is todo long work, consider using the executePluginEx function that have the option to execute the plugin code in a thread.
bool executePluginEx ( RRPluginHandle  handle,
bool  inAThread 
)

The executePluginEx is similar to the executePlugin function, except it takes two extra arguments.

Parameters
handleHandle to a plugin
inAThreadbool indicating if the plugin should be executed in a thread.
Returns
Returns true or false indicating success/failure
char* getListOfPluginParameterNames ( RRPluginHandle  handle)

Get a list of a plugin parameter names, as a string. Space being the delimiter.

Parameters
handleHandle to a plugin
Returns
Returns a string if succesfull, NULL otherwise
char* getNamesFromParameterList ( RRParametersHandle  handle)

Get a list of names for a plugins parameters.

Parameters
handleHandle to a plugin
Returns
Returns a string with the names of each parameter, NULL otherwise
char* getPluginInfo ( RRPluginHandle  handle)

Return some information about a Plugin.

Parameters
handleHandle to a plugin
Returns
Returns info, as a string, for the plugin, NULL otherwise
unsigned char* getPluginManualAsPDF ( RRPluginHandle  handle)

Get Plugin manual as PDF. A plugin may embedd a help manual as a PDF. This function return such as a pointer to a string. Use the function getPluginManualNrOfBytes to get the exact length of this string.

Parameters
handleHandle to a plugin
Returns
Returns the plugins manuals pdf file as a unsigned char*. If not available, returns NULL.
unsigned int getPluginManualNrOfBytes ( RRPluginHandle  handle)

Get the byte size for the PDF manual.

Parameters
handleHandle to a plugin
Returns
Returns the nr of bytes in the plugins manuals pdf file as an unsigned int.
char* getPluginName ( RRPluginHandle  handle)

Get the name of a Plugin.

Parameters
handleHandle to a plugin
Returns
Returns the plugins full name, as a string, NULL otherwise
RRParameterHandle getPluginParameter ( RRPluginHandle  handle,
const char *  parameterName 
)

Get a parameter handle to a parameter.

Parameters
handleHandle to a plugin
parameterNameName of the parameter
Returns
Returns a handle to a parameter. Returns NULL if not found
RRParametersHandle getPluginParameters ( RRPluginHandle  handle)

Get a handle to a plugins parameters.

Parameters
handleHandle to a plugin
Returns
Returns a handle to a plugins parameter container, NULL otherwise
char* getPluginPropertiesAsXML ( RRPluginHandle  handle)

Get a Plugins Parameterse as an xml document. The string returned from this function is formated as xml.

Parameters
handleHandle to a plugin
Returns
Returns available parameters in the plugin, as a pointer to a string, NULL otherwise
char* getPluginResult ( RRPluginHandle  handle)

Returns a plugins result, as a string. See the plugins documentation on what to expect.

Parameters
handleHandle to a plugin
Returns
Returns a plugins result if available. NULL otherwise
char* getPluginStatus ( RRPluginHandle  handle)

Get some status of a plugin. See the plugins documentation on what to expect.

Parameters
handleHandle to a plugin
Returns
Returns plugin status if available, as a string. NULL otherwise
RRHandle getRRHandleFromPlugin ( RRPluginHandle  handle)

Get roadrunner instance handle from plugin.

Parameters
handleHandle to a Plugin instance
Returns
Returns a handle to a rrInstance if available, returns NULL otherwise
bool isBeingTerminated ( RRPluginHandle  handle)

Check if the work of a plugin is currently being terminated.

Parameters
handleHandle to the plugin
Returns
Returns true or false indicating if the work within the plugin is in the process of being terminated
bool isPluginWorking ( RRPluginHandle  handle)

check if plugin is actively working

Parameters
handleHandle to a plugin
Returns
Returns true or false indicating i the plugin is busy or not
bool resetPlugin ( RRPluginHandle  handle)

Reset a Plugin. Plugin dependent. A reset function should bring the internal state of a plugin to a known state.

Parameters
handleHandle to a plugin
Returns
Returns true or false indicating success/failure
bool setPluginParameter ( RRPluginHandle  handle,
const char *  parameterName,
const char *  value 
)

Set the value of a PluginParameter by a string.

Parameters
handleHandle to a plugin
parameterNameName of parameter
valueValue of parameter, as string
Returns
true if succesful, false otherwise
void terminateWork ( RRPluginHandle  handle)

Terminate any work that is in progress in a plugin. If the plugins worker is executed in a thread, this function will signal the internals of the plugin to terminate.

Parameters
handleHandle to a plugin
Returns
Returns true or false indicating success/failure
bool wasTerminated ( RRPluginHandle  handle)

wasTerminated. query a plugin if work was terminated before completion

Parameters
handleHandle to the plugin
Returns
Returns true or false indicating if the work in the plugin was terminated or not