Main Page   Modules   Compound List   File List   Compound Members   File Members  

XLV Plugin Manager
[XLV Plugin API]


Typedefs

typedef _XLV_PluginMgr XLV_PluginMgr
 XLV Plugin Manager class container.


Functions

XLV_PluginMgrxlv_plugin_mgr_new ()
 constructor.

void xlv_plugin_mgr_cleanup (XLV_PluginMgr *mgr)
 destructor.

void xlv_plugin_add_path (XLV_PluginMgr *mgr, const gchar *path)
 add path to the search path. More...

void xlv_plugin_load_all (XLV_PluginMgr *mgr, gboolean with_registered)
 it loads all plugins found in the searchpath into the memory. More...

gint xlv_plugin_load (XLV_PluginMgr *mgr, const gchar *name)
 it loads a new shared library into the memory and register the included plugins. More...

gboolean xlv_plugin_load_registered (XLV_Plugin *plugin)
 loads an already registered plugin. More...

void xlv_plugin_invalidate (XLV_Plugin *plugin)
 unloads a plugin from the memory. More...

gboolean xlv_plugin_unregister (XLV_Plugin *plugin)
 unregisters a plugin from the plugin database. More...

gint xlv_plugin_package_add (XLV_PluginMgr *mgr, XLV_Module *module, XLV_Plugin *plugin)
 adds a plugin to a master plugin. More...

gint xlv_plugin_add_module (XLV_PluginMgr *mgr, const gchar *module, const gchar *idname, guint32 plugin_type)
 it adds a new module/plugin to the plugin database of the plugin manager.

gboolean xlv_plugin_add_dep (XLV_Plugin *plugin, XLV_Plugin *dep)
 it makes depend a plugin on an another plugin. More...

gboolean xlv_plugin_add_named_dep (XLV_Plugin *plugin, const gchar *dep)
 it makes depend a plugin on an another named plugin. More...

guint xlv_get_number_of_plugins (XLV_PluginMgr *mgr)
 it returns the number of plugins currently registered in the database. More...

XLV_Pluginxlv_plugin_get_from_id (XLV_PluginMgr *mgr, guint id)
 Returns a plugin structure according to the id. More...

XLV_Pluginxlv_plugin_get_from_idname (XLV_PluginMgr *mgr, const gchar *idname)
 Returns a plugin structure according to the idname string. More...

XLV_Pluginxlv_plugin_get_from_guid (XLV_PluginMgr *mgr, XLV_GUID *guid)
 Returns a plugin structure according to the GUID. More...

GList * xlv_plugin_iterate (XLV_PluginMgr *mgr)
 Returns a list of the registered plugins. More...

void xlv_plugin_set_unused (XLV_Plugin *plugin)
 Mark a plugin as unused.

gboolean xlv_plugin_is_loaded (XLV_Plugin *plugin)

Function Documentation

guint xlv_get_number_of_plugins XLV_PluginMgr   mgr
 

it returns the number of plugins currently registered in the database.

Parameters:
mgr  the plugin manager
Returns:
the number of plugins.

gboolean xlv_plugin_add_dep XLV_Plugin   plugin,
XLV_Plugin   dep
 

it makes depend a plugin on an another plugin.

Parameters:
plugin  a plugin.
dep  the plugin on which the current plugin depends on.
Returns:
TRUE if possible else FALSE.

gboolean xlv_plugin_add_named_dep XLV_Plugin   plugin,
const gchar *    dep
 

it makes depend a plugin on an another named plugin.

Parameters:
plugin  a plugin
dep  the name of the plugin on which the current plugin depends on.
Returns:
TRUE if possible else FALSE.

void xlv_plugin_add_path XLV_PluginMgr   mgr,
const gchar *    path
 

add path to the search path.

Parameters:
mgr  Valid plugin manager object.
path  path to be added to the searchpath.

XLV_Plugin* xlv_plugin_get_from_guid XLV_PluginMgr   mgr,
XLV_GUID   guid
 

Returns a plugin structure according to the GUID.

Parameters:
mgr  the plugin manager
id  plugin identificator
Returns:
plugin structure

XLV_Plugin* xlv_plugin_get_from_id XLV_PluginMgr   mgr,
guint    id
 

Returns a plugin structure according to the id.

Parameters:
mgr  the plugin manager
id  plugin identificator
Returns:
plugin structure

XLV_Plugin* xlv_plugin_get_from_idname XLV_PluginMgr   mgr,
const gchar *    idname
 

Returns a plugin structure according to the idname string.

Parameters:
mgr  the plugin manager
idname  plugin identificator name
Returns:
plugin structure

void xlv_plugin_invalidate XLV_Plugin   plugin
 

unloads a plugin from the memory.

This function unloads (but does not unregister) a plugin from the memory.

Parameters:
plugin  a valid, registered, plugin

gboolean xlv_plugin_is_loaded XLV_Plugin   plugin
 

Returns:
Returns TRUE if the specified plugin has been loaded by the plugin manager.

GList* xlv_plugin_iterate XLV_PluginMgr   mgr
 

Returns a list of the registered plugins.

Parameters:
mgr  the plugin manager
Returns:
a GLib list

gint xlv_plugin_load XLV_PluginMgr   mgr,
const gchar *    name
 

it loads a new shared library into the memory and register the included plugins.

A shared library whose complete path is specified by name is loaded, all previous already registered plugins which compete with this one are unloaded and destroyed.

Parameters:
mgr  Valid plugin manager object.
name  path of a shared library.
Returns:
an unique id for the plugin.

void xlv_plugin_load_all XLV_PluginMgr   mgr,
gboolean    with_registered
 

it loads all plugins found in the searchpath into the memory.

It loads all plugins found in the searchpath into the memory. However, if with_registered is set to FALSE, plugins already registered (it is based on the idname of the plugin) are not loaded. In the other case, previously loaded plugins are unregistered and unloaded from the memory and then the new plugin is loaded.

Parameters:
mgr  Valid plugin manager object.
with_registered  Specify whether we should reload already registered plugins.

gboolean xlv_plugin_load_registered XLV_Plugin   plugin
 

loads an already registered plugin.

If a plugin has been registered but not loaded (as it may be the case if you use xlv_plugin_add_module), to validate the registration and to have access to the functionalities of the plugin you have to call this function. After that all fields in the XLV_Plugin descriptor are valid and accessible.

Parameters:
plugin  a valid, registered, plugin
Returns:
TRUE if the loading was successul, FALSE if it fails and then the plugin is inaccessible.

gint xlv_plugin_package_add XLV_PluginMgr   mgr,
XLV_Module *    module,
XLV_Plugin   plugin
 

adds a plugin to a master plugin.

This function is only useful for plugin initializers. When a shared library contains more than one plugin, you should create a master plugin (its type is GLUE) and attach the other normal plugins to it.

Parameters:
mgr  a valid plugin manager.
parent  a valid object created by the plugin manager.
plugin  the descriptor of the plugin to attech to the master plugin.

gboolean xlv_plugin_unregister XLV_Plugin   plugin
 

unregisters a plugin from the plugin database.

This function unloads (if necessary) and then unregisters the specified plugin from its "mother" database. Therefore, the plugin object cannot be anymore used.

Parameters:
plugin  a valid, registered, plugin
Returns:
TRUE if the unregistering was successful.


Generated on Mon Jul 1 19:39:12 2002 for XLV by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002