aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Makefile.am2
-rw-r--r--lib/python/Components/ResourceManager.py23
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am
index fda58bf3..9c04701b 100644
--- a/lib/python/Components/Makefile.am
+++ b/lib/python/Components/Makefile.am
@@ -18,4 +18,4 @@ install_PYTHON = \
MultiContent.py MediaPlayer.py TunerInfo.py VideoWindow.py ChoiceList.py \
Element.py Playlist.py ParentalControl.py ParentalControlList.py \
Ipkg.py SelectionList.py Scanner.py SystemInfo.py DreamInfoHandler.py \
- Task.py language_cache.py Console.py
+ Task.py language_cache.py Console.py ResourceManager.py
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