# # Copyright 2006 sense.lab e.V. # # This file is part of the CryptoBox. # # The CryptoBox is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # The CryptoBox is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with the CryptoBox; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # """This is a template for CryptoBox plugins requires: - no extra software """ __revision__ = "" import cryptobox.plugins.base class plugin_template(cryptobox.plugins.base.CryptoBoxPlugin): """a template for CryptoBox plugins """ plugin_capabilities = [ "system" ] plugin_visibility = [ "preferences" ] request_auth = False rank = 99 def do_action(self): """The action handler. """ self.cbox.log.info("This is a log entry generated by the plugin_template.") if True: self.hdf["Data.Success"] = "Plugins.plugin_template.TemplateLaunched" else: self.hdf["Data.Warning"] = "Plugins.plugin_template.SomeError" self.__prepare_form_data() return "form_plugin_template" def get_status(self): """Retrieve the status of the feature. """ return def get_warnings(self): warnings = [] ## uncomment this to see the environment warning message #warnings.append((48, "Plugins.%s.MissingFoo" % self.get_name())) return warnings def __prepare_form_data(self): """Set some hdf values. """