Merge branch 'bug_537_vobsub' of git.opendreambox.org:/git/enigma2 into bug_537_vobsub
[vuplus_dvbapp] / ServiceReference.py
1 from enigma import eServiceReference, eServiceCenter
2
3 class ServiceReference(eServiceReference):
4         def __init__(self, ref):
5                 if not isinstance(ref, eServiceReference):
6                         self.ref = eServiceReference(ref or "")
7                 else:
8                         self.ref = ref
9                 self.serviceHandler = eServiceCenter.getInstance()
10
11         def __str__(self):
12                 return self.ref.toString()
13         
14         def getServiceName(self):
15                 info = self.info()
16                 return info and info.getName(self.ref) or ""
17
18         def info(self):
19                 return self.serviceHandler.info(self.ref)
20
21         def list(self):
22                 return self.serviceHandler.list(self.ref)
23         
24         def getType(self):
25                 return self.ref.type
26         
27         def getPath(self):
28                 return self.ref.getPath()