From 21e2d51b50e5719f3303043fdcd30310defb2915 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Fri, 11 May 2012 16:12:33 +0200 Subject: [PATCH] plugins: create skelet for rfkill base class --- tuned/plugins/rfkill.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tuned/plugins/rfkill.py diff --git a/tuned/plugins/rfkill.py b/tuned/plugins/rfkill.py new file mode 100644 index 0000000..8bf3618 --- /dev/null +++ b/tuned/plugins/rfkill.py @@ -0,0 +1,28 @@ +import tuned.plugins +import tuned.log +from tuned.utils.commands import * + +log = tuned.log.get() + +class RFKillPlugin(tuned.plugins.Plugin): + """ + Base class for plugins which can be enabled/disabled using rfkill. + """ + + # + # TODO: ticket #25 + # + + @classmethod + def _get_default_options(cls): + return { + "disable" : None, + } + + @command_set("disable", per_device=True) + def _set_disabled(self, value, device): + log.warn("RF killing is not implemented, ticket #25") + + @command_get("disable") + def _get_disabled(self, device): + return False