1 from Plugins.Plugin import PluginDescriptor
2 from SocketMMI import SocketMMIMessageHandler
6 def main(session, **kwargs):
7 socketHandler.startMMI()
9 def menu(menuid, **kwargs):
10 if menuid == "setup" and socketHandler and socketHandler.connected():
11 return [(socketHandler.getName(), main, "socket_mmi", 0)]
14 def sessionstart(reason, session):
15 socketHandler.setSession(session)
17 def autostart(reason, **kwargs):
22 socketHandler = SocketMMIMessageHandler()
24 def Plugins(**kwargs):
25 return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, fnc = menu),
26 PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart),
27 PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) ]