add Boolean source, add ServiceInfo boolean sources, add ConditionalShowHide converte...
[enigma2.git] / lib / python / Components / Sources / CurrentService.py
1 from Components.PerServiceDisplay import PerServiceBase
2 from enigma import iPlayableService
3 from Source import Source
4
5 class CurrentService(PerServiceBase, Source):
6         def __init__(self, navcore):
7                 Source.__init__(self)
8                 PerServiceBase.__init__(self, navcore, 
9                         { 
10                                 iPlayableService.evStart: self.changed,
11                                 iPlayableService.evEnd: self.changed,
12                                 # FIXME: we should check 'interesting_events'
13                                 # which is not always provided.
14                                 iPlayableService.evUpdatedInfo: self.changed,
15                                 iPlayableService.evUpdatedEventInfo: self.changed
16                         })
17                 self.navcore = navcore
18
19         def getCurrentService(self):
20                 return self.navcore.getCurrentService()
21
22         service = property(getCurrentService)