1 from enigma import loadPNG
3 class PluginDescriptor:
4 """An object to describe a plugin."""
6 # where to list the plugin. Note that there are different call arguments,
7 # so you might not be able to combine them.
9 # supported arguments are:
14 # you have to ignore unknown kwargs!
20 # argument: session, serviceref (currently selected)
25 # reason (0: start, 1: end)
28 # start as wizard. In that case, fnc must be a screen class!
31 # like autostart, but for a session. currently, only session starts are
32 # delivered, and only on pre-loaded plugins
33 WHERE_SESSIONSTART = 7
35 def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None):
37 if type(where) is list:
40 self.where = [ where ]
41 self.description = description
43 if type(icon) is str or icon is None:
51 def updateIcon(self, path):
52 if type(self.iconstr) is str:
53 self.icon = loadPNG(path + "/" + self.iconstr)
57 def __eq__(self, other):
58 return self.__call__ == other.__call__