spBase
Loading...
Searching...
No Matches
spPlugin Class Reference

A class to handle plugin-based processing. More...

#include <sp/spPlugin.h>

Collaboration diagram for spPlugin:
Collaboration graph

Related Symbols

(Note that these are not member symbols.)

spPluginspLoadPlugin (const char *plugin_name)
 
spBool spFreePlugin (spPlugin *plugin)
 
spBool spEqPluginType (spPlugin *plugin, spPluginType type)
 
const char * spGetPluginName (spPlugin *plugin)
 
const char * spGetPluginId (spPlugin *plugin)
 
const char * spGetPluginDescription (spPlugin *plugin)
 
const char * spGetPluginInformation (spPlugin *plugin)
 
long spGetPluginVersionId (spPlugin *plugin)
 
int spGetPluginPriority (spPlugin *plugin)
 
spBool spGetPluginVersion (spPlugin *plugin, int *version, int *revision)
 

Detailed Description

A class to handle plugin-based processing.

Actually, spPlugin is not a class, but a typedefed type by typedef struct _spPlugin spPlugin;.

Friends And Related Symbol Documentation

◆ spLoadPlugin()

spPlugin * spLoadPlugin ( const char * plugin_name)
related

Loads a plugin. If you call this function before calling spFreePlugin() , the identical address of the plugin that has already loaded. In this case, the number of calls of spFreePlugin() must be balanced with that of spLoadPlugin() .

Parameters
[in]plugin_nameThe null-terminated name of the plugin excluding the suffix. The directories specified by spSetPluginSearchPath() or the default directories are searched.
Returns
Returns the pointer to spPlugin type. You have to unload the plugin by calling spFreePlugin() . NULL will be returned if error occurs.

◆ spFreePlugin()

spBool spFreePlugin ( spPlugin * plugin)
related

Unloads the plugin. If you call spLoadPlugin() multiple times, the number of calls of spFreePlugin() must be balanced with that of spLoadPlugin() .

Parameters
[in]pluginThe pointer to spPlugin type obtained by spLoadPlugin() .
Return values
SP_TRUESuccess
SP_FALSEFailure

◆ spEqPluginType()

spBool spEqPluginType ( spPlugin * plugin,
spPluginType type )
related

Checks the type of the plugin.

◆ spGetPluginName()

const char * spGetPluginName ( spPlugin * plugin)
related

Gets the name of the plugin.

◆ spGetPluginId()

const char * spGetPluginId ( spPlugin * plugin)
related

Gets the ID of the plugin.

◆ spGetPluginDescription()

const char * spGetPluginDescription ( spPlugin * plugin)
related

Gets the short description of the plugin which doesn't include line breaks.

◆ spGetPluginInformation()

const char * spGetPluginInformation ( spPlugin * plugin)
related

Gets the detailed description of the plugin which can include line breaks.

◆ spGetPluginVersionId()

long spGetPluginVersionId ( spPlugin * plugin)
related

Gets the version ID of the plugin which is an integer of long type.

◆ spGetPluginPriority()

int spGetPluginPriority ( spPlugin * plugin)
related

Gets the priority of the plugin to determine which plugin is used for a purpose, when several plugins for the purpose are found. SP_PLUGIN_PRIORITY_HIGHEST is the highest and SP_PLUGIN_PRIORITY_LOWEST is the lowest priority.

◆ spGetPluginVersion()

spBool spGetPluginVersion ( spPlugin * plugin,
int * version,
int * revision )
related

Gets the version number of the plugin loaded.