Classes | |
class | SLPluginDynLoader |
This class is used to load plugins shared objects. More... | |
class | SLPluginFeature |
Interface parent of instantiable plugins features. More... | |
class | SLPluginFeature::MimeTypes |
This abstract class is the interface with OS mime database. More... | |
class | SLPluginFeature::Devices |
This abstract class is the interface with devices supported by the OS. More... | |
class | SLPluginFeature::Programs |
This abstract class is the interface to get the list of installed programs. More... | |
class | SLPluginFeature::DBAccess |
This abstract class is the interface for Database Access. More... | |
class | SLPluginFeature::DBAccess::Exception |
class | SLPluginFeature::DBAccess::Results |
class | SLPluginFeature::DBAccess::Connection |
class | SLPluginFeature::ConfigFile |
This abstract class is the interface for accessing the config file. More... | |
class | SLPluginFeature::Files |
This abstract class is the interface to get the list of user files that are stored in its database. More... | |
class | SLPluginFeature::Files::Exception |
class | SLPlugin |
This is the base interface each plugin may implement. More... | |
class | SLPluginRegister |
This is the static object in charge of registering plugins. More... |
Plugin features are the real workers, they are instances of class SLPluginFeature.
"How to use a plugin :"
Example which get an instance of DBAccess feature :
#include "segusoland.hpp" #include "SLPluginFeature.hpp" #include "SLPluginRegister.hpp" SLPluginFeature::DBAccess *db = SL_FEATURE_GET(DBAccess); // Now database access is available // Details on this feature can be found in class documentation : // SLPluginFeature::DBAccess // Do not forget to dispose the feature when the work is done SL_FEATURE_DISPOSE(db);
"Making a NEW plugin"
"Step By Step Example with Mime feature :"
# cd CVSROOT/segusoland/src/plugins # ./mkplugin.sh Mime my_mime => directory ./my_mime is generated with skeletons files
# cd CVSROOT/segusoland/ # ./autogen.sh # make => the empty plugin skeleton should compile here
"Complete and working example of plugins usage and loading :"
This can be found in the test_plugins.cpp file located in :
"CVSROOT/segusoland/src/lib/test_plugins.cpp"
Well this is the short introduction.
With the mkplugin tool, the work should be pretty simple. And all the rest you need can be found in the doxygen documentation, so good luck :-)