787c5c4aa0d58fd0d5a6649cb884fc3691688402
[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 not isinstance(ref, eServiceReference):
9                         self.ref = eServiceReference(ref or "")
10                 else:
11                         self.ref = ref
12                 self.serviceHandler = eServiceCenter.getInstance()
13
14         def __str__(self):
15                 return self.ref.toString()
16         
17         def getServiceName(self):
18                 info = self.info()
19                 return info and info.getName(self.ref) or ""
20
21         def play(self):
22                 return self.serviceHandler.info(self.ref)
23         
24         def record(self):
25                 return self.serviceHandler.record(self.ref)
26         
27         def list(self):
28                 return self.serviceHandler.list(self.ref)
29         
30         def info(self):
31                 return self.serviceHandler.info(self.ref)
32
33         def offlineOperations(self):
34                 return self.serviceHandler.offlineOperations(self.ref)