diff --git a/src/backend/plugin.hh b/src/backend/plugin.hh index 17313a6..f1602bb 100644 --- a/src/backend/plugin.hh +++ b/src/backend/plugin.hh @@ -23,14 +23,42 @@ #include "config.h" +#include + /** \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