Patch: Pluggable module loaders and demo loader

From: Robert Staudinger <robsta_at_stereolyzer.net>
Date: Wed Feb 02 2005 - 18:37:06 CET

Hi,

the attached patch against HEAD does the following:
* Makes XAP_ModuleManager a subclass of XAP_ModuleFactory (previously
introduced) [1]
* Adds
    + bool XAP_ModuleManager::registerFactory (XAP_ModuleFactory *
pFactory)
    + bool XAP_ModuleManager::unregisterFactory (XAP_ModuleFactory *
pFactory)
    this methods can be used by plugins to hook in their own subclasses
of XAP_ModuleFactory
* Modifies XAP_Module, XAP_UnixModule so they can be instantiated by
plugins

The demo plugin "UserPluginLoader" is a (useless) sample of what a
plugin loader can do. It hooks into the ModuleManager and loads plugins
if the path starts with "/home/". This functionality is of course
already present in abiword itself. The attached tarball can just be
dropped into "abiword-plugins/wp/tools/" and unpacked.
If the plugin "UserPluginLoader" is deactivated in the "Tools" ->
"Plugins" dialog all plugins loaded by it are unloaded as well.

An alternative (more useful) plugin would load all "its" plugins when it
is itself loaded. This will be the next step if i get a "go ahead" from
you.

Best,
- Rob

[1] This can of course be reverted if the patch should be rejected.

Received on Wed Feb 2 18:48:52 2005

This archive was generated by hypermail 2.1.8 : Wed Feb 02 2005 - 18:48:52 CET