Logo Search packages:      
Sourcecode: obnam version File versions  Download package

Public Member Functions

obnamlib::pluginmgr::Plugin Class Reference

Inheritance diagram for obnamlib::pluginmgr::Plugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def description
def disable
def disable_wrapper
def enable
def enable_wrapper
def name
def required_application_version
def version

Detailed Description

Base class for plugins.

A plugin MUST NOT have any side effects when it is instantiated.
This is necessary so that it can be safely loaded by unit tests,
and so that a user interface can allow the user to disable it,
even if it is installed, with no ill effects. Any side effects
that would normally happen should occur in the enable() method,
and be undone by the disable() method. These methods must be
callable any number of times.

The subclass MAY define the following attributes:

* name
* description
* version
* required_application_version

name is the user-visible identifier for the plugin. It defaults
to the plugin's classname.

description is the user-visible description of the plugin. It may
be arbitrarily long, and can use pango markup language. Defaults
to the empty string.

version is the plugin version. Defaults to '0.0.0'. It MUST be a
sequence of integers separated by periods. If several plugins with
the same name are found, the newest version is used. Versions are
compared integer by integer, starting with the first one, and a 
missing integer treated as a zero. If two plugins have the same 
version, either might be used.

required_application_version gives the version of the minimal 
application version the plugin is written for. The first integer
must match exactly: if the application is version 2.3.4, the
plugin's required_application_version must be at least 2 and
at most 2.3.4 to be loaded. Defaults to 0.

Definition at line 33 of file pluginmgr.py.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index