20 ##################### ENIGMA BASE
25 self.next_activation = None
27 def start(self, msec, singleshot = False):
28 self.next_activation = time.time() + msec / 1000.0
30 self.singleshot = singleshot
37 return "<eTimer timeout=%s next_activation=%s singleshot=%s>" % (repr(self.timeout), repr(self.next_activation), repr(self.singleshot))
42 self.next_activation += self.msec / 1000.0
43 print "next activation now %d " % self.next_activation
47 running_timers = list(timers)
48 assert len(running_timers), "no running timers, so nothing will ever happen!"
49 running_timers.sort(key=lambda x: x.next_activation)
52 next_timer = running_timers[0]
55 delay = next_timer.next_activation - now
61 while len(running_timers) and running_timers[0].next_activation <= now:
62 running_timers[0].do()
63 running_timers = running_timers[1:]
74 stoptimer.start(10000)
75 stoptimer.timeout.get().append(stop)
80 ##################### ENIGMA GUI
88 eWindowStyleManager = None
92 eWindowStyleSkinned = None
94 eListboxPythonStringContent = None
97 getBestPlayableServiceReference = None
99 class eServiceReference:
104 flagDirectory=isDirectory|mustDescent|canDescent
111 def __init__(self, ref):
115 iRecordableService = None
118 eDVBVolumecontrol = None
121 class eServiceCenter:
123 def getInstance(self):
129 eServiceCenter.instance = self
136 ##################### ENIGMA CONFIG
138 import Components.config
141 "config.skin.primary_skin=None\n"
144 Components.config.config.unpickle(my_config)
146 ##################### ENIGMA CHROOT
148 import Tools.Directories
152 for (x, (y, z)) in Tools.Directories.defaultPaths.items():
153 Tools.Directories.defaultPaths[x] = (chroot + y, z)
155 Tools.Directories.defaultPaths[Tools.Directories.SCOPE_SKIN] = ("../data/", Tools.Directories.PATH_DONTCREATE)
157 ##################### ENIGMA ACTIONS