diff options
Diffstat (limited to 'tasker/plugins.py')
| -rw-r--r-- | tasker/plugins.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tasker/plugins.py b/tasker/plugins.py index 7fe9656..d9ef0ce 100644 --- a/tasker/plugins.py +++ b/tasker/plugins.py @@ -84,33 +84,44 @@ class Plugin(object): #default (mandatory) plugin actions def init(self): + """Initial actions. + + All the actions that must be done before the execution of any plugin function. + This function generaly addresses things that are global to the plugin. + """ self._result = True return True def destroy(self): + """Final actions. + + All the actions that must be done after the exection of all plugin functions. + This function generaly addresses things that are global and need to be closed + off, like file descriptos, or mounted partitions.... + """ self._result = True return True def backup(self): + """Gather important information needed for restore.""" self._result = True return True def restore(self): + """Try to restore the previous state described in backup.""" self._result = True return True def diagnose(self): + """Diagnose the situation.""" self._result = True #the system is OK return self._result def fix(self): + """Try to fix whatever is wrong in the system.""" self._result = False return False - def describe(self): - self._result = True - return "" - class BinPlugin(Plugin): def __init__(self, bin): Plugin.__init__(self) |
