diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-02-11 12:52:48 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-02-11 12:52:48 +0100 |
| commit | bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b (patch) | |
| tree | c5945c791698c14723e989449e6b4bfcc275c05d /lib/python/Components/ResourceManager.py | |
| parent | 4f7990ff2a55874b9eb65e3c9cd47dacb9f76deb (diff) | |
| parent | 5e6f814d005a01caa437a532e61f4b338617ff67 (diff) | |
| download | enigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.tar.gz enigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.zip | |
Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
Conflicts:
lib/dvb/decoder.cpp
Diffstat (limited to 'lib/python/Components/ResourceManager.py')
| -rw-r--r-- | lib/python/Components/ResourceManager.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/python/Components/ResourceManager.py b/lib/python/Components/ResourceManager.py new file mode 100644 index 00000000..fb6be4a8 --- /dev/null +++ b/lib/python/Components/ResourceManager.py @@ -0,0 +1,23 @@ +class ResourceManager: + def __init__(self): + self.resourceList = {} + + def addResource(self, name, resource): + print "adding Resource", name + self.resourceList[name] = resource + print "resources:", self.resourceList + + + def getResource(self, name): + if not self.hasResource(name): + return None + return self.resourceList[name] + + def hasResource(self, name): + return self.resourceList.has_key(name) + + def removeResource(self, name): + if self.hasResource(name): + del self.resourceList[name] + +resourcemanager = ResourceManager()
\ No newline at end of file |
