better handling for time_t .. use typedef
[enigma2.git] / ServiceReference.py
1
2 from enigma import *
3
4 import NavigationInstance
5
6 class ServiceReference(eServiceReference):
7         def __init__(self, ref):
8                 if isinstance(ref, str):
9                         ref = eServiceReference(ref)
10                 self.ref = ref
11
12         def getStaticServiceInformation(self):
13                 return NavigationInstance.instance.ServiceHandler.info(self.ref)
14         
15         def __str__(self):
16                 return self.ref.toString()
17         
18         def getServiceName(self):
19                 info = self.getStaticServiceInformation()
20                 if info is None:
21                         return None
22                 
23                 return info.getName(self.ref)