CleanupWizard/plugin.py: - add configuration screen to mainmenu->system.
[enigma2.git] / lib / python / Components / ResourceManager.py
1 class ResourceManager:
2         def __init__(self):
3                 self.resourceList = {}
4                 
5         def addResource(self, name, resource):
6                 print "adding Resource", name
7                 self.resourceList[name] = resource
8                 print "resources:", self.resourceList
9                 
10                 
11         def getResource(self, name):
12                 if not self.hasResource(name):
13                         return None
14                 return self.resourceList[name]
15         
16         def hasResource(self, name):
17                 return self.resourceList.has_key(name)
18         
19         def removeResource(self, name):
20                 if self.hasResource(name):
21                         del self.resourceList[name]
22                 
23 resourcemanager = ResourceManager()