Enigma2-Network: update Wlan plugin to support new python-wifi.
[enigma2.git] / 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)