mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
sample plugin adapted to new modes
This commit is contained in:
parent
baffb510ee
commit
0ab9557936
5 changed files with 103 additions and 0 deletions
20
opt/ahenk/plugins/sample/init.py
Normal file
20
opt/ahenk/plugins/sample/init.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from base.plugin.abstract_plugin import AbstractPlugin
|
||||||
|
|
||||||
|
|
||||||
|
class Init(AbstractPlugin):
|
||||||
|
def __init__(self, context):
|
||||||
|
super(Init, self).__init__()
|
||||||
|
self.context = context
|
||||||
|
self.logger = self.get_logger()
|
||||||
|
|
||||||
|
def handle_mode(self):
|
||||||
|
# TODO Do what do you want to do!
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def handle_mode(context):
|
||||||
|
init = Init(context)
|
||||||
|
init.handle_mode()
|
21
opt/ahenk/plugins/sample/login.py
Normal file
21
opt/ahenk/plugins/sample/login.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from base.plugin.abstract_plugin import AbstractPlugin
|
||||||
|
|
||||||
|
|
||||||
|
class Login(AbstractPlugin):
|
||||||
|
def __init__(self, context):
|
||||||
|
super(Login, self).__init__()
|
||||||
|
self.context = context
|
||||||
|
self.username = str(context.get_username())
|
||||||
|
self.logger = self.get_logger()
|
||||||
|
|
||||||
|
def handle_mode(self):
|
||||||
|
# TODO Do what do you want to do!
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def handle_mode(context):
|
||||||
|
login = Login(context)
|
||||||
|
login.handle_mode()
|
21
opt/ahenk/plugins/sample/logout.py
Normal file
21
opt/ahenk/plugins/sample/logout.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from base.plugin.abstract_plugin import AbstractPlugin
|
||||||
|
|
||||||
|
|
||||||
|
class Logout(AbstractPlugin):
|
||||||
|
def __init__(self, context):
|
||||||
|
super(Logout, self).__init__()
|
||||||
|
self.context = context
|
||||||
|
self.username = str(context.get_username())
|
||||||
|
self.logger = self.get_logger()
|
||||||
|
|
||||||
|
def handle_mode(self):
|
||||||
|
# TODO Do what do you want to do!
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def handle_mode(context):
|
||||||
|
logout = Logout(context)
|
||||||
|
logout.handle_mode()
|
21
opt/ahenk/plugins/sample/safe.py
Normal file
21
opt/ahenk/plugins/sample/safe.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from base.plugin.abstract_plugin import AbstractPlugin
|
||||||
|
|
||||||
|
|
||||||
|
class Safe(AbstractPlugin):
|
||||||
|
def __init__(self, context):
|
||||||
|
super(Safe, self).__init__()
|
||||||
|
self.context = context
|
||||||
|
self.username = str(context.get_username())
|
||||||
|
self.logger = self.get_logger()
|
||||||
|
|
||||||
|
def handle_safe_mode(self):
|
||||||
|
# TODO Do what do you want to do!
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def handle_mode(context):
|
||||||
|
safe = Safe(context)
|
||||||
|
safe.handle_safe_mode()
|
20
opt/ahenk/plugins/sample/shutdown.py
Normal file
20
opt/ahenk/plugins/sample/shutdown.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from base.plugin.abstract_plugin import AbstractPlugin
|
||||||
|
|
||||||
|
|
||||||
|
class Shutdown(AbstractPlugin):
|
||||||
|
def __init__(self, context):
|
||||||
|
super(Shutdown, self).__init__()
|
||||||
|
self.context = context
|
||||||
|
self.logger = self.get_logger()
|
||||||
|
|
||||||
|
def handle_mode(self):
|
||||||
|
# TODO Do what do you want to do!
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def handle_mode(context):
|
||||||
|
shutdown = Shutdown(context)
|
||||||
|
shutdown.handle_mode()
|
Loading…
Reference in a new issue