- Update plugin interface

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@658 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-06-24 18:35:43 +00:00
parent 66d46db357
commit 409047a225
1 changed files with 33 additions and 5 deletions

View File

@ -23,14 +23,42 @@
#include "config.h"
#include <glibmm/ustring.h>
/** \file plugin.hh
* All loadable modules that want to act as plugins
* for SGPEMv2 should implement this interface. */
// FIXME Add Singleton LoadPlugin class.
/*
class LoadPlugin {
};
namespace sgpem
{
/** \brief The interface a specific plugin should implement
*
* Only the header file containing this interface
* should be provided by the backend library. Every plugin
* will then implement its set of static functions.
* Thus every plugin will export these very symbols
* outside its DSO.
*/
class SG_DLLEXPORT Plugin
{
/** \brief Called when a plugin is loaded and enabled
*
* Sets up the plugin's initial state and
* performs needed actions before its usage can start.
*/
static void on_init();
static void on_exit();
static Glib::ustring describe();
static Glib::ustring get_name();
static Glib::ustring get_author();
static float get_version();
private:
SG_DLLLOCAL Plugin();
}; //~ class Plugin
} //~ namespace sgpem
#endif