the class HardwareInfo is used to determine the dreambox model (taken
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 3 Jul 2008 13:02:41 +0000 (13:02 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 3 Jul 2008 13:02:41 +0000 (13:02 +0000)
from /proc/stb/info/model) (needs new driver info.ko)

lib/python/Tools/HardwareInfo.py [new file with mode: 0644]
lib/python/Tools/Makefile.am

diff --git a/lib/python/Tools/HardwareInfo.py b/lib/python/Tools/HardwareInfo.py
new file mode 100644 (file)
index 0000000..38cccb5
--- /dev/null
@@ -0,0 +1,10 @@
+class HardwareInfo:
+       def __init__(self):
+               self.device = "unknown"
+               file = open("/proc/stb/info/model", "r")
+               self.device = file.readline().strip()
+               
+       def get_device_name(self):
+               return self.device
+       
+       device_name = property(get_device_name)
\ No newline at end of file
index 9d6ee5d7bc66aab963da6214a5113693424aeb8b..609f3bab637d94ab47df5458f03404e856b48334 100644 (file)
@@ -4,4 +4,4 @@ install_PYTHON = \
        FuzzyDate.py XMLTools.py Directories.py NumericalTextInput.py \
        KeyBindings.py BoundFunction.py ISO639.py Notifications.py __init__.py \
        RedirectOutput.py DreamboxHardware.py Import.py Event.py CList.py \
        FuzzyDate.py XMLTools.py Directories.py NumericalTextInput.py \
        KeyBindings.py BoundFunction.py ISO639.py Notifications.py __init__.py \
        RedirectOutput.py DreamboxHardware.py Import.py Event.py CList.py \
-       LoadPixmap.py Profile.py
+       LoadPixmap.py Profile.py HardwareInfo.py