Merge remote branch 'origin/bug_530_add_dm800se_support'
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 6 Oct 2010 09:55:09 +0000 (11:55 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 6 Oct 2010 09:55:09 +0000 (11:55 +0200)
144 files changed:
Makefile.am
RecordTimer.py [changed mode: 0644->0755]
ServiceReference.py
configure.ac
data/defaults/Dream/hdbouquets/userbouquet.favourites.tv
data/defaults/Dream/sdbouquets/userbouquet.favourites.tv
data/menu.xml
data/setup.xml [changed mode: 0644->0755]
data/skin_default.xml
data/skin_default/Makefile.am
data/skin_default/celserviceeventprogressbar.png [new file with mode: 0644]
data/skin_default/icons/Makefile.am [changed mode: 0644->0755]
data/skin_default/icons/input_keyboard-configured.png [new file with mode: 0644]
data/skin_default/icons/input_keyboard.png [new file with mode: 0644]
data/skin_default/icons/input_mouse-configured.png [new file with mode: 0644]
data/skin_default/icons/input_mouse.png [new file with mode: 0644]
data/skin_default/icons/input_rcnew-configured.png [new file with mode: 0644]
data/skin_default/icons/input_rcnew.png [new file with mode: 0644]
data/skin_default/icons/input_rcold-configured.png [new file with mode: 0644]
data/skin_default/icons/input_rcold.png [new file with mode: 0644]
data/skin_default/icons/network_wired-active.png [new file with mode: 0755]
data/skin_default/icons/network_wired-inactive.png [new file with mode: 0755]
data/skin_default/icons/network_wired.png [new file with mode: 0755]
data/skin_default/icons/network_wireless-active.png [new file with mode: 0755]
data/skin_default/icons/network_wireless-inactive.png [new file with mode: 0755]
data/skin_default/icons/network_wireless.png [new file with mode: 0755]
doc/TPM [new file with mode: 0644]
lib/base/Makefile.am
lib/base/console.cpp
lib/base/ebase.cpp
lib/base/estring.cpp
lib/base/etpm.cpp [new file with mode: 0644]
lib/base/etpm.h [new file with mode: 0644]
lib/dvb/dvb.cpp
lib/dvb/dvb.h
lib/dvb/frontend.cpp
lib/dvb/idvb.h
lib/gdi/font.cpp
lib/gdi/font.h
lib/gdi/lcd.cpp
lib/gdi/region.cpp
lib/gui/elistboxcontent.cpp
lib/python/Components/About.py [changed mode: 0644->0755]
lib/python/Components/Converter/TemplatedMultiContent.py [changed mode: 0644->0755]
lib/python/Components/DreamInfoHandler.py
lib/python/Components/InputDevice.py [changed mode: 0644->0755]
lib/python/Components/Network.py
lib/python/Components/NimManager.py
lib/python/Components/RecordingConfig.py [changed mode: 0644->0755]
lib/python/Components/Renderer/Listbox.py [changed mode: 0644->0755]
lib/python/Components/ServiceList.py [changed mode: 0755->0644]
lib/python/Components/UsageConfig.py
lib/python/Components/VolumeControl.py
lib/python/Components/config.py
lib/python/Plugins/DemoPlugins/Makefile.am
lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am [new file with mode: 0644]
lib/python/Plugins/DemoPlugins/TPMDemo/README [new file with mode: 0644]
lib/python/Plugins/DemoPlugins/TPMDemo/__init__.py [new file with mode: 0644]
lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py [new file with mode: 0644]
lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml
lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml
lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml
lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml
lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml
lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml
lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml
lib/python/Plugins/Extensions/SocketMMI/meta/plugin_socketmmi.xml [changed mode: 0644->0755]
lib/python/Plugins/Extensions/TuxboxPlugins/meta/plugin_tuxboxplugins.xml [changed mode: 0644->0755]
lib/python/Plugins/Makefile.am
lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml
lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/meta/plugin_frontprocessorupgrade.xml [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/Hotplug/meta/plugin_hotplug.xml [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py
lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml
lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml
lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml
lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/TempFanControl/LICENSE [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/Makefile.am [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/meta/plugin_tempfancontrol.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml
lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml
lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml
lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am
lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py
lib/python/Plugins/SystemPlugins/WirelessLan/flags.py [deleted file]
lib/python/Plugins/SystemPlugins/WirelessLan/iwlibs.py [deleted file]
lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InputDeviceSetup.py [new file with mode: 0755]
lib/python/Screens/Ipkg.py
lib/python/Screens/Makefile.am
lib/python/Screens/NetworkSetup.py
lib/python/Screens/TimerEntry.py
lib/python/Screens/Wizard.py
lib/python/Tools/NumericalTextInput.py
lib/python/enigma_python.i
lib/service/listboxservice.cpp
lib/service/listboxservice.h
po/ar.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en.po
po/enigma2.pot
po/es.po
po/et.po
po/fi.po
po/fr.po
po/fy.po
po/hr.po
po/hu.po
po/is.po
po/it.po
po/lt.po
po/lv.po
po/nl.po
po/no.po
po/pl.po
po/pt.po
po/ru.po
po/sk.po
po/sl.po
po/sr.po
po/sv.po
po/tr.po
po/uk.po
tools/create_picon_links.py
tools/genmetaindex.py

index c517d9c..bc1770b 100755 (executable)
@@ -7,12 +7,8 @@ install_PYTHON = \
        keyids.py keymapparser.py mytest.py skin.py timer.py tools.py GlobalActions.py \
        e2reactor.py
 
-LANGS := $(shell cat $(srcdir)/po/LINGUAS)
-
 install-exec-hook:
-       for lang in $(LANGS); do \
-               $(PYTHON) $(srcdir)/tools/genmetaindex.py $$lang $(DESTDIR)$(datadir)/meta/plugin_*.xml > $(DESTDIR)$(datadir)/meta/index-enigma2_$$lang.xml; \
-       done
+               $(PYTHON) $(srcdir)/tools/genmetaindex.py $(DESTDIR)$(datadir)/meta/plugin_*.xml > $(DESTDIR)$(datadir)/meta/index-enigma2.xml
 
 uninstall-hook:
-       $(RM) $(DESTDIR)$(datadir)/meta/index-enigma2_*.xml
+       $(RM) $(DESTDIR)$(datadir)/meta/index-enigma2.xml
old mode 100644 (file)
new mode 100755 (executable)
index f670417..4ece9c5
@@ -102,7 +102,10 @@ class RecordTimerEntry(timer.TimerEntry, object):
                
                assert isinstance(serviceref, ServiceReference)
                
-               self.service_ref = serviceref
+               if serviceref.isRecordable():
+                       self.service_ref = serviceref
+               else:
+                       self.service_ref = ServiceReference(None)
                self.eit = eit
                self.dontSave = False
                self.name = name
@@ -129,6 +132,7 @@ class RecordTimerEntry(timer.TimerEntry, object):
        def calculateFilename(self):
                service_name = self.service_ref.getServiceName()
                begin_date = strftime("%Y%m%d %H%M", localtime(self.begin))
+               begin_shortdate = strftime("%Y%m%d", localtime(self.begin))
                
                print "begin_date: ", begin_date
                print "service_name: ", service_name
@@ -137,7 +141,15 @@ class RecordTimerEntry(timer.TimerEntry, object):
                
                filename = begin_date + " - " + service_name
                if self.name:
-                       filename += " - " + self.name
+                       if config.usage.setup_level.index >= 2: # expert+
+                               if config.recording.filename_composition.value == "short":
+                                       filename = begin_shortdate + " - " + self.name
+                               elif config.recording.filename_composition.value == "long":
+                                       filename += " - " + self.name + " - " + self.description
+                               else:
+                                       filename += " - " + self.name # standard
+                       else:
+                               filename += " - " + self.name
 
                if config.recording.ascii_filenames.value:
                        filename = ASCIItranslit.legacyEncode(filename)
index 11e2878..4907fa2 100644 (file)
@@ -10,7 +10,7 @@ class ServiceReference(eServiceReference):
 
        def __str__(self):
                return self.ref.toString()
-       
+
        def getServiceName(self):
                info = self.info()
                return info and info.getName(self.ref) or ""
@@ -20,3 +20,16 @@ class ServiceReference(eServiceReference):
 
        def list(self):
                return self.serviceHandler.list(self.ref)
+
+       def getType(self):
+               return self.ref.type
+
+       def getPath(self):
+               return self.ref.getPath()
+
+       def getFlags(self):
+               return self.ref.flags
+
+       def isRecordable(self):
+               ref = self.ref
+               return ref.flags & eServiceReference.isGroup or (ref.type == eServiceReference.idDVB and ref.getPath() == "")
\ No newline at end of file
index d1b1d27..35fad77 100755 (executable)
@@ -118,6 +118,7 @@ lib/python/Components/Sources/Makefile
 lib/python/Screens/Makefile
 lib/python/Plugins/Makefile
 lib/python/Plugins/DemoPlugins/Makefile
+lib/python/Plugins/DemoPlugins/TPMDemo/Makefile
 lib/python/Plugins/DemoPlugins/TestPlugin/Makefile
 lib/python/Plugins/Extensions/CutListEditor/Makefile
 lib/python/Plugins/Extensions/CutListEditor/meta/Makefile
@@ -158,6 +159,7 @@ lib/python/Plugins/SystemPlugins/Hotplug/Makefile
 lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile
 lib/python/Plugins/SystemPlugins/Makefile
 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile
+lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile
 lib/python/Plugins/SystemPlugins/NetworkWizard/Makefile
 lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile
 lib/python/Plugins/SystemPlugins/NFIFlash/Makefile
index 91536b1..b6bc62f 100644 (file)
@@ -11,6 +11,7 @@
 #SERVICE 1:0:1:701:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:308:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2FC:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:F98:454:1:C00000:0:0:0:\r
 #SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6E42:431:1:C00000:0:0:0:\r
 #SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen\r
 #DESCRIPTION Doku/Wissen/Themen\r
-#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:6F47:445:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2775:444:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:293:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D70:437:1:C00000:0:0:0:\r
-#SERVICE 1:0:1:277B:444:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:49:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:332D:45B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:3139:459:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0:\r
index 5f89c48..1cea366 100644 (file)
@@ -11,6 +11,7 @@
 #SERVICE 1:0:1:701:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:308:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2FC:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:F98:454:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:7034:41B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6E42:431:1:C00000:0:0:0:\r
 #SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen\r
 #DESCRIPTION Doku/Wissen/Themen\r
-#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:6F47:445:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2775:444:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:293:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D70:437:1:C00000:0:0:0:\r
-#SERVICE 1:0:1:277B:444:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:49:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:332D:45B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:3139:459:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0:\r
index b437fbc..6507bfe 100755 (executable)
@@ -62,8 +62,9 @@
                                </menu>
                                <!--<item text="Remote Control"><setup id="rc" /></item>-->
                                <!--<item text="OSD"><setup id="osd" /></item>-->
-                               <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item level="0" text="Network" entryID="network_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
+                               <item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>
+                               <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item text="Keyboard"><setup id="keyboard" /></item>
                                <!--<menu level="1" text="Network..." entryID="network_setup">
                                        <id val="network" />
old mode 100644 (file)
new mode 100755 (executable)
index 9425afd..b920edd
@@ -33,6 +33,7 @@
                        <item level="1" text="Action on long powerbutton press">config.usage.on_long_powerpress</item>
                        <item level="0" text="Infobar timeout">config.usage.infobar_timeout</item>
                        <item level="1" text="12V output" requires="12V_Output">config.usage.output_12V</item>
+                       <item level="0" text="Show event-progress in channel selection">config.usage.show_event_progress_in_servicelist</item>
                        <item level="2" text="Show infobar on channel change">config.usage.show_infobar_on_zap</item>
                        <item level="2" text="Show infobar on skip forward/backward">config.usage.show_infobar_on_skip</item>
                        <item level="2" text="Show infobar on event change">config.usage.show_infobar_on_event_change</item>
@@ -70,6 +71,7 @@
                        <item level="2" text="Behavior of 0 key in PiP-mode">config.usage.pip_zero_button</item>
                        <item level="2" text="Alternative services tuner priority">config.usage.alternatives_priority</item>
                        <item level="2" text="Limited character set for recording filenames">config.recording.ascii_filenames</item>
+                       <item level="2" text="Composition of the recording filenames">config.recording.filename_composition</item>
                </setup>
                <setup key="harddisk" title="Harddisk setup" >
                        <item level="0" text="Harddisk standby after">config.usage.hdd_standby</item>
index aabefec..8e0c156 100755 (executable)
@@ -571,7 +571,19 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
                <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
                <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
-               <widget name="list" position="5,50" size="550,280" scrollbarMode="showOnDemand" zPosition="10"/>
+               <widget source="list" render="Listbox" position="5,50" size="550,280" zPosition="10" scrollbarMode="showOnDemand">
+                       <convert type="TemplatedMultiContent"> <!--  iface, name, description, interfacepng, defaultpng, activepng, divpng  -->
+                               {"template": [
+                                               MultiContentEntryText(pos = (85, 6), size = (440, 28), font=0, flags = RT_HALIGN_LEFT|RT_VALIGN_TOP, text = 1), # index 1 is the interfacename
+                                               MultiContentEntryText(pos = (85, 43), size = (440, 20), font=1, flags = RT_HALIGN_LEFT|RT_VALIGN_BOTTOM, text = 2), # index 2 is the description
+                                               MultiContentEntryPixmapAlphaTest(pos = (2, 8), size = (54, 54), png = 3), # index 3 is the interface pixmap
+                                               MultiContentEntryPixmapAlphaTest(pos = (63, 46), size = (15, 16), png = 4), # index 4 is the default pixmap
+                                       ],
+                               "fonts": [gFont("Regular", 28),gFont("Regular", 20)],
+                               "itemHeight": 70
+                               }
+                       </convert>
+               </widget>
                <ePixmap pixmap="skin_default/div-h.png" position="0,340" zPosition="1" size="560,2" />
                <widget source="introduction" render="Label" position="0,350" size="560,50" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />
        </screen>
index 85bb800..6038c2e 100755 (executable)
@@ -23,6 +23,7 @@ dist_install_DATA = \
        b_tl.png \
        b_t.png \
        b_tr.png \
+       celserviceeventprogressbar.png \
        div-h.png \
        div-v.png \
        epg_more.png \
diff --git a/data/skin_default/celserviceeventprogressbar.png b/data/skin_default/celserviceeventprogressbar.png
new file mode 100644 (file)
index 0000000..7bf5c65
Binary files /dev/null and b/data/skin_default/celserviceeventprogressbar.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 8e2052b..c6cb269
@@ -27,13 +27,27 @@ dist_install_DATA = \
        icon_view.png \
        input_error.png \
        input_info.png \
+       input_keyboard-configured.png \
+       input_keyboard.png \
+       input_mouse-configured.png \
+       input_mouse.png \
        input_question.png \
+       input_rcnew-configured.png \
+       input_rcnew.png \
+       input_rcold-configured.png \
+       input_rcold.png \
        lock_error.png \
        lock_off.png \
        lock_on.png \
        lock.png \
        marker.png \
        mp_buttons.png \
+       network_wired.png \
+       network_wired-active.png \
+       network_wired-inactive.png \    
+       network_wireless.png \
+       network_wireless-active.png \
+       network_wireless-inactive.png \ 
        plugin.png \
        rass_logo.png \
        rass_page1.png \
@@ -48,3 +62,4 @@ dist_install_DATA = \
        scan-s.png \
        scan-t.png \
        selectioncross.png
+
diff --git a/data/skin_default/icons/input_keyboard-configured.png b/data/skin_default/icons/input_keyboard-configured.png
new file mode 100644 (file)
index 0000000..c6623a5
Binary files /dev/null and b/data/skin_default/icons/input_keyboard-configured.png differ
diff --git a/data/skin_default/icons/input_keyboard.png b/data/skin_default/icons/input_keyboard.png
new file mode 100644 (file)
index 0000000..a922c89
Binary files /dev/null and b/data/skin_default/icons/input_keyboard.png differ
diff --git a/data/skin_default/icons/input_mouse-configured.png b/data/skin_default/icons/input_mouse-configured.png
new file mode 100644 (file)
index 0000000..3db9447
Binary files /dev/null and b/data/skin_default/icons/input_mouse-configured.png differ
diff --git a/data/skin_default/icons/input_mouse.png b/data/skin_default/icons/input_mouse.png
new file mode 100644 (file)
index 0000000..f70c84e
Binary files /dev/null and b/data/skin_default/icons/input_mouse.png differ
diff --git a/data/skin_default/icons/input_rcnew-configured.png b/data/skin_default/icons/input_rcnew-configured.png
new file mode 100644 (file)
index 0000000..6b16d39
Binary files /dev/null and b/data/skin_default/icons/input_rcnew-configured.png differ
diff --git a/data/skin_default/icons/input_rcnew.png b/data/skin_default/icons/input_rcnew.png
new file mode 100644 (file)
index 0000000..19cdeea
Binary files /dev/null and b/data/skin_default/icons/input_rcnew.png differ
diff --git a/data/skin_default/icons/input_rcold-configured.png b/data/skin_default/icons/input_rcold-configured.png
new file mode 100644 (file)
index 0000000..8d62685
Binary files /dev/null and b/data/skin_default/icons/input_rcold-configured.png differ
diff --git a/data/skin_default/icons/input_rcold.png b/data/skin_default/icons/input_rcold.png
new file mode 100644 (file)
index 0000000..ef8680b
Binary files /dev/null and b/data/skin_default/icons/input_rcold.png differ
diff --git a/data/skin_default/icons/network_wired-active.png b/data/skin_default/icons/network_wired-active.png
new file mode 100755 (executable)
index 0000000..d8efc9c
Binary files /dev/null and b/data/skin_default/icons/network_wired-active.png differ
diff --git a/data/skin_default/icons/network_wired-inactive.png b/data/skin_default/icons/network_wired-inactive.png
new file mode 100755 (executable)
index 0000000..18f2c70
Binary files /dev/null and b/data/skin_default/icons/network_wired-inactive.png differ
diff --git a/data/skin_default/icons/network_wired.png b/data/skin_default/icons/network_wired.png
new file mode 100755 (executable)
index 0000000..db695ad
Binary files /dev/null and b/data/skin_default/icons/network_wired.png differ
diff --git a/data/skin_default/icons/network_wireless-active.png b/data/skin_default/icons/network_wireless-active.png
new file mode 100755 (executable)
index 0000000..07a2187
Binary files /dev/null and b/data/skin_default/icons/network_wireless-active.png differ
diff --git a/data/skin_default/icons/network_wireless-inactive.png b/data/skin_default/icons/network_wireless-inactive.png
new file mode 100755 (executable)
index 0000000..5bd69f9
Binary files /dev/null and b/data/skin_default/icons/network_wireless-inactive.png differ
diff --git a/data/skin_default/icons/network_wireless.png b/data/skin_default/icons/network_wireless.png
new file mode 100755 (executable)
index 0000000..629a05a
Binary files /dev/null and b/data/skin_default/icons/network_wireless.png differ
diff --git a/doc/TPM b/doc/TPM
new file mode 100644 (file)
index 0000000..20c0230
--- /dev/null
+++ b/doc/TPM
@@ -0,0 +1,27 @@
+The TPM check is currently to be considered a beta version. So please expect
+code changes in the future.
+
+If you'd like to write your own plugins and honor the efforts, Dream Multimedia
+puts into developing Enigma 2, you can protect your plugin against execution
+on Non-Dream Multimedia Hardware by implementing a TPM (Trusted Platform Module)
+check into your plugin.
+For ease of use we provide a demo plugin in lib/python/Plugins/DemoPlugins/TPMDemo.
+
+The main TPM check is implemented into the "main" function. You need to provide
+this code yourself in your plugin. So copy&paste the code into your own as well
+as the needed functions
+- bin2long
+- long2bin
+- rsa_pub1024
+- decrypt_block
+- validate_cert
+- read_random
+Importing the functions from somewhere else would spoil the security model. So
+you need to provide the code with your plugin.
+You can either use the given method using the main function (which will run the
+TPM check each time the plugin is called) or directly use it in the
+Plugins(**kwargs) function and not return the Plugins-list if the TPM check failes
+(which will prevent the plugin from showing up at all). You can also implement
+a warning message for all possible TPM failure scenarios.
+  
index 6ea9d03..0508563 100644 (file)
@@ -8,5 +8,5 @@ libenigma_base_a_SOURCES = \
        init.cpp message.cpp thread.cpp \
        smartptr.cpp estring.cpp connection.cpp \
        filepush.cpp encoding.cpp console.cpp rawfile.cpp \
-       nconfig.cpp ioprio.cpp
+       nconfig.cpp ioprio.cpp etpm.cpp
 
index add8706..43f9f61 100644 (file)
@@ -516,18 +516,15 @@ eConsolePy_write(eConsolePy* self, PyObject *args)
 {
        int len;
        char *data;
-       if (PyArg_ParseTuple(args, "si", &data, &len))
-               ;
-       else
+       int ret = -1;
+       Py_ssize_t argc = PyTuple_Size(args);
+       if (argc > 1)
+               ret = PyArg_ParseTuple(args, "si", &data, &len);
+       else if (argc == 1)
        {
                PyObject *ob;
-               if (!PyArg_ParseTuple(args, "O", &ob) || !PyString_Check(ob))
-               {
-                       PyErr_SetString(PyExc_TypeError,
-                               "1st arg must be a string, optionaly 2nd arg can be the string length");
-                       return NULL;
-               }
-               else
+               ret = !PyArg_ParseTuple(args, "O", &ob) || !PyString_Check(ob);
+               if (!ret)
                {
                        Py_ssize_t length;
                        if (!PyString_AsStringAndSize(ob, &data, &length))
@@ -536,6 +533,12 @@ eConsolePy_write(eConsolePy* self, PyObject *args)
                                len = 0;
                }
        }
+       if (ret)
+       {
+               PyErr_SetString(PyExc_TypeError,
+                       "1st arg must be a string, optionaly 2nd arg can be the string length");
+               return NULL;
+       }
        self->cont->write(data, len);
        Py_RETURN_NONE;
 }
index c84f28b..700cce3 100644 (file)
@@ -165,7 +165,7 @@ void eMainloop::removeSocketNotifier(eSocketNotifier *sn)
                return;
        }
        for (i = notifiers.begin(); i != notifiers.end(); ++i)
-               eDebug("fd=%d, sn=%d", i->second->getFD(), (void*)i->second);
+               eDebug("fd=%d, sn=%p", i->second->getFD(), (void*)i->second);
        eFatal("removed socket notifier which is not present, fd=%d", fd);
 }
 
index e7dc2be..f2ac732 100644 (file)
@@ -424,7 +424,7 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                        break;
        }
 
-       bool useTwoCharMapping = !table || tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid);
+       bool useTwoCharMapping = !table || (tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid));
 
        if (useTwoCharMapping && table == 5) { // i hope this dont break other transponders which realy use ISO8859-5 and two char byte mapping...
 //             eDebug("Cyfra / Cyfrowy Polsat HACK... override given ISO8859-5 with ISO6397");
diff --git a/lib/base/etpm.cpp b/lib/base/etpm.cpp
new file mode 100644 (file)
index 0000000..c264272
--- /dev/null
@@ -0,0 +1,161 @@
+#include <sys/socket.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/un.h>
+#include <unistd.h>
+#include <openssl/bn.h>
+#include <openssl/sha.h>
+#include <lib/base/etpm.h>
+
+DEFINE_REF(eTPM);
+
+eTPM::eTPM()
+{
+       struct sockaddr_un addr;
+       unsigned char buf[8];
+       unsigned int tag, len;
+       unsigned char *val;
+
+       level2_cert_read = level3_cert_read = false;
+
+       addr.sun_family = AF_UNIX;
+       strcpy(addr.sun_path, TPMD_SOCKET);
+
+       fd = socket(PF_UNIX, SOCK_STREAM, 0);
+       if (fd < 0) {
+               eDebug("[eTPM] socket error");
+               return;
+       }
+
+       if (connect(fd, (const struct sockaddr *)&addr, SUN_LEN(&addr)) < 0) {
+               eDebug("[eTPM] connect error");
+               return;
+       }
+
+       buf[0] = TPMD_DT_LEVEL2_CERT;
+       buf[1] = TPMD_DT_LEVEL3_CERT;
+       if (!send_cmd(TPMD_CMD_GET_DATA, buf, 2))
+       {
+               return;
+       }
+
+       val = (unsigned char*)recv_cmd(&tag, &len);
+       if (val == NULL)
+       {
+               return;
+       }
+
+       parse_data(val, len);
+       free(val);
+}
+
+eTPM::~eTPM()
+{
+
+}
+
+bool eTPM::send_cmd(enum tpmd_cmd cmd, const void *data, unsigned int len)
+{
+       unsigned char buf[len + 4];
+
+       buf[0] = (cmd >> 8) & 0xff;
+       buf[1] = (cmd >> 0) & 0xff;
+       buf[2] = (len >> 8) & 0xff;
+       buf[3] = (len >> 0) & 0xff;
+       memcpy(&buf[4], data, len);
+
+       if (write(fd, buf, sizeof(buf)) != (ssize_t)sizeof(buf)) {
+               fprintf(stderr, "%s: incomplete write\n", __func__);
+               return false;
+       }
+
+       return true;
+}
+
+void* eTPM::recv_cmd(unsigned int *tag, unsigned int *len)
+{
+       unsigned char buf[4];
+       void *val;
+
+       if (read(fd, buf, 4) != 4) {
+               fprintf(stderr, "%s: incomplete read\n", __func__);
+               return NULL;
+       }
+
+       *tag = (buf[0] << 8) | buf[1];
+       *len = (buf[2] << 8) | buf[3];
+
+       val = malloc(*len);
+       if (val == NULL)
+               return NULL;
+
+       if (read(fd, val, *len) != (ssize_t)*len) {
+               fprintf(stderr, "%s: incomplete read\n", __func__);
+               free(val);
+               return NULL;
+       }
+
+       return val;
+}
+
+void eTPM::parse_data(const unsigned char *data, unsigned int datalen)
+{
+       unsigned int i;
+       unsigned int tag;
+       unsigned int len;
+       const unsigned char *val;
+
+       for (i = 0; i < datalen; i += len) {
+               tag = data[i++];
+               len = data[i++];
+               val = &data[i];
+
+               switch (tag) {
+               case TPMD_DT_LEVEL2_CERT:
+                       if (len != 210)
+                               break;
+                       memcpy(level2_cert, val, 210);
+                       level2_cert_read = true;
+                       break;
+               case TPMD_DT_LEVEL3_CERT:
+                       if (len != 210)
+                               break;
+                       memcpy(level3_cert, val, 210);
+                       level3_cert_read = true;
+                       break;
+               }
+       }
+}
+
+PyObject *eTPM::getCert(cert_type type)
+{
+       if (type == TPMD_DT_LEVEL2_CERT && level2_cert_read)
+               return PyBuffer_FromMemory(level2_cert, 210);
+       else if (type == TPMD_DT_LEVEL3_CERT && level3_cert_read)
+               return PyBuffer_FromMemory(level3_cert, 210);
+       return Py_None;
+
+}
+
+PyObject *eTPM::challenge(PyObject* rnd)
+{
+       if (PyString_Check(rnd) && PyString_Size(rnd) == 8)
+       {
+               char* buf = PyString_AsString(rnd);
+               if (!send_cmd(TPMD_CMD_COMPUTE_SIGNATURE, buf, 8))
+                       return Py_None;
+
+               unsigned int tag, len;
+               unsigned char *val = (unsigned char*)recv_cmd(&tag, &len);
+
+               if (tag != TPMD_CMD_COMPUTE_SIGNATURE)
+                       return Py_None;
+
+               return PyBuffer_FromMemory(val, len);
+       }
+       else
+               return Py_None;
+}
diff --git a/lib/base/etpm.h b/lib/base/etpm.h
new file mode 100644 (file)
index 0000000..3728249
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef __lib_base_etpm_h
+#define __lib_base_etpm_h
+
+#include <lib/base/object.h>
+#include <lib/python/python.h>
+
+#ifndef SWIG
+#define TPMD_SOCKET "/var/run/tpmd_socket"
+#endif
+
+class eTPM: public Object, public iObject
+{
+       DECLARE_REF(eTPM);
+#ifndef SWIG
+       int fd;
+       unsigned char level2_cert[210];
+       unsigned char level3_cert[210];
+       bool level2_cert_read;
+       bool level3_cert_read;
+
+       enum tpmd_cmd {
+               TPMD_CMD_RESERVED               = 0x0000,
+               TPMD_CMD_GET_DATA               = 0x0001,
+               TPMD_CMD_APDU                   = 0x0002,
+               TPMD_CMD_COMPUTE_SIGNATURE      = 0x0003,
+               TPMD_CMD_APP_CERT               = 0x0004,
+       };
+
+       bool send_cmd(enum tpmd_cmd cmd, const void *data, unsigned int len);
+       void *recv_cmd(unsigned int *tag, unsigned int *len);
+       void parse_data(const unsigned char *data, unsigned int datalen);
+
+#endif
+public:
+       eTPM();
+       ~eTPM();
+
+       enum cert_type {
+               TPMD_DT_LEVEL2_CERT = 0x04,
+               TPMD_DT_LEVEL3_CERT = 0x05
+       };
+       PyObject *getCert(cert_type type);
+       PyObject *challenge(PyObject *rnd);
+};
+
+#endif // __lib_base_etpm_h
index 688f1a1..40d4418 100644 (file)
@@ -1659,6 +1659,18 @@ void eDVBChannel::SDTready(int result)
        m_SDT = 0;
 }
 
+int eDVBChannel::reserveDemux()
+{
+       ePtr<iDVBDemux> dmx;
+       if (!getDemux(dmx, 0))
+       {
+               uint8_t id;
+               if (!dmx->getCADemuxID(id))
+                       return id;
+       }
+       return -1;
+}
+
 RESULT eDVBChannel::requestTsidOnid(ePyObject callback)
 {
        if (PyCallable_Check(callback))
index 9573bd4..fb92580 100644 (file)
@@ -268,6 +268,7 @@ public:
        int getUseCount() { return m_use_count; }
 
        RESULT requestTsidOnid(ePyObject callback);
+       int reserveDemux();
 private:
        ePtr<eDVBAllocatedFrontend> m_frontend;
        ePtr<eDVBAllocatedDemux> m_demux, m_decoder_demux;
index bc3a88d..519b5fe 100644 (file)
@@ -1053,6 +1053,7 @@ static void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &
        case FEC_AUTO: tmp = eDVBFrontendParametersSatellite::FEC_Auto; break;
        default: eDebug("got unsupported FEC from frontend! report as FEC_AUTO!\n");
        }
+       PutToDict(dict, "fec_inner", tmp);
 
        switch (p[0].u.data)
        {
@@ -1101,7 +1102,7 @@ static void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &
        PutToDict(dict, "orbital_position", orb_pos);
        PutToDict(dict, "polarization", polarization);
 
-       switch(parm_u_qpsk_fec_inner)
+       switch((int)parm_u_qpsk_fec_inner)
        {
        case FEC_1_2: tmp = eDVBFrontendParametersSatellite::FEC_1_2; break;
        case FEC_2_3: tmp = eDVBFrontendParametersSatellite::FEC_2_3; break;
@@ -1435,9 +1436,11 @@ int eDVBFrontend::readInputpower()
                return 0;
        int power=m_slotid;  // this is needed for read inputpower from the correct tuner !
        char proc_name[64];
-       sprintf(proc_name, "/proc/stb/fp/lnb_sense%d", m_slotid);
-       FILE *f=fopen(proc_name, "r");
-       if (f)
+       char proc_name2[64];
+       sprintf(proc_name, "/proc/stb/frontend/%d/lnb_sense", m_slotid);
+       sprintf(proc_name2, "/proc/stb/fp/lnb_sense%d", m_slotid);
+       FILE *f;
+       if ((f=fopen(proc_name, "r")) || (f=fopen(proc_name2, "r")))
        {
                if (fscanf(f, "%d", &power) != 1)
                        eDebug("read %s failed!! (%m)", proc_name);
index d20829b..996d790 100644 (file)
@@ -508,6 +508,7 @@ public:
                /* direct frontend access for raw channels and/or status inquiries. */
        virtual SWIG_VOID(RESULT) getFrontend(ePtr<iDVBFrontend> &SWIG_OUTPUT)=0;
        virtual RESULT requestTsidOnid(SWIG_PYOBJECT(ePyObject) callback) { return -1; }
+       virtual int reserveDemux() { return -1; }
 #ifndef SWIG
        enum
        {
index 6688a3d..a5db43a 100644 (file)
@@ -346,6 +346,8 @@ int eTextPara::appendGlyph(Font *current_font, FT_Face current_face, FT_UInt gly
                                i->x-=offset.x();
                                i->y-=offset.y();
                                i->bbox.moveBy(-offset.x(), -offset.y());
+                               --lineChars.back();
+                               ++charCount;
                        } while (i-- != glyphs.rbegin()); // rearrange them into the next line
                        cursor+=ePoint(linelength, 0);  // put the cursor after that line
                } else
@@ -383,6 +385,7 @@ int eTextPara::appendGlyph(Font *current_font, FT_Face current_face, FT_UInt gly
        ng.glyph_index = glyphIndex;
        ng.flags = flags;
        glyphs.push_back(ng);
+       ++charCount;
 
                /* when we have a SHY, don't xadvance. It will either be the last in the line (when used for breaking), or not displayed. */
        if (!(flags & GS_SOFTHYPHEN))
@@ -430,7 +433,13 @@ void eTextPara::newLine(int flags)
        cursor.setX(left);
        previous=0;
        int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
+
+       lineOffsets.push_back(cursor.y());
+       lineChars.push_back(charCount);
+       charCount=0;
+
        cursor+=ePoint(0, (current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap)>>6);
+
        if (maximum.height()<cursor.y())
                maximum.setHeight(cursor.y());
        previous=0;
@@ -600,22 +609,20 @@ int eTextPara::renderString(const char *string, int rflags)
        shape(uc_shape, uc_string);
        
                // now do the usual logical->visual reordering
-#ifdef HAVE_FRIBIDI    
+       int size=uc_shape.size();
+#ifdef HAVE_FRIBIDI
        FriBidiCharType dir=FRIBIDI_TYPE_ON;
-       {
-               int size=uc_shape.size();
-               uc_visual.resize(size);
-               // gaaanz lahm, aber anders geht das leider nicht, sorry.
-               FriBidiChar array[size], target[size];
-               std::copy(uc_shape.begin(), uc_shape.end(), array);
-               fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
-               uc_visual.assign(target, target+size);
-       }
+       uc_visual.resize(size);
+       // gaaanz lahm, aber anders geht das leider nicht, sorry.
+       FriBidiChar array[size], target[size];
+       std::copy(uc_shape.begin(), uc_shape.end(), array);
+       fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
+       uc_visual.assign(target, target+size);
 #else
        uc_visual=uc_shape;
 #endif
 
-       glyphs.reserve(uc_visual.size());
+       glyphs.reserve(size);
        
        int nextflags = 0;
        
@@ -709,8 +716,19 @@ nprint:    isprintable=0;
        calc_bbox();
 #ifdef HAVE_FRIBIDI
        if (dir & FRIBIDI_MASK_RTL)
+       {
                realign(dirRight);
+               doTopBottomReordering=true;
+       }
 #endif
+
+       if (charCount)
+       {
+               lineOffsets.push_back(cursor.y());
+               lineChars.push_back(charCount);
+               charCount=0;
+       }
+
        return 0;
 }
 
@@ -825,11 +843,21 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons
        gRegion clip = dc.getClip() & area;
 
        int buffer_stride=surface->stride;
-       
+
        for (unsigned int c = 0; c < clip.rects.size(); ++c)
        {
-               for (glyphString::iterator i(glyphs.begin()); i != glyphs.end(); ++i)
+               std::list<int>::reverse_iterator line_offs_it(lineOffsets.rbegin());
+               std::list<int>::iterator line_chars_it(lineChars.begin());
+               int line_offs=0;
+               int line_chars=0;
+               for (glyphString::iterator i(glyphs.begin()); i != glyphs.end(); ++i, --line_chars)
                {
+                       while(!line_chars)
+                       {
+                               line_offs = *(line_offs_it++);
+                               line_chars = *(line_chars_it++);
+                       }
+
                        if (i->flags & GS_SOFTHYPHEN)
                                continue;
 
@@ -844,13 +872,13 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons
                                lookup16 = lookup16_invert;
                                lookup32 = lookup32_invert;
                        }
-               
+
                        static FTC_SBit glyph_bitmap;
                        if (fontRenderClass::instance->getGlyphBitmap(&i->font->font, i->glyph_index, &glyph_bitmap))
                                continue;
                        int rx=i->x+glyph_bitmap->left + offset.x();
-                       int ry=i->y-glyph_bitmap->top  + offset.y();
-               
+                       int ry=(doTopBottomReordering ? line_offs : i->y) - glyph_bitmap->top + offset.y();
+
                        __u8 *d=(__u8*)(surface->data)+buffer_stride*ry+rx*surface->bypp;
                        __u8 *s=glyph_bitmap->buffer;
                        register int sx=glyph_bitmap->width;
index 2643fda..7dd9f89 100644 (file)
@@ -14,6 +14,7 @@ typedef FTC_ImageTypeRec FTC_Image_Desc;
 typedef FTC_SBitCache FTC_SBit_Cache;
 #endif
 #include <vector>
+#include <list>
 
 #include <lib/gdi/fb.h>
 #include <lib/gdi/esize.h>
@@ -113,6 +114,10 @@ class eTextPara: public iObject
        eSize maximum;
        int left;
        glyphString glyphs;
+       std::list<int> lineOffsets;
+       std::list<int> lineChars;
+       int charCount;
+       bool doTopBottomReordering;
 
        int appendGlyph(Font *current_font, FT_Face current_face, FT_UInt glyphIndex, int flags, int rflags);
        void newLine(int flags);
@@ -120,10 +125,12 @@ class eTextPara: public iObject
        eRect boundBox;
        void calc_bbox();
        int bboxValid;
+       void clear();
 public:
        eTextPara(eRect area, ePoint start=ePoint(-1, -1))
-               : current_font(0), replacement_font(0), current_face(0), replacement_face(0),
-                       area(area), cursor(start), maximum(0, 0), left(start.x()), bboxValid(0)
+               :current_font(0), replacement_font(0), current_face(0), replacement_face(0)
+               ,area(area), cursor(start), maximum(0, 0), left(start.x()), charCount(0)
+               ,doTopBottomReordering(false), bboxValid(0)
        {
        }
        virtual ~eTextPara();
@@ -134,7 +141,7 @@ public:
        void setFont(const gFont *font);
        int renderString(const char *string, int flags=0);
 
-       void clear();
+
 
        void blit(gDC &dc, const ePoint &offset, const gRGB &background, const gRGB &foreground);
 
index ae0477b..a7dc22d 100644 (file)
@@ -56,7 +56,9 @@ eDBoxLCD::eDBoxLCD()
        lcdfd = open("/dev/dbox/oled0", O_RDWR);
        if (lcdfd < 0)
        {
-               FILE *f=fopen("/proc/stb/fp/oled_brightness", "w");
+               FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
+               if (!f)
+                       f = fopen("/proc/stb/fp/oled_brightness", "w");
                if (f)
                {
                        is_oled = 2;
@@ -133,11 +135,13 @@ int eDBoxLCD::setLCDContrast(int contrast)
 int eDBoxLCD::setLCDBrightness(int brightness)
 {
        eDebug("setLCDBrightness %d", brightness);
-       FILE *f=fopen("/proc/stb/fp/oled_brightness", "w");
+       FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
+       if (!f)
+               f = fopen("/proc/stb/fp/oled_brightness", "w");
        if (f)
        {
                if (fprintf(f, "%d", brightness) == 0)
-                       eDebug("write /proc/stb/fp/oled_brightness failed!! (%m)");
+                       eDebug("write /proc/stb/lcd/oled_brightness failed!! (%m)");
                fclose(f);
        }
        else
index 1208c97..73d9ac2 100644 (file)
@@ -428,7 +428,7 @@ void gRegion::moveBy(ePoint offset)
 
 void gRegion::scale(int x_n, int x_d, int y_n, int y_d)
 {
-       int i;
+       unsigned int i;
        for (i=0; i<rects.size(); ++i)
                rects[i].scale(x_n, x_d, y_n, y_d);
 }
index a65df2e..1c671fa 100644 (file)
@@ -343,7 +343,6 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
                if (PyTuple_Check(item))
                {
                                /* handle left part. get item from tuple, convert to string, display. */
-
                        text = PyTuple_GET_ITEM(item, 0);
                        text = PyObject_Str(text); /* creates a new object - old object was borrowed! */
                        const char *string = (text && PyString_Check(text)) ? PyString_AsString(text) : "<not-a-string>";
@@ -357,7 +356,9 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
                        int value_alignment_left = !*string;
 
                                /* now, handle the value. get 2nd part from tuple*/
-                       value = PyTuple_GET_ITEM(item, 1);
+                       if (PyTuple_Size(item) >= 2) // when no 2nd entry is in tuple this is a non selectable entry without config part
+                               value = PyTuple_GET_ITEM(item, 1);
+
                        if (value)
                        {
                                ePyObject args = PyTuple_New(1);
@@ -468,7 +469,7 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
                                        }
                                }
                                        /* type is borrowed */
-                       } else
+                       } else if (value)
                                eWarning("eListboxPythonConfigContent: second value of tuple is not a tuple.");
                        if (value)
                                Py_DECREF(value);
@@ -515,7 +516,7 @@ void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update)
                m_listbox->entryChanged(m_cursor);
 }
 
-static void clearRegionHelper(gPainter &painter, eListboxStyle *local_style, const ePoint &offset, ePyObject &pbackColor, bool cursorValid)
+static void clearRegionHelper(gPainter &painter, eListboxStyle *local_style, const ePoint &offset, ePyObject &pbackColor, bool cursorValid, bool clear=true)
 {
        if (pbackColor)
        {
@@ -537,10 +538,11 @@ static void clearRegionHelper(gPainter &painter, eListboxStyle *local_style, con
                else if (local_style->m_transparent_background)
                        return;
        }
-       painter.clear();
+       if (clear)
+               painter.clear();
 }
 
-static void clearRegionSelectedHelper(gPainter &painter, eListboxStyle *local_style, const ePoint &offset, ePyObject &pbackColorSelected, bool cursorValid)
+static void clearRegionSelectedHelper(gPainter &painter, eListboxStyle *local_style, const ePoint &offset, ePyObject &pbackColorSelected, bool cursorValid, bool clear=true)
 {
        if (pbackColorSelected)
        {
@@ -560,10 +562,11 @@ static void clearRegionSelectedHelper(gPainter &painter, eListboxStyle *local_st
                        return;
                }
        }
-       painter.clear();
+       if (clear)
+               painter.clear();
 }
 
-static void clearRegion(gPainter &painter, eWindowStyle &style, eListboxStyle *local_style, ePyObject pforeColor, ePyObject pforeColorSelected, ePyObject pbackColor, ePyObject pbackColorSelected, int selected, gRegion &rc, eRect &sel_clip, const ePoint &offset, bool cursorValid)
+static void clearRegion(gPainter &painter, eWindowStyle &style, eListboxStyle *local_style, ePyObject pforeColor, ePyObject pforeColorSelected, ePyObject pbackColor, ePyObject pbackColorSelected, int selected, gRegion &rc, eRect &sel_clip, const ePoint &offset, bool cursorValid, bool clear=true)
 {
        if (selected && sel_clip.valid())
        {
@@ -572,7 +575,7 @@ static void clearRegion(gPainter &painter, eWindowStyle &style, eListboxStyle *l
                {
                        painter.clip(part);
                        style.setStyle(painter, eWindowStyle::styleListboxNormal);
-                       clearRegionHelper(painter, local_style, offset, pbackColor, cursorValid);
+                       clearRegionHelper(painter, local_style, offset, pbackColor, cursorValid, clear);
                        painter.clippop();
                        selected = 0;
                }
@@ -581,7 +584,7 @@ static void clearRegion(gPainter &painter, eWindowStyle &style, eListboxStyle *l
                {
                        painter.clip(part);
                        style.setStyle(painter, eWindowStyle::styleListboxSelected);
-                       clearRegionSelectedHelper(painter, local_style, offset, pbackColorSelected, cursorValid);
+                       clearRegionSelectedHelper(painter, local_style, offset, pbackColorSelected, cursorValid, clear);
                        painter.clippop();
                        selected = 1;
                }
@@ -589,14 +592,14 @@ static void clearRegion(gPainter &painter, eWindowStyle &style, eListboxStyle *l
        else if (selected)
        {
                style.setStyle(painter, eWindowStyle::styleListboxSelected);
-               clearRegionSelectedHelper(painter, local_style, offset, pbackColorSelected, cursorValid);
+               clearRegionSelectedHelper(painter, local_style, offset, pbackColorSelected, cursorValid, clear);
                if (local_style && local_style->m_selection)
                        painter.blit(local_style->m_selection, offset, eRect(), gPainter::BT_ALPHATEST);
        }
        else
        {
                style.setStyle(painter, eWindowStyle::styleListboxNormal);
-               clearRegionHelper(painter, local_style, offset, pbackColor, cursorValid);
+               clearRegionHelper(painter, local_style, offset, pbackColor, cursorValid, clear);
        }
 
        if (selected)
@@ -819,7 +822,8 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
 
                                {
                                        gRegion rc(rect);
-                                       clearRegion(painter, style, local_style, pforeColor, pforeColorSelected, pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid);
+                                       bool mustClear = (selected && pbackColorSelected) || (!selected && pbackColor);
+                                       clearRegion(painter, style, local_style, pforeColor, pforeColorSelected, pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid, mustClear);
                                }
 
                                painter.setFont(m_font[fnt]);
@@ -922,7 +926,8 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
 
                                {
                                        gRegion rc(rect);
-                                       clearRegion(painter, style, local_style, pforeColor, pforeColorSelected, pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid);
+                                       bool mustClear = (selected && pbackColorSelected) || (!selected && pbackColor);
+                                       clearRegion(painter, style, local_style, pforeColor, pforeColorSelected, pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid, mustClear);
                                }
 
                                // border
@@ -996,7 +1001,8 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
 
                                {
                                        gRegion rc(rect);
-                                       clearRegion(painter, style, local_style, ePyObject(), ePyObject(), pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid);
+                                       bool mustClear = (selected && pbackColorSelected) || (!selected && pbackColor);
+                                       clearRegion(painter, style, local_style, ePyObject(), ePyObject(), pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid, mustClear);
                                }
 
                                painter.blit(pixmap, rect.topLeft(), rect, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : (type == TYPE_PIXMAP_ALPHABLEND) ? gPainter::BT_ALPHABLEND : 0);
old mode 100644 (file)
new mode 100755 (executable)
index 8e332e3..6b322c9
@@ -1,5 +1,6 @@
 from Tools.Directories import resolveFilename, SCOPE_SYSETC
 from enigma import getEnigmaVersionString
+from os import popen
 
 class About:
        def __init__(self):
@@ -43,4 +44,14 @@ class About:
        def getEnigmaVersionString(self):
                return getEnigmaVersionString()
 
+       def getKernelVersionString(self):
+               try:
+                       result = popen("uname -r","r").read().strip("\n").split('-')
+                       kernel_version = result[0]
+                       return kernel_version
+               except:
+                       pass
+
+               return "unknown"
+
 about = About()
old mode 100644 (file)
new mode 100755 (executable)
index b5a9844..b1d89f5
@@ -53,14 +53,18 @@ class TemplatedMultiContent(StringList):
                        template = self.template.get("template")
                        itemheight = self.template["itemHeight"]
                        selectionEnabled = self.template.get("selectionEnabled", True)
+                       scrollbarMode = self.template.get("scrollbarMode", "showOnDemand")
 
                        if templates and style and style in templates: # if we have a custom style defined in the source, and different templates in the skin, look it up
                                template = templates[style][1]
                                itemheight = templates[style][0]
                                if len(templates[style]) > 2:
                                        selectionEnabled = templates[style][2]
+                               if len(templates[style]) > 3:
+                                       scrollbarMode = templates[style][3]
 
                        self.content.setTemplate(template)
                        self.content.setItemHeight(itemheight)
                        self.selectionEnabled = selectionEnabled
+                       self.scrollbarMode = scrollbarMode
                        self.active_style = style
index 85e2b53..03d5215 100755 (executable)
@@ -16,7 +16,7 @@ class InfoHandlerParseError(Exception):
                return repr(self.value)
 
 class InfoHandler(xml.sax.ContentHandler):
-       def __init__(self, prerequisiteMet, directory, language = None):
+       def __init__(self, prerequisiteMet, directory):
                self.attributes = {}
                self.directory = directory
                self.list = []
@@ -26,9 +26,6 @@ class InfoHandler(xml.sax.ContentHandler):
                self.validFileTypes = ["skin", "config", "services", "favourites", "package"]
                self.prerequisitesMet = prerequisiteMet
                self.data = ""
-               self.language = language
-               self.translatedPackageInfos = {}
-               self.foundTranslation = None
 
        def printError(self, error):
                print "Error in defaults xml files:", error
@@ -52,15 +49,6 @@ class InfoHandler(xml.sax.ContentHandler):
                if name == "info":
                        self.foundTranslation = None
                        self.data = ""
-                       if not attrs.has_key("language"):
-                                       print "info tag with no language attribute"
-                       else:
-                               if attrs["language"] == 'en': # read default translations
-                                       self.foundTranslation = False
-                                       self.data = ""
-                               elif attrs["language"] == self.language:
-                                       self.foundTranslation = True
-                                       self.data = ""
 
                if name == "files":
                        if attrs.has_key("type"):
@@ -91,20 +79,17 @@ class InfoHandler(xml.sax.ContentHandler):
                        if attrs.has_key("details"):
                                self.attributes["details"] = str(attrs["details"])
                        if attrs.has_key("name"):
-                               self.attributes["name"] = str(attrs["name"].encode("utf-8"))
+                               self.attributes["name"] = str(attrs["name"])
                        if attrs.has_key("packagename"):
-                               self.attributes["packagename"] = str(attrs["packagename"].encode("utf-8"))
+                               self.attributes["packagename"] = str(attrs["packagename"])
                        if attrs.has_key("packagetype"):
-                               self.attributes["packagetype"] = str(attrs["packagetype"].encode("utf-8"))
+                               self.attributes["packagetype"] = str(attrs["packagetype"])
                        if attrs.has_key("shortdescription"):
-                               self.attributes["shortdescription"] = str(attrs["shortdescription"].encode("utf-8"))
+                               self.attributes["shortdescription"] = str(attrs["shortdescription"])
 
                if name == "screenshot":
                        if attrs.has_key("src"):
-                               if self.foundTranslation is False:
-                                       self.attributes["screenshot"] = str(attrs["src"])
-                               elif self.foundTranslation is True:
-                                       self.translatedPackageInfos["screenshot"] = str(attrs["src"])
+                               self.attributes["screenshot"] = str(attrs["src"])
 
        def endElement(self, name):
                #print "endElement", name
@@ -124,7 +109,7 @@ class InfoHandler(xml.sax.ContentHandler):
                                self.attributes[self.filetype].append({ "name": str(self.fileattrs["name"]), "directory": directory })
 
                if name in ( "default", "package" ):
-                       self.list.append({"attributes": self.attributes, 'prerequisites': self.globalprerequisites ,"translation": self.translatedPackageInfos})
+                       self.list.append({"attributes": self.attributes, 'prerequisites': self.globalprerequisites})
                        self.attributes = {}
                        self.globalprerequisites = {}
 
@@ -133,30 +118,13 @@ class InfoHandler(xml.sax.ContentHandler):
                        self.attributes["author"] = str(data)
                if self.elements[-1] == "name":
                        self.attributes["name"] = str(data)
-               if self.foundTranslation is False:
-                       if self.elements[-1] == "author":
-                               self.attributes["author"] = str(data)
-                       if self.elements[-1] == "name":
-                               self.attributes["name"] = str(data)
-                       if self.elements[-1] == "packagename":
-                               self.attributes["packagename"] = str(data.encode("utf-8"))
-                       if self.elements[-1] == "shortdescription":
-                               self.attributes["shortdescription"] = str(data.encode("utf-8"))
-                       if self.elements[-1] == "description":
-                               self.data += data.strip()
-                               self.attributes["description"] = str(self.data.encode("utf-8"))
-               elif self.foundTranslation is True:
-                       if self.elements[-1] == "author":
-                               self.translatedPackageInfos["author"] = str(data)
-                       if self.elements[-1] == "name":
-                               self.translatedPackageInfos["name"] = str(data)
-                       if self.elements[-1] == "description":
-                               self.data += data.strip()
-                               self.translatedPackageInfos["description"] = str(self.data.encode("utf-8"))
-                       if self.elements[-1] == "name":
-                               self.translatedPackageInfos["name"] = str(data.encode("utf-8"))
-                       if self.elements[-1] == "shortdescription":
-                               self.translatedPackageInfos["shortdescription"] = str(data.encode("utf-8"))
+               if self.elements[-1] == "packagename":
+                       self.attributes["packagename"] = str(data)
+               if self.elements[-1] == "shortdescription":
+                       self.attributes["shortdescription"] = str(data)
+               if self.elements[-1] == "description":
+                       self.data += data.strip()
+                       self.attributes["description"] = str(self.data)
                #print "characters", data
 
 
@@ -166,13 +134,12 @@ class DreamInfoHandler:
        STATUS_ERROR = 2
        STATUS_INIT = 4
 
-       def __init__(self, statusCallback, blocking = False, neededTag = None, neededFlag = None, language = None):
+       def __init__(self, statusCallback, blocking = False, neededTag = None, neededFlag = None):
                self.hardware_info = HardwareInfo()
                self.directory = "/"
 
                self.neededTag = neededTag
                self.neededFlag = neededFlag
-               self.language = language
 
                # caution: blocking should only be used, if further execution in enigma2 depends on the outcome of
                # the installer!
@@ -203,8 +170,8 @@ class DreamInfoHandler:
                #print handler.list
 
        def readIndex(self, directory, file):
-               print "Reading .xml meta index file", file
-               handler = InfoHandler(self.prerequisiteMet, directory, self.language)
+               print "Reading .xml meta index file", directory, file
+               handler = InfoHandler(self.prerequisiteMet, directory)
                try:
                        xml.sax.parse(file, handler)
                        for entry in handler.list:
@@ -216,7 +183,7 @@ class DreamInfoHandler:
        def readDetails(self, directory, file):
                self.packageDetails = []
                print "Reading .xml meta details file", file
-               handler = InfoHandler(self.prerequisiteMet, directory, self.language)
+               handler = InfoHandler(self.prerequisiteMet, directory)
                try:
                        xml.sax.parse(file, handler)
                        for entry in handler.list:
@@ -225,7 +192,6 @@ class DreamInfoHandler:
                        print "file", file, "ignored due to errors in the file"
                #print handler.list
 
-
        # prerequisites = True: give only packages matching the prerequisites
        def fillPackagesList(self, prerequisites = True):
                self.packageslist = []
@@ -254,20 +220,16 @@ class DreamInfoHandler:
                        self.directory = [self.directory]
 
                for indexfile in os.listdir(self.directory[0]):
-                       if indexfile.startswith("index"):
-                               if indexfile.endswith("_en.xml"): #we first catch all english indexfiles
-                                       indexfileList.append(os.path.splitext(indexfile)[0][:-3])
-
+                       if indexfile.startswith("index-"):
+                               if indexfile.endswith(".xml"):
+                                       if indexfile[-7:-6] == "_":
+                                               continue
+                                       indexfileList.append(indexfile)
                if len(indexfileList):
                        for file in indexfileList:
                                neededFile = self.directory[0] + "/" + file
-                               if self.language is not None:
-                                       if os.path.exists(neededFile + '_' + self.language + '.xml' ):
-                                               #print "translated index file found",neededFile + '_' + self.language + '.xml'
-                                               self.readIndex(self.directory[0] + "/", neededFile + '_' + self.language + '.xml')
-                                       else:
-                                               #print "reading original index file"
-                                               self.readIndex(self.directory[0] + "/", neededFile + '_en.xml')
+                               if os.path.isfile(neededFile):
+                                       self.readIndex(self.directory[0] + "/" , neededFile)
 
                if prerequisites:
                        for package in self.packagesIndexlist[:]:
old mode 100644 (file)
new mode 100755 (executable)
index 3c3bd7a..d675ca3
-from config import config, ConfigSlider, ConfigSubsection
+# coding: utf-8
+from config import config, configfile, ConfigSlider, ConfigSubsection, ConfigYesNo, ConfigText
+
+import struct, sys, time, errno
+from fcntl import ioctl
+from os import path as os_path, listdir, open as os_open, close as os_close, write as os_write, read as os_read, O_RDWR, O_NONBLOCK
+
+# asm-generic/ioctl.h
+IOC_NRBITS = 8L
+IOC_TYPEBITS = 8L
+IOC_SIZEBITS = 13L
+IOC_DIRBITS = 3L
+
+IOC_NRSHIFT = 0L
+IOC_TYPESHIFT = IOC_NRSHIFT+IOC_NRBITS
+IOC_SIZESHIFT = IOC_TYPESHIFT+IOC_TYPEBITS
+IOC_DIRSHIFT = IOC_SIZESHIFT+IOC_SIZEBITS
+
+IOC_READ = 2L
+
+def EVIOCGNAME(length):
+       return (IOC_READ<<IOC_DIRSHIFT)|(length<<IOC_SIZESHIFT)|(0x45<<IOC_TYPESHIFT)|(0x06<<IOC_NRSHIFT)
+
 
 class inputDevices:
+
+       def __init__(self):
+               self.Devices = {}
+               self.currentDevice = ""
+               self.getInputDevices()
+       
+       def getInputDevices(self):
+               devices = listdir("/dev/input/")
+
+               for evdev in devices:
+                       try:
+                               buffer = "\0"*512
+                               self.fd = os_open("/dev/input/" + evdev, O_RDWR | O_NONBLOCK)
+                               self.name = ioctl(self.fd, EVIOCGNAME(256), buffer)
+                               self.name = self.name[:self.name.find("\0")]
+                               os_close(self.fd)
+                       except (IOError,OSError), err:
+                               print '[iInputDevices] getInputDevices  <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >'
+                               self.name = None
+                       
+                       if self.name:
+                               if self.name == 'dreambox front panel':
+                                       continue
+                               if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value != 0:
+                                       continue
+                               if self.name == "dreambox remote control (native)" and config.misc.rcused.value == 0:
+                                       continue
+                               self.Devices[evdev] = {'name': self.name, 'type': self.getInputDeviceType(self.name),'enabled': False, 'configuredName': None }
+       
+
+       def getInputDeviceType(self,name):
+               if name.find("remote control") != -1:
+                       return "remote"
+               elif name.find("keyboard") != -1:
+                       return "keyboard"
+               elif name.find("mouse") != -1:
+                       return "mouse"
+               else:
+                       print "Unknown device type:",name
+                       return None
+                       
+       def getDeviceName(self, x):
+               if x in self.Devices.keys():
+                       return self.Devices[x].get("name", x)
+               else:
+                       return "Unknown device name"
+
+       def getDeviceList(self):
+               return sorted(self.Devices.iterkeys())
+
+       def getDefaultRCdeviceName(self):
+               if config.misc.rcused.value == 0:
+                       for device in self.Devices.iterkeys():
+                               if self.Devices[device]["name"] == "dreambox advanced remote control (native)":
+                                       return device
+               else:
+                       for device in self.Devices.iterkeys():
+                               if self.Devices[device]["name"] == "dreambox remote control (native)":
+                                       return device
+
+       def setDeviceAttribute(self, device, attribute, value):
+               #print "[iInputDevices] setting for device", device, "attribute", attribute, " to value", value
+               if self.Devices.has_key(device):
+                       self.Devices[device][attribute] = value
+                       
+       def getDeviceAttribute(self, device, attribute):
+               if self.Devices.has_key(device):
+                       if self.Devices[device].has_key(attribute):
+                               return self.Devices[device][attribute]
+               return None
+                       
+       def setEnabled(self, device, value):
+               oldval = self.getDeviceAttribute(device, 'enabled')
+               #print "[iInputDevices] setEnabled for device %s to %s from %s" % (device,value,oldval)
+               self.setDeviceAttribute(device, 'enabled', value)
+               if oldval is True and value is False:
+                       self.setDefaults(device)
+
+       def setName(self, device, value):
+               #print "[iInputDevices] setName for device %s to %s" % (device,value)
+               self.setDeviceAttribute(device, 'configuredName', value)
+               
+       #struct input_event {
+       #       struct timeval time;    -> ignored
+       #       __u16 type;             -> EV_REP (0x14)
+       #       __u16 code;             -> REP_DELAY (0x00) or REP_PERIOD (0x01)
+       #       __s32 value;            -> DEFAULTS: 700(REP_DELAY) or 100(REP_PERIOD)
+       #}; -> size = 16
+
+       def setDefaults(self, device):
+               print "[iInputDevices] setDefaults for device %s" % (device)
+               self.setDeviceAttribute(device, 'configuredName', None)
+               event_repeat = struct.pack('iihhi', 0, 0, 0x14, 0x01, 100)
+               event_delay = struct.pack('iihhi', 0, 0, 0x14, 0x00, 700)
+               fd = os_open("/dev/input/" + device, O_RDWR)
+               os_write(fd, event_repeat)
+               os_write(fd, event_delay)
+               os_close(fd)
+
+       def setRepeat(self, device, value): #REP_PERIOD
+               if self.getDeviceAttribute(device, 'enabled') == True:
+                       print "[iInputDevices] setRepeat for device %s to %d ms" % (device,value)
+                       event = struct.pack('iihhi', 0, 0, 0x14, 0x01, int(value))
+                       fd = os_open("/dev/input/" + device, O_RDWR)
+                       os_write(fd, event)
+                       os_close(fd)
+
+       def setDelay(self, device, value): #REP_DELAY
+               if self.getDeviceAttribute(device, 'enabled') == True:
+                       print "[iInputDevices] setDelay for device %s to %d ms" % (device,value)
+                       event = struct.pack('iihhi', 0, 0, 0x14, 0x00, int(value))
+                       fd = os_open("/dev/input/" + device, O_RDWR)
+                       os_write(fd, event)
+                       os_close(fd)
+
+
+class InitInputDevices:
+       
        def __init__(self):
-               pass
-       def setRepeat(self, value):
-               #print "setup rc repeat"
-               pass
-       def setDelay(self, value):
-               #print "setup rc delay"
-               pass
-
-def InitInputDevices():
-       config.inputDevices = ConfigSubsection();
-       config.inputDevices.repeat = ConfigSlider(default=5, limits=(1, 10))
-       config.inputDevices.delay = ConfigSlider(default=4, limits=(1, 10))
-
-       #this instance anywhere else needed?    
-       iDevices = inputDevices();      
+               self.currentDevice = ""
+               self.createConfig()
        
-       def inputDevicesRepeatChanged(configElement):
-               iDevices.setRepeat(configElement.value);
+       def createConfig(self, *args):
+               config.inputDevices = ConfigSubsection()
+               for device in sorted(iInputDevices.Devices.iterkeys()):
+                       self.currentDevice = device
+                       #print "[InitInputDevices] -> creating config entry for device: %s -> %s  " % (self.currentDevice, iInputDevices.Devices[device]["name"])
+                       self.setupConfigEntries(self.currentDevice)
+                       self.currentDevice = ""
+
+       def inputDevicesEnabledChanged(self,configElement):
+               if self.currentDevice != "" and iInputDevices.currentDevice == "":
+                       iInputDevices.setEnabled(self.currentDevice, configElement.value)
+               elif iInputDevices.currentDevice != "":
+                       iInputDevices.setEnabled(iInputDevices.currentDevice, configElement.value)
+
+       def inputDevicesNameChanged(self,configElement):
+               if self.currentDevice != "" and iInputDevices.currentDevice == "":
+                       iInputDevices.setName(self.currentDevice, configElement.value)
+                       if configElement.value != "":
+                               devname = iInputDevices.getDeviceAttribute(self.currentDevice, 'name')
+                               if devname != configElement.value:
+                                       cmd = "config.inputDevices." + self.currentDevice + ".enabled.value = False"
+                                       exec (cmd)
+                                       cmd = "config.inputDevices." + self.currentDevice + ".enabled.save()"
+                                       exec (cmd)
+               elif iInputDevices.currentDevice != "":
+                       iInputDevices.setName(iInputDevices.currentDevice, configElement.value)
+
+       def inputDevicesRepeatChanged(self,configElement):
+               if self.currentDevice != "" and iInputDevices.currentDevice == "":
+                       iInputDevices.setRepeat(self.currentDevice, configElement.value)
+               elif iInputDevices.currentDevice != "":
+                       iInputDevices.setRepeat(iInputDevices.currentDevice, configElement.value)
+               
+       def inputDevicesDelayChanged(self,configElement):
+               if self.currentDevice != "" and iInputDevices.currentDevice == "":
+                       iInputDevices.setDelay(self.currentDevice, configElement.value)
+               elif iInputDevices.currentDevice != "":
+                       iInputDevices.setDelay(iInputDevices.currentDevice, configElement.value)
+
+       def setupConfigEntries(self,device):
+               cmd = "config.inputDevices." + device + " = ConfigSubsection()"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".enabled = ConfigYesNo(default = False)"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".enabled.addNotifier(self.inputDevicesEnabledChanged,config.inputDevices." + device + ".enabled)"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + '.name = ConfigText(default="")'
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".name.addNotifier(self.inputDevicesNameChanged,config.inputDevices." + device + ".name)"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".repeat = ConfigSlider(default=100, increment = 10, limits=(0, 500))"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".repeat.addNotifier(self.inputDevicesRepeatChanged,config.inputDevices." + device + ".repeat)"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".delay = ConfigSlider(default=700, increment = 100, limits=(0, 5000))"
+               exec (cmd)
+               cmd = "config.inputDevices." + device + ".delay.addNotifier(self.inputDevicesDelayChanged,config.inputDevices." + device + ".delay)"
+               exec (cmd)
 
-       def inputDevicesDelayChanged(configElement):
-               iDevices.setDelay(configElement.value);
 
-       # this will call the "setup-val" initial
-       config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);
-       config.inputDevices.delay.addNotifier(inputDevicesDelayChanged);
+iInputDevices = inputDevices()
index b9da48d..e980cb8 100755 (executable)
@@ -4,6 +4,7 @@ from socket import *
 from enigma import eConsoleAppContainer
 from Components.Console import Console
 from Components.PluginComponent import plugins
+from Components.About import about
 from Plugins.Plugin import PluginDescriptor
 
 class Network:
@@ -26,6 +27,9 @@ class Network:
                self.DnsConsole = Console()
                self.PingConsole = Console()
                self.config_ready = None
+               self.friendlyNames = {}
+               self.lan_interfaces = []
+               self.wlan_interfaces = []
                self.getInterfaces()
 
        def onRemoteRootFS(self):
@@ -309,13 +313,49 @@ class Network:
                return len(self.ifaces)
 
        def getFriendlyAdapterName(self, x):
-               # maybe this needs to be replaced by an external list.
-               friendlyNames = {
-                       "eth0": _("Integrated Ethernet"),
-                       "wlan0": _("Wireless"),
-                       "ath0": _("Integrated Wireless")
-               }
-               return friendlyNames.get(x, x) # when we have no friendly name, use adapter name
+               if x in self.friendlyNames.keys():
+                       return self.friendlyNames.get(x, x)
+               else:
+                       self.friendlyNames[x] = self.getFriendlyAdapterNaming(x)
+                       return self.friendlyNames.get(x, x) # when we have no friendly name, use adapter name
+
+       def getFriendlyAdapterNaming(self, iface):
+               if iface.startswith('eth'):
+                       if iface not in self.lan_interfaces and len(self.lan_interfaces) == 0:
+                               self.lan_interfaces.append(iface)
+                               return _("LAN connection")
+                       elif iface not in self.lan_interfaces and len(self.lan_interfaces) >= 1:
+                               self.lan_interfaces.append(iface)
+                               return _("LAN connection") + " " + str(len(self.lan_interfaces))
+               else:
+                       if iface not in self.wlan_interfaces and len(self.wlan_interfaces) == 0:
+                               self.wlan_interfaces.append(iface)
+                               return _("WLAN connection")
+                       elif iface not in self.wlan_interfaces and len(self.wlan_interfaces) >= 1:
+                               self.wlan_interfaces.append(iface)
+                               return _("WLAN connection") + " " + str(len(self.wlan_interfaces))
+
+       def getFriendlyAdapterDescription(self, iface):
+               if iface == 'eth0':
+                       return _("Internal LAN adapter.")
+               else:
+                       classdir = "/sys/class/net/" + iface + "/device/"
+                       driverdir = "/sys/class/net/" + iface + "/device/driver/"
+                       if os_path.exists(classdir):
+                               files = listdir(classdir)
+                               if 'driver' in files:
+                                       if os_path.realpath(driverdir).endswith('ath_pci'):
+                                               return _("Atheros")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") 
+                                       elif os_path.realpath(driverdir).endswith('zd1211b'):
+                                               return _("Zydas")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") 
+                                       elif os_path.realpath(driverdir).endswith('rt73'):
+                                               return _("Ralink")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") 
+                                       elif os_path.realpath(driverdir).endswith('rt73usb'):
+                                               return _("Ralink")+ " " + str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") 
+                                       else:
+                                               return str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter.") 
+                               else:
+                                       return _("Unknown network adapter.")
 
        def getAdapterName(self, iface):
                return iface
@@ -569,24 +609,39 @@ class Network:
                                if callback is not None:
                                        callback(True)
 
-       def detectWlanModule(self):
+       def detectWlanModule(self, iface = None):
                self.wlanmodule = None
-               rt73_dir = "/sys/bus/usb/drivers/rt73/"
-               zd1211b_dir = "/sys/bus/usb/drivers/zd1211b/"
-               madwifi_dir = "/sys/bus/pci/drivers/ath_pci/"
-               if os_path.exists(madwifi_dir):
-                       files = listdir(madwifi_dir)
-                       if len(files) >= 1:
-                               self.wlanmodule = 'madwifi'
-               if os_path.exists(rt73_dir):
-                       rtfiles = listdir(rt73_dir)
-                       if len(rtfiles) == 2 or len(rtfiles) == 5:
-                               self.wlanmodule = 'ralink'
-               if os_path.exists(zd1211b_dir):
-                       zdfiles = listdir(zd1211b_dir)
-                       if len(zdfiles) == 1 or len(zdfiles) == 5:
-                               self.wlanmodule = 'zydas'
-               return self.wlanmodule
+               classdir = "/sys/class/net/" + iface + "/device/"
+               driverdir = "/sys/class/net/" + iface + "/device/driver/"
+               if os_path.exists(classdir):
+                       classfiles = listdir(classdir)
+                       driver_found = False
+                       nl80211_found = False
+                       for x in classfiles:
+                               if x == 'driver':
+                                       driver_found = True
+                               if x.startswith('ieee80211:'):
+                                       nl80211_found = True
+
+                       if driver_found and nl80211_found:
+                               #print about.getKernelVersionString()
+                               self.wlanmodule = "nl80211"
+                       else:
+                               if driver_found and not nl80211_found:
+                                       driverfiles = listdir(driverdir)
+                                       if os_path.realpath(driverdir).endswith('ath_pci'):
+                                               if len(driverfiles) >= 1:
+                                                       self.wlanmodule = 'madwifi'
+                                       if os_path.realpath(driverdir).endswith('rt73'):
+                                               if len(driverfiles) == 2 or len(driverfiles) == 5:
+                                                       self.wlanmodule = 'ralink'                                      
+                                       if os_path.realpath(driverdir).endswith('zd1211b'):
+                                               if len(driverfiles) == 1 or len(driverfiles) == 5:
+                                                       self.wlanmodule = 'zydas'
+                       if self.wlanmodule is None:
+                               self.wlanmodule = "wext"
+                       print 'Using "%s" as wpa-supplicant driver' % (self.wlanmodule)
+                       return self.wlanmodule
        
        def calc_netmask(self,nmask):
                from struct import pack, unpack
index 3c96fbb..a69df00 100644 (file)
@@ -1168,7 +1168,7 @@ def InitNimManager(nimmgr):
                        section.latitude = ConfigFloat(default = [50,767], limits = [(0,359),(0,999)])
                        section.latitudeOrientation = ConfigSelection(latitude_orientation_choices, "north")
                        section.powerMeasurement = ConfigYesNo(default=True)
-                       section.powerThreshold = ConfigInteger(default=hw.get_device_name() == "dm8000" and 15 or 50, limits=(0, 100))
+                       section.powerThreshold = ConfigInteger(default=hw.get_device_name() == "dm7025" and 50 or 15, limits=(0, 100))
                        section.turningSpeed = ConfigSelection(turning_speed_choices, "fast")
                        section.fastTurningBegin = ConfigDateTime(default=advanced_lnb_fast_turning_btime, formatstring = _("%H:%M"), increment = 600)
                        section.fastTurningEnd = ConfigDateTime(default=advanced_lnb_fast_turning_etime, formatstring = _("%H:%M"), increment = 600)
old mode 100644 (file)
new mode 100755 (executable)
index fe9284d..40dfb2c
@@ -1,4 +1,4 @@
-from config import ConfigNumber, ConfigYesNo, ConfigSubsection, config
+from config import ConfigNumber, ConfigYesNo, ConfigSubsection, ConfigSelection, config
 
 def InitRecordingConfig():
        config.recording = ConfigSubsection();
@@ -8,3 +8,7 @@ def InitRecordingConfig():
        config.recording.margin_after = ConfigNumber(default=0)
        config.recording.debug = ConfigYesNo(default = False)
        config.recording.ascii_filenames = ConfigYesNo(default = False)
+       config.recording.filename_composition = ConfigSelection(default = "standard", choices = [
+               ("standard", _("standard")),
+               ("short", _("Short filenames")),
+               ("long", _("Long filenames")) ] )
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 640121e..716fe44
@@ -19,6 +19,7 @@ class Listbox(Renderer, object):
                self.__content = None
                self.__wrap_around = False
                self.__selection_enabled = True
+               self.__scrollbarMode = "showOnDemand"
 
        GUI_WIDGET = eListbox
 
@@ -38,6 +39,7 @@ class Listbox(Renderer, object):
                instance.selectionChanged.get().append(self.selectionChanged)
                self.wrap_around = self.wrap_around # trigger
                self.selection_enabled = self.selection_enabled # trigger
+               self.scrollbarMode = self.scrollbarMode # trigger
 
        def preWidgetRemove(self, instance):
                instance.setContent(None)
@@ -76,9 +78,22 @@ class Listbox(Renderer, object):
 
        selection_enabled = property(lambda self: self.__selection_enabled, setSelectionEnabled)
 
+       def setScrollbarMode(self, mode):
+               self.__scrollbarMode = mode
+               if self.instance is not None:
+                       self.instance.setScrollbarMode(int(
+                               { "showOnDemand": 0,
+                                 "showAlways": 1,
+                                 "showNever": 2,
+                               }[mode]))
+
+       scrollbarMode = property(lambda self: self.__scrollbarMode, setScrollbarMode)
+       
        def changed(self, what):
                if hasattr(self.source, "selectionEnabled"):
                        self.selection_enabled = self.source.selectionEnabled
+               if hasattr(self.source, "scrollbarMode"):
+                       self.scrollbarMode = self.source.scrollbarMode
                if len(what) > 1 and isinstance(what[1], str) and what[1] == "style":
                        return
                self.content = self.source.content
old mode 100755 (executable)
new mode 100644 (file)
index 6095812..cd055a8
@@ -7,6 +7,8 @@ from Tools.LoadPixmap import LoadPixmap
 
 from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN
 
+from Components.config import config
+
 class ServiceList(HTMLComponent, GUIComponent):
        MODE_NORMAL = 0
        MODE_FAVOURITES = 1
@@ -62,6 +64,22 @@ class ServiceList(HTMLComponent, GUIComponent):
                                        self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
                                elif attrib == "foregroundColorServiceNotAvail":
                                        self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
+                               elif attrib == "colorEventProgressbar":
+                                       self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value))
+                               elif attrib == "colorEventProgressbarSelected":
+                                       self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value))
+                               elif attrib == "colorEventProgressbarBorder":
+                                       self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value))
+                               elif attrib == "colorEventProgressbarBorderSelected":
+                                       self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value))
+                               elif attrib == "colorServiceDescription":
+                                       self.l.setColor(eListboxServiceContent.serviceDescriptionColor, parseColor(value))
+                               elif attrib == "colorServiceDescriptionSelected":
+                                       self.l.setColor(eListboxServiceContent.serviceDescriptionColorSelected, parseColor(value))
+                               elif attrib == "picServiceEventProgressbar":
+                                       pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value))
+                                       if pic:
+                                               self.l.setPixmap(self.l.picServiceEventProgressbar, pic)
                                elif attrib == "serviceItemHeight":
                                        self.ItemHeight = int(value)
                                elif attrib == "serviceNameFont":
@@ -213,17 +231,24 @@ class ServiceList(HTMLComponent, GUIComponent):
 
        def setMode(self, mode):
                self.mode = mode
+               self.l.setItemHeight(self.ItemHeight)
+               self.l.setVisualMode(eListboxServiceContent.visModeComplex)
                if mode == self.MODE_NORMAL:
-                       self.l.setItemHeight(self.ItemHeight)
-                       self.l.setVisualMode(eListboxServiceContent.visModeComplex)
+                       if config.usage.show_event_progress_in_servicelist.value:
+                               self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(0, 0, 52, self.ItemHeight))
+                       else:
+                               self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(0, 0, 0, 0))
                        self.l.setElementFont(self.l.celServiceName, self.ServiceNameFont)
                        self.l.setElementPosition(self.l.celServiceName, eRect(0, 0, self.instance.size().width(), self.ItemHeight))
                        self.l.setElementFont(self.l.celServiceInfo, self.ServiceInfoFont)
                else:
-                       self.l.setItemHeight(self.ItemHeight)
-                       self.l.setVisualMode(eListboxServiceContent.visModeComplex)
+                       if config.usage.show_event_progress_in_servicelist.value:
+                               self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(60, 0, 52, self.ItemHeight))
+                       else:
+                               self.l.setElementPosition(self.l.celServiceEventProgressbar, eRect(60, 0, 0, 0))
                        self.l.setElementFont(self.l.celServiceNumber, self.ServiceNumberFont)
                        self.l.setElementPosition(self.l.celServiceNumber, eRect(0, 0, 50, self.ItemHeight))
                        self.l.setElementFont(self.l.celServiceName, self.ServiceNameFont)
                        self.l.setElementPosition(self.l.celServiceName, eRect(60, 0, self.instance.size().width()-60, self.ItemHeight))
                        self.l.setElementFont(self.l.celServiceInfo, self.ServiceInfoFont)
+
index 6082710..572f47e 100644 (file)
@@ -61,6 +61,8 @@ def InitUsageConfig():
                ("4", "DVB-T/-C/-S"),
                ("5", "DVB-T/-S/-C") ])
 
+       config.usage.show_event_progress_in_servicelist = ConfigYesNo(default = False)
+
        config.usage.blinking_display_clock_during_recording = ConfigYesNo(default = False)
 
        config.usage.show_message_when_recording_starts = ConfigYesNo(default = True)
index 19fb90d..3810292 100644 (file)
@@ -8,6 +8,7 @@ from config import config, ConfigSubsection, ConfigInteger
 profile("VolumeControl")
 #TODO .. move this to a own .py file
 class VolumeControl:
+       instance = None
        """Volume control, handles volUp, volDown, volMute actions and display
        a corresponding dialog"""
        def __init__(self, session):
@@ -16,6 +17,9 @@ class VolumeControl:
                globalActionMap.actions["volumeDown"]=self.volDown
                globalActionMap.actions["volumeMute"]=self.volMute
 
+               assert not VolumeControl.instance, "only one VolumeControl instance is allowed!"
+               VolumeControl.instance = self
+
                config.audio = ConfigSubsection()
                config.audio.volume = ConfigInteger(default = 100, limits = (0, 100))
 
index 471b59e..1afd398 100755 (executable)
@@ -178,7 +178,7 @@ class choicesList(object): # XXX: we might want a better name for this
 
        def __list__(self):
                if self.type == choicesList.LIST_TYPE_LIST:
-                       ret = [not isinstance(x, tuple) and x or x[0] for x in self.choices]
+                       ret = [not isinstance(x, tuple) and x or len(x) > 0 and x[0] or len(x) == 0 and x for x in self.choices]
                else:
                        ret = self.choices.keys()
                return ret or [""]
index aace17c..9e16bfc 100755 (executable)
@@ -1,6 +1,8 @@
 installdir = $(pkglibdir)/python/Plugins/DemoPlugins
 
-SUBDIRS = TestPlugin
+SUBDIRS = TestPlugin TPMDemo
 
 install_PYTHON =       \
-       __init__.py
\ No newline at end of file
+       __init__.py
+
+       
\ No newline at end of file
diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am b/lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am
new file mode 100644 (file)
index 0000000..3ccca98
--- /dev/null
@@ -0,0 +1,5 @@
+installdir = $(LIBDIR)/enigma2/python/Plugins/DemoPlugins/TPMDemo
+
+install_PYTHON = \
+       __init__.py \
+       plugin.py
diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/README b/lib/python/Plugins/DemoPlugins/TPMDemo/README
new file mode 100644 (file)
index 0000000..89a972a
--- /dev/null
@@ -0,0 +1 @@
+Please read enigma2/doc/TPM for further instructions on how to integrate this into your own plugins.
\ No newline at end of file
diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/__init__.py b/lib/python/Plugins/DemoPlugins/TPMDemo/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py b/lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py
new file mode 100644 (file)
index 0000000..2c078d3
--- /dev/null
@@ -0,0 +1,87 @@
+from Screens.Screen import Screen
+from Plugins.Plugin import PluginDescriptor
+from enigma import eTPM
+import sha
+
+def bin2long(s):
+       return reduce( lambda x,y:(x<<8L)+y, map(ord, s))
+
+def long2bin(l):
+       res = ""
+       for byte in range(128):
+               res += chr((l >> (1024 - (byte + 1) * 8)) & 0xff)
+       return res
+
+def rsa_pub1024(src, mod):
+       return long2bin(pow(bin2long(src), 65537, bin2long(mod)))
+       
+def decrypt_block(src, mod):
+       if len(src) != 128 and len(src) != 202:
+               return None
+       dest = rsa_pub1024(src[:128], mod)
+       hash = sha.new(dest[1:107])
+       if len(src) == 202:
+               hash.update(src[131:192])       
+       result = hash.digest()
+       if result == dest[107:127]:
+               return dest
+       return None
+
+def validate_cert(cert, key):
+       buf = decrypt_block(cert[8:], key) 
+       if buf is None:
+               return None
+       return buf[36:107] + cert[139:196]
+
+def read_random():
+       try:
+               fd = open("/dev/urandom", "r")
+               buf = fd.read(8)
+               fd.close()
+               return buf
+       except:
+               return None
+
+def main(session, **kwargs):
+       try:
+               device = open("/proc/stb/info/model", "r").readline().strip()
+       except:
+               device = ""     
+       if device != "dm7025":
+               rootkey = ['\x9f', '|', '\xe4', 'G', '\xc9', '\xb4', '\xf4', '#', '&', '\xce', '\xb3', '\xfe', '\xda', '\xc9', 'U', '`', '\xd8', '\x8c', 's', 'o', '\x90', '\x9b', '\\', 'b', '\xc0', '\x89', '\xd1', '\x8c', '\x9e', 'J', 'T', '\xc5', 'X', '\xa1', '\xb8', '\x13', '5', 'E', '\x02', '\xc9', '\xb2', '\xe6', 't', '\x89', '\xde', '\xcd', '\x9d', '\x11', '\xdd', '\xc7', '\xf4', '\xe4', '\xe4', '\xbc', '\xdb', '\x9c', '\xea', '}', '\xad', '\xda', 't', 'r', '\x9b', '\xdc', '\xbc', '\x18', '3', '\xe7', '\xaf', '|', '\xae', '\x0c', '\xe3', '\xb5', '\x84', '\x8d', '\r', '\x8d', '\x9d', '2', '\xd0', '\xce', '\xd5', 'q', '\t', '\x84', 'c', '\xa8', ')', '\x99', '\xdc', '<', '"', 'x', '\xe8', '\x87', '\x8f', '\x02', ';', 'S', 'm', '\xd5', '\xf0', '\xa3', '_', '\xb7', 'T', '\t', '\xde', '\xa7', '\xf1', '\xc9', '\xae', '\x8a', '\xd7', '\xd2', '\xcf', '\xb2', '.', '\x13', '\xfb', '\xac', 'j', '\xdf', '\xb1', '\x1d', ':', '?']
+               
+               etpm = eTPM()
+               l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
+               if l2cert is None:
+                       print "l2cert not found"
+                       return
+       
+               l2key = validate_cert(l2cert, rootkey)
+               if l2key is None:
+                       print "l2cert invalid"
+                       return
+               
+               l3cert = etpm.getCert(eTPM.TPMD_DT_LEVEL3_CERT)
+               if l3cert is None:
+                       print "l3cert not found (can be fixed by running the genuine dreambox plugin and running the offered update)"
+                       return
+               
+               l3key = validate_cert(l3cert, l2key)
+               if l3key is None:
+                       print "l3cert invalid"
+                       return
+               
+               rnd = read_random()
+               if rnd is None:
+                       print "random error"
+                       return
+               val = etpm.challenge(rnd)
+               result = decrypt_block(val, l3key)
+       if device == "dm7025" or result[80:88] == rnd:
+               print "successfully finished the tpm test"
+                       # would start your plugin here
+
+def Plugins(**kwargs):
+       return [PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main),
+               PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), icon = "plugin.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc = main)]
+       
\ No newline at end of file
index 1431caf..7132ba0 100755 (executable)
@@ -2,23 +2,14 @@
          <prerequisites>
                     <tag type="Recording" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>CutListEditor</name>
                     <packagename>enigma2-plugin-extensions-cutlisteditor</packagename>
-                    <shortdescription>CutListEditor allows you to edit your movies.</shortdescription>
+                    <shortdescription>CutListEditor allows you to edit your movies</shortdescription>
                     <description>CutListEditor allows you to edit your movies.\nSeek to the start of the stuff you want to cut away. Press OK, select 'start cut'.\nThen seek to the end, press OK, select 'end cut'. That's it.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cutlisteditor.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Schnitteditor</name>
-                    <packagename>enigma2-plugin-extensions-cutlisteditor</packagename>
-                    <shortdescription>Mit dem Schnitteditor können Sie Ihre Aufnahmen schneiden.</shortdescription>
-                    <description>Mit dem Schnitteditor können Sie Ihre Aufnahmen schneiden.\nSpulen Sie zum Anfang des zu schneidenden Teils der Aufnahme. Drücken Sie dann OK und wählen Sie: 'start cut'.\nDann spulen Sie zum Ende, drücken OK und wählen 'end cut'. Das ist alles.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cutlisteditor.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-cutlisteditor" />
          </files>
index 647d1cf..c1e202a 100755 (executable)
@@ -3,22 +3,17 @@
                     <tag type="Recording" />
                     <tag type="Software" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>DVDBurn</name>
                     <packagename>enigma2-plugin-extensions-dvdburn</packagename>
-                    <shortdescription>With DVDBurn you can burn your recordings to a dvd.</shortdescription>
-                    <description>With DVDBurn you can burn your recordings to a dvd.\nArchive all your favorite movies to recordable dvds with menus if wanted.</description>
+                    <shortdescription>Burn your recordings to DVD</shortdescription>
+                    <description>With DVDBurn you can make compilations of records from your Dreambox hard drive.\n
+                   Optionally you can add customizable menus. You can record the compilation to a standard-compliant DVD that can be played on conventinal DVD players.\n
+                   HDTV recordings can only be burned in proprietary dreambox format.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_dvdburn_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>DVDBurn</name>
-                    <packagename>enigma2-plugin-extensions-dvdburn</packagename>
-                    <shortdescription>Mit DVDBurn brennen Sie ihre Aufnahmen auf DVD.</shortdescription>
-                    <description>Mit DVDBurn brennen Sie ihre Aufnahmen auf DVD.\nArchivieren Sie Ihre Liblingsfilme auf DVD mit Menus wenn Sie es wünschen.</description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_dvdburn_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-dvdburn" />
          </files>
index 1353f7d..6fc5a6f 100755 (executable)
@@ -2,23 +2,14 @@
          <prerequisites>
                     <tag type="Multimedia" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>DVDPlayer</name>
                     <packagename>enigma2-plugin-extensions-dvdplayer</packagename>
-                    <shortdescription>DVDPlayer plays your DVDs on your Dreambox.</shortdescription>
+                    <shortdescription>DVDPlayer plays your DVDs on your Dreambox</shortdescription>
                     <description>DVDPlayer plays your DVDs on your Dreambox.\nWith the DVDPlayer you can play your DVDs on your Dreambox from a DVD or even from an iso file or video_ts folder on your harddisc or network.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_dvdplayer.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>DVDPlayer</name>
-                    <packagename>enigma2-plugin-extensions-dvdplayer</packagename>
-                    <shortdescription>Spielen Sie Ihre DVDs mit dem DVDPlayer auf Ihrer Dreambox ab.</shortdescription>
-                    <description>Spielen Sie Ihre DVDs mit dem DVDPlayer auf Ihrer Dreambox ab.\nMit dem DVDPlayer können Sie Ihre DVDs auf Ihrer Dreambox abspielen. Dabei ist es egal ob Sie von DVD, iso-Datei oder sogar direkt von einer video_ts Ordnerstruktur von Ihrer Festplatte oder dem Netzwerk abspielen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_dvdplayer.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-dvdplayer" />
          </files>
index a10840d..37d0988 100755 (executable)
@@ -3,23 +3,14 @@
                     <tag type="EPG" />
                     <tag type="Recording" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>GraphMultiEPG</name>
-                    <packagename>eenigma2-plugin-extensions-graphmultiepg</packagename>
-                    <shortdescription>GraphMultiEPG shows a graphical timeline EPG.</shortdescription>
+                    <packagename>enigma2-plugin-extensions-graphmultiepg</packagename>
+                    <shortdescription>GraphMultiEPG shows a graphical timeline EPG</shortdescription>
                     <description>GraphMultiEPG shows a graphical timeline EPG.\nShows a nice overview of all running und upcoming tv shows.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_graphmultiepg_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>GraphMultiEPG</name>
-                    <packagename>enigma2-plugin-extensions-graphmultiepg</packagename>
-                    <shortdescription>Zeigt ein grafisches Zeitlinien-EPG.</shortdescription>
-                    <description>Zeigt ein grafisches Zeitlinien-EPG.\nZeigt eine grafische Übersicht aller laufenden und kommenden Sendungen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_graphmultiepg_de.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-graphmultiepg" />
          </files>
index 2f9f22b..ffbb8e8 100755 (executable)
@@ -2,23 +2,14 @@
          <prerequisites>
                     <tag type="Multimedia" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>MediaPlayer</name>
                     <packagename>enigma2-plugin-extensions-mediaplayer</packagename>
-                    <shortdescription>Mediaplayer plays your favorite music and videos.</shortdescription>
+                    <shortdescription>Plays your favorite music and videos</shortdescription>
                     <description>Mediaplayer plays your favorite music and videos.\nPlay all your favorite music and video files, organize them in playlists, view cover and album information.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_mediaplayer_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>MediaPlayer</name>
-                    <packagename>enigma2-plugin-extensions-mediaplayer</packagename>
-                    <shortdescription>Mediaplayer spielt Ihre Musik und Videos.</shortdescription>
-                    <description>Mediaplayer spielt Ihre Musik und Videos.\nSie können all Ihre Musik- und Videodateien abspielen, in Playlisten organisieren, Cover und Albuminformationen abrufen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_mediaplayer_de.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-mediaplayer" />
          </files>
index eced924..eb9de1b 100755 (executable)
@@ -1,25 +1,15 @@
 <default>
          <prerequisites>
-                    <tag type="Multimedia" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>MediaScanner</name>
                     <packagename>enigma2-plugin-extensions-mediascanner</packagename>
-                    <shortdescription>MediaScanner scans devices for playable media files.</shortdescription>
+                    <shortdescription>Scan devices for playable media files</shortdescription>
                     <description>MediaScanner scans devices for playable media files and displays a menu with possible actions like viewing pictures or playing movies.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_mediascanner_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>MediaScanner</name>
-                    <packagename>enigma2-plugin-extensions-mediascanner</packagename>
-                    <shortdescription>MediaScanner durchsucht Geräte nach Mediendateien.</shortdescription>
-                    <description>MediaScanner durchsucht Geräte nach Mediendateien  und bietet Ihnen die dazu passenden Aktionen an wie z.B. Bilder betrachten oder Videos abspielen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_mediascanner_en.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-mediascanner" />
          </files>
index faff978..16e2ec9 100755 (executable)
@@ -2,23 +2,14 @@
          <prerequisites>
                     <tag type="Multimedia" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>PicturePlayer</name>
                     <packagename>enigma2-plugin-extensions-pictureplayer</packagename>
-                    <shortdescription>PicturePlayer displays your photos on the TV.</shortdescription>
+                    <shortdescription>Display your photos on the TV</shortdescription>
                     <description>The PicturePlayer displays your photos on the TV.\nYou can view them as thumbnails or slideshow.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_pictureplayer.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Bildbetrachter</name>
-                    <packagename>enigma2-plugin-extensions-pictureplayer</packagename>
-                    <shortdescription>Der Bildbetrachter zeigt Ihre Bilder auf dem Fernseher an.</shortdescription>
-                    <description>Der Bildbetrachter zeigt Ihre Bilder auf dem Fernseher an.\nSie können sich Ihre Bilder als Thumbnails, einzeln oder als Slideshow anzeigen lassen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_pictureplayer.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-pictureplayer" />
          </files>
old mode 100644 (file)
new mode 100755 (executable)
index acf8374..3eaf8fc
@@ -2,20 +2,13 @@
          <prerequisites>
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>SocketMMI</name>
                     <packagename>enigma2-plugin-extensions-socketmmi</packagename>
-                    <shortdescription>Python frontend for /tmp/mmi.socket.</shortdescription>
+                    <shortdescription>Frontend for /tmp/mmi.socket</shortdescription>
                     <description>Python frontend for /tmp/mmi.socket.</description>
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>SocketMMI</name>
-                    <packagename>enigma2-plugin-extensions-socketmmi</packagename>
-                    <shortdescription>Python frontend für /tmp/mmi.socket.</shortdescription>
-                    <description>Python frontend für /tmp/mmi.socket.</description>
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-socketmmi" />
          </files>
old mode 100644 (file)
new mode 100755 (executable)
index 734c48f..7ca1082
@@ -2,20 +2,13 @@
          <prerequisites>
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>TuxboxPlugins</name>
                     <packagename>TuxboxPlugins</packagename>
-                    <shortdescription>Allows the execution of TuxboxPlugins.</shortdescription>
+                    <shortdescription>Execute TuxboxPlugins</shortdescription>
                     <description>Allows the execution of TuxboxPlugins.</description>
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>TuxboxPlugins</name>
-                    <packagename>enigma2-plugin-extensions-tuxboxplugins</packagename>
-                    <shortdescription>Erlaubt das Ausführen von TuxboxPlugins.</shortdescription>
-                    <description>Erlaubt das Ausführen von TuxboxPlugins.</description>
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-tuxboxplugins" />
          </files>
index f043503..79d2b0b 100644 (file)
@@ -4,3 +4,4 @@ SUBDIRS = Extensions SystemPlugins DemoPlugins
 
 install_PYTHON =       \
        __init__.py Plugin.py 
+
index 99add3d..d0781af 100755 (executable)
@@ -2,26 +2,16 @@
          <prerequisites>
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>CleanupWizard</name>
                     <packagename>enigma2-plugin-systemplugins-cleanupwizard</packagename>
                     <shortdescription>Automatically informs you on low internal memory</shortdescription>
-                    <description>The CleanupWizard informs you when your internal free memory of your dreambox has droppen under 2MB.
-                   You can use this wizard to remove some extensions.
-                    </description>
+                    <description>The CleanupWizard informs you when the internal free memory of your dreambox has dropped below a definable threshold.
+                   You can use this wizard to remove some plugins. </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cleanupwizard_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>CleanupWizard</name>
-                    <packagename>enigma2-plugin-systemplugins-cleanupwizard</packagename>
-                    <shortdescription>Informiert Sie automatisch wenn der interne Speicher Ihrer Dreambox voll wird.</shortdescription>
-                    <description>Der CleanupWizard informiert Sie, wenn der interne freie Speicher Ihrer Dreambox unter 2MB fällt.
-                   Sie können dann einige Erweiterungen deinstallieren um wieder Platz zu schaffen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cleanupwizard_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-cleanupwizard" />
          </files>
index 9abc598..f34f0a3 100755 (executable)
@@ -4,28 +4,17 @@
                     <tag type="CI" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>CommonInterfaceAssignment</name>
                     <packagename>enigma2-plugin-systemplugins-commoninterfaceassignment</packagename>
-                    <shortdescription>Assigning providers/services/caids to a dedicated CI module</shortdescription>
-                    <description>With the CommonInterfaceAssignment extension it is possible to use different CI modules
-                    in your Dreambox and assign to each of them dedicated providers/services or caids.\n
-                    So it is then possible to watch a scrambled service while recording another one.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_ciassignment.jpg" />
-          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>CommonInterfaceAssignment</name>
-                    <packagename>enigma2-plugin-systemplugins-commoninterfaceassignment</packagename>
-                    <shortdescription>Zuweisen von Providern/Services/CAIDs an ein CI Modul</shortdescription>
-                    <description>Mit der CommonInterfaceAssignment Erweiterung ist es möglich jedem CI Modul bestimmte Provider/Services/CAIDs zuzuweisen.\n
-                    So ist es möglich mit einem CI einen Sender aufzunehmen\n
-                    und mit einem anderen einen Sender zu schauen.
-                    </description>
+                    <shortdescription>Assigning providers/services/caids to a CI module</shortdescription>
+                    <description>With the CommonInterfaceAssignment plugin it is possible to use different
+                   CI modules in your Dreambox and assign dedicated providers/services or caids to each of them.\n
+                   This allows watching a scrambled service while recording another one.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_ciassignment.jpg" />
           </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-commoninterfaceassignment" />
          </files>
index a118ed7..3140b15 100755 (executable)
@@ -2,26 +2,17 @@
          <prerequisites>
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>CrashlogAutoSubmit</name>
                     <packagename>enigma2-plugin-systemplugins-crashlogautosubmit</packagename>
                     <shortdescription>Automatically send crashlogs to Dream Multimedia</shortdescription>
-                    <description>With the CrashlogAutoSubmit extension it is possible to automatically send crashlogs
-                   found on your Harddrive to Dream Multimedia
+                    <description>With the CrashlogAutoSubmit plugin it is possible to automatically
+                   mail crashlogs found on your hard drive to Dream Multimedia.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_crashlogautosubmit_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>CrashlogAutoSubmit</name>
-                    <packagename>enigma2-plugin-systemplugins-crashlogautosubmit</packagename>
-                    <shortdescription>Automatisches versenden von Crashlogs an Dream Multimedia</shortdescription>
-                    <description>Mit dem CrashlogAutoSubmit Plugin ist es möglich auf Ihrer Festplatte
-                   gefundene Crashlogs automatisch an Dream Multimedia zu versenden.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_crashlogautosubmit_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-crashlogautosubmit" />
          </files>
index 41d41ed..74b7886 100755 (executable)
@@ -1,26 +1,18 @@
 <default>
          <prerequisites>
                     <tag type="SAT" />
-                    <tag type="System" />
+                    <tag type="Default" />
          </prerequisites>
           <info language="en">
                     <author>Dream Multimedia</author>
                     <name>DefaultServicesScanner</name>
                     <packagename>enigma2-plugin-systemplugins-defaultservicesscanner</packagename>
-                    <shortdescription>Scans default lamedbs sorted by satellite with a connected dish positioner.</shortdescription>
-                    <description>With the DefaultServicesScanner extension you can scan default lamedbs sorted by satellite with a connected dish positioner.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_defaultservicescanner.jpg" />
-          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>DefaultServicesScanner</name>
-                    <packagename>enigma2-plugin-systemplugins-defaultservicesscanner</packagename>
-                    <shortdescription>Standard Sendersuche nach Satellit mit einem Rotor.</shortdescription>
-                    <description>Mit der DefaultServicesScanner Erweiterung können Sie eine standard Sendersuche nach Satellit mit einem angeschlossenen Rotor durchführen.
+                    <shortdescription>Scans default lamedbs sorted by satellite</shortdescription>
+                    <description>With the DefaultServicesScanner plugin you can scan default lamedbs sorted by satellite with a connected dish positioner.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_defaultservicescanner.jpg" />
           </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-defaultservicesscanner" />
          </files>
index 33808b3..567618b 100755 (executable)
@@ -3,24 +3,16 @@
                     <tag type="SAT" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>DiseqcTester</name>
                     <packagename>enigma2-plugin-systemplugins-diseqctester</packagename>
-                    <shortdescription>Test your Diseqc equipment.</shortdescription>
-                    <description>With the DiseqcTester extension you can test your satellite equipment for Diseqc compatibility and errors.
+                    <shortdescription>Test your DiSEqC equipment</shortdescription>
+                    <description>With the DiseqcTester plugin you can test your satellite equipment for DiSEqC compatibility and errors.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_diseqctester_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>DiseqcTester</name>
-                    <packagename>enigma2-plugin-systemplugins-diseqctester</packagename>
-                    <shortdescription>Testet Ihr Diseqc Equipment.</shortdescription>
-                    <description>Mit der DiseqcTester Erweiterung können Sie Ihr Satelliten-Equipment nach Diseqc-Kompatibilität und Fehlern überprüfen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_diseqctester_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-diseqctester" />
          </files>
old mode 100644 (file)
new mode 100755 (executable)
index 1763f67..7b6fdca
@@ -3,24 +3,16 @@
                     <hardware type="dm8000" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>FrontprocessorUpgrade</name>
                     <packagename>enigma2-plugin-systemplugins-frontprocessorupgrade</packagename>
                    <packagetype>internal</packagetype> <!-- internal/public , public is default, internal metas are not displayed inside plugin manager -->
-                    <shortdescription>Internal firmware updater.</shortdescription>
+                    <shortdescription>Internal firmware updater</shortdescription>
                     <description>This system tool is internally used to program the hardware with firmware updates.
                     </description>
          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>FrontprocessorUpgrade</name>
-                    <packagename>enigma2-plugin-systemplugins-frontprocessorupgrade</packagename>
-                   <packagetype>internal</packagetype> <!-- internal/public , public is default, internal metas are not displayed inside plugin manager -->
-                    <shortdescription>Interner Firmware-Upgrader.</shortdescription>
-                    <description>Dieses Systemtool wird intern benutzt um Firmware-Upgrades für die Hardware aufzuspielen.
-                    </description>
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-frontprocessorupgrade" />
        </files>
old mode 100644 (file)
new mode 100755 (executable)
index 6c2824c..610dfee
@@ -2,22 +2,15 @@
          <prerequisites>
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>Hotplug</name>
                     <packagename>enigma2-plugin-systemplugins-hotplug</packagename>
-                    <shortdescription>Hotplugging for removeable devices.</shortdescription>
-                    <description>The Hotplug extension notifies your system of newly added or removed devices.
-                    </description>
-          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Hotplug</name>
-                    <packagename>enigma2-plugin-systemplugins-hotplug</packagename>
-                    <shortdescription>Hotplugging für entfernbare Geräte.</shortdescription>
-                    <description>Mit der Hotplug-Erweiterung wird Ihr System über neu angeschlossene oder entfernte Geräte informiert.
+                    <shortdescription>Hotplugging for removeable devices</shortdescription>
+                    <description>The Hotplug plugin notifies your system of newly added or removed devices.
                     </description>
           </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-hotplug" />
        </files>
index c81f4ca..f93f5c5 100755 (executable)
@@ -2,28 +2,18 @@
          <prerequisites>
                     <hardware type="dm8000" />
                     <tag type="System" />
-                    <tag type="Software" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>NFIFlash</name>
                     <packagename>enigma2-plugin-systemplugins-nfiflash</packagename>
-                    <shortdescription>Restore your Dreambox with a USB stick.</shortdescription>
-                    <description>With the NFIFlash extension it is possible to prepare a USB stick with an Dreambox image.\n
+                    <shortdescription>Restore your Dreambox with a USB stick</shortdescription>
+                    <description>With the NFIFlash plugin it is possible to prepare a USB stick with an Dreambox image.\n
                     It is then possible to flash your Dreambox with the image on that stick.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_nfiflash_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>NFIFlash</name>
-                    <packagename>enigma2-plugin-systemplugins-nfiflash</packagename>
-                    <shortdescription>Wiederherstellen Ihrer Dreambox mittels USB-Stick.</shortdescription>
-                    <description>Mit der NFIFlash Erweiterung können Sie ein Dreambox Image auf einen USB-Stick laden.\
-                    Mit diesem USB-Stick ist es dann möglich Ihre Dreambox zu flashen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_nfiflash_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-nfiflash" />
          </files>
index 6096ca8..d7e8307 100755 (executable)
@@ -257,7 +257,7 @@ class NetworkWizard(WizardLanguage, Rc):
                                        text1 = _("Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\n")
                                        text2 = _('Accesspoint:') + "\t" + str(status[self.selectedInterface]["acesspoint"]) + "\n"
                                        text3 = _('SSID:') + "\t" + str(status[self.selectedInterface]["essid"]) + "\n"
-                                       text4 = _('Link Quality:') + "\t" + str(status[self.selectedInterface]["quality"])+"%" + "\n"
+                                       text4 = _('Link Quality:') + "\t" + str(status[self.selectedInterface]["quality"])+ "\n"
                                        text5 = _('Signal Strength:') + "\t" + str(status[self.selectedInterface]["signal"]) + "\n"
                                        text6 = _('Bitrate:') + "\t" + str(status[self.selectedInterface]["bitrate"]) + "\n"
                                        text7 = _('Encryption:') + " " + str(status[self.selectedInterface]["encryption"]) + "\n"
@@ -421,3 +421,4 @@ class NetworkWizard(WizardLanguage, Rc):
 
        def ChoicesSelectionMoved(self):
                pass
+
index 4d3adcb..423365f 100755 (executable)
@@ -1,26 +1,18 @@
 <default>
          <prerequisites>
+                    <tag type="Network" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>NetworkWizard</name>
                     <packagename>enigma2-plugin-systemplugins-networkwizard</packagename>
                     <shortdescription>Step by step network configuration</shortdescription>
-                    <description>With the NetworkWizard you can easy configure your network step by step.
+                    <description>With the NetworkWizard you can easily configure your network step by step.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_networkwizard_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>NetzwerkWizard</name>
-                    <packagename>enigma2-plugin-systemplugins-networkwizard</packagename>
-                    <shortdescription>Schritt für Schritt Netzwerk konfiguration</shortdescription>
-                    <description>Mit dem NetzwerkWizard können Sie Ihr Netzwerk konfigurieren. Sie werden Schritt
-                       für Schritt durch die Konfiguration geleitet.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_networkwizard_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-networkwizard" />
          </files>
index 2cb47c0..5e1db7b 100755 (executable)
@@ -3,25 +3,16 @@
                     <tag type="SAT" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>PositionerSetup</name>
                     <packagename>enigma2-plugin-systemplugins-positionersetup</packagename>
-                    <shortdescription>PositionerSetup helps you installing a motorized dish.</shortdescription>
-                    <description>With the PositionerSetup extension it is easy to install and configure a motorized dish.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_positionersetup.jpg" />
-          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>PositionerSetup</name>
-                    <packagename>enigma2-plugin-systemplugins-positionersetup</packagename>
-                    <shortdescription>Unterstützt Sie beim installieren eines Rotors.</shortdescription>
-                    <description>Die PositionerSetup Erweiterung unterstützt Sie beim einrichten
-                    und konfigurieren einer motorgesteuerten Satellitenantenne.
+                    <shortdescription>PositionerSetup helps you installing a motorized dish</shortdescription>
+                    <description>With the PositionerSetup plugin it is easy to install and configure a motorized dish.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_positionersetup.jpg" />
           </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-positionersetup" />
        </files>
index 4c0c7af..904f9a2 100755 (executable)
@@ -3,25 +3,17 @@
                     <tag type="SAT" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>SatelliteEquipmentControl</name>
                     <name_de>SatelliteEquipmentControl</name_de>
                     <packagename>enigma2-plugin-systemplugins-satelliteequipmentcontrol</packagename>
-                    <shortdescription>SatelliteEquipmentControl allows you to fine-tune DiSEqC-settings.</shortdescription>
-                    <description>With the SatelliteEquipmentControl extension it is possible to fine-tune DiSEqC-settings.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satcontrol.jpg" />
-          </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>SatelliteEquipmentControl</name>
-                    <packagename>enigma2-plugin-systemplugins-satelliteequipmentcontrol</packagename>
-                    <shortdescription>Fein-Einstellungen für DiSEqC</shortdescription>
-                    <description>Die SatelliteEquipmentControl-Erweiterung unterstützt Sie beim Feintuning der DiSEqC Einstellungen.
+                    <shortdescription>SatelliteEquipmentControl allows you to fine-tune DiSEqC-settings</shortdescription>
+                    <description>With the SatelliteEquipmentControl plugin it is possible to fine-tune DiSEqC-settings.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satcontrol.jpg" />
           </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-satelliteequipmentcontrol" />
          </files>
index e9453de..fe0c901 100755 (executable)
@@ -1,28 +1,18 @@
 <default>
          <prerequisites>
                     <tag type="SAT" />
-                    <tag type="Software" />
+                    <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>Satfinder</name>
                     <packagename>enigma2-plugin-systemplugins-satfinder</packagename>
-                    <shortdescription>Satfinder helps you to align your dish.</shortdescription>
-                    <description>The Satfinder extension helps you to align your dish.\n
+                    <shortdescription>Satfinder helps you to align your dish</shortdescription>
+                    <description>The Satfinder plugin helps you to align your dish.\n
                     It shows you informations about signal rate and errors.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satfinder.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Satfinder</name>
-                    <packagename>enigma2-plugin-systemplugins-satfinder</packagename>
-                    <shortdescription>Satfinder unterstützt Sie beim ausrichten ihrer Satellitenanlage.</shortdescription>
-                    <description>Die Satfinder-Erweiterung unterstützt Sie beim Ausrichten ihrer Satellitenanlage.\n
-                    Es zeigt Ihnen Daten wie Signalstärke und Fehlerrate an.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satfinder.jpg" />
-          </info>
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-satfinder" />
        </files>
index 717f732..73544a5 100755 (executable)
@@ -1,28 +1,19 @@
 <default>
          <prerequisites>
                     <tag type="Display" />
-                    <tag type="System" />
+                    <tag type="Skin" />
          </prerequisites>
           <info language="en">
                     <author>Dream Multimedia</author>
                     <name>SkinSelector</name>
                     <packagename>enigma2-plugin-systemplugins-skinselector</packagename>
-                    <shortdescription>SkinSelector shows a menu with selectable skins.</shortdescription>
+                    <shortdescription>SkinSelector shows a menu with selectable skins</shortdescription>
                     <description>The SkinSelector shows a menu with selectable skins.\n
                     It's now easy to change the look and feel of your Dreambox.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>SkinSelector</name>
-                    <packagename>enigma2-plugin-systemplugins-skinselector</packagename>
-                    <shortdescription>Der SkinSelector zeigt Ihnen ein Menu mit auswählbaren Skins.</shortdescription>
-                    <description>Die SkinSelector Erweiterung zeigt Ihnen ein Menu mit auswählbaren Skins.\n
-                    Sie können nun einfach das Aussehen der grafischen Oberfläche Ihrer Dreambox verändern.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-skinselector" />
          </files>
index dcff3ca..7bd7d7a 100755 (executable)
@@ -251,8 +251,9 @@ class RestoreMenu(Screen):
        def KeyOk(self):
                if (self.exe == False) and (self.entry == True):
                        self.sel = self["filelist"].getCurrent()
-                       self.val = self.path + "/" + self.sel
-                       self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore\nfollowing backup:\n") + self.sel + _("\nSystem will restart after the restore!"))
+                       if self.sel:
+                               self.val = self.path + "/" + self.sel
+                               self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore\nfollowing backup:\n") + self.sel + _("\nSystem will restart after the restore!"))
 
        def keyCancel(self):
                self.close()
@@ -265,8 +266,9 @@ class RestoreMenu(Screen):
        def deleteFile(self):
                if (self.exe == False) and (self.entry == True):
                        self.sel = self["filelist"].getCurrent()
-                       self.val = self.path + "/" + self.sel
-                       self.session.openWithCallback(self.startDelete, MessageBox, _("Are you sure you want to delete\nfollowing backup:\n" + self.sel ))
+                       if self.sel:
+                               self.val = self.path + "/" + self.sel
+                               self.session.openWithCallback(self.startDelete, MessageBox, _("Are you sure you want to delete\nfollowing backup:\n" + self.sel ))
 
        def startDelete(self, ret = False):
                if (ret == True):
index d4653cc..879bec1 100755 (executable)
@@ -1,4 +1,5 @@
-from enigma import eConsoleAppContainer
+# -*- coding: iso-8859-1 -*-
+from enigma import eConsoleAppContainer,eTPM
 from Components.Console import Console
 from Components.About import about
 from Components.DreamInfoHandler import DreamInfoHandler
@@ -8,9 +9,49 @@ from Components.Ipkg import IpkgComponent
 from Components.Network import iNetwork
 from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_METADIR
 from Tools.HardwareInfo import HardwareInfo
+import sha
 
 from time import time
 
+def bin2long(s):
+       return reduce( lambda x,y:(x<<8L)+y, map(ord, s))
+
+def long2bin(l):
+       res = ""
+       for byte in range(128):
+               res += chr((l >> (1024 - (byte + 1) * 8)) & 0xff)
+       return res
+
+def rsa_pub1024(src, mod):
+       return long2bin(pow(bin2long(src), 65537, bin2long(mod)))
+       
+def decrypt_block(src, mod):
+       if len(src) != 128 and len(src) != 202:
+               return None
+       dest = rsa_pub1024(src[:128], mod)
+       hash = sha.new(dest[1:107])
+       if len(src) == 202:
+               hash.update(src[131:192])       
+       result = hash.digest()
+       if result == dest[107:127]:
+               return dest
+       return None
+
+def validate_cert(cert, key):
+       buf = decrypt_block(cert[8:], key) 
+       if buf is None:
+               return None
+       return buf[36:107] + cert[139:196]
+
+def read_random():
+       try:
+               fd = open("/dev/urandom", "r")
+               buf = fd.read(8)
+               fd.close()
+               return buf
+       except:
+               return None
+
 class SoftwareTools(DreamInfoHandler):
        lastDownloadDate = None
        NetworkConnectionAvailable = None
@@ -28,7 +69,7 @@ class SoftwareTools(DreamInfoHandler):
                else:
                        self.ImageVersion = 'Stable'
                self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
-               DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion, language = self.language)
+               DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion)
                self.directory = resolveFilename(SCOPE_METADIR)
                self.hardware_info = HardwareInfo()
                self.list = List([])
@@ -58,24 +99,71 @@ class SoftwareTools(DreamInfoHandler):
                                self.getUpdates()
 
        def getUpdates(self, callback = None):
-               if SoftwareTools.NetworkConnectionAvailable == True:
-                       SoftwareTools.lastDownloadDate = time()
-                       if SoftwareTools.list_updating is False and callback is None:
-                               SoftwareTools.list_updating = True
-                               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
-                       elif SoftwareTools.list_updating is False and callback is not None:
-                               SoftwareTools.list_updating = True
-                               self.NotifierCallback = callback
-                               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
-                       elif SoftwareTools.list_updating is True and callback is not None:
-                               #update info collecting already in progress
-                               self.NotifierCallback = callback
+               if SoftwareTools.lastDownloadDate is None:
+                       if  self.hardware_info.device_name != "dm7025":
+                               rootkey = ['\x9f', '|', '\xe4', 'G', '\xc9', '\xb4', '\xf4', '#', '&', '\xce', '\xb3', '\xfe', '\xda', '\xc9', 'U', '`', '\xd8', '\x8c', 's', 'o', '\x90', '\x9b', '\\', 'b', '\xc0', '\x89', '\xd1', '\x8c', '\x9e', 'J', 'T', '\xc5', 'X', '\xa1', '\xb8', '\x13', '5', 'E', '\x02', '\xc9', '\xb2', '\xe6', 't', '\x89', '\xde', '\xcd', '\x9d', '\x11', '\xdd', '\xc7', '\xf4', '\xe4', '\xe4', '\xbc', '\xdb', '\x9c', '\xea', '}', '\xad', '\xda', 't', 'r', '\x9b', '\xdc', '\xbc', '\x18', '3', '\xe7', '\xaf', '|', '\xae', '\x0c', '\xe3', '\xb5', '\x84', '\x8d', '\r', '\x8d', '\x9d', '2', '\xd0', '\xce', '\xd5', 'q', '\t', '\x84', 'c', '\xa8', ')', '\x99', '\xdc', '<', '"', 'x', '\xe8', '\x87', '\x8f', '\x02', ';', 'S', 'm', '\xd5', '\xf0', '\xa3', '_', '\xb7', 'T', '\t', '\xde', '\xa7', '\xf1', '\xc9', '\xae', '\x8a', '\xd7', '\xd2', '\xcf', '\xb2', '.', '\x13', '\xfb', '\xac', 'j', '\xdf', '\xb1', '\x1d', ':', '?']
+                               etpm = eTPM()
+                               l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
+                               if l2cert is None:
+                                       return
+                               l2key = validate_cert(l2cert, rootkey)
+                               if l2key is None:
+                                       return
+                               l3cert = etpm.getCert(eTPM.TPMD_DT_LEVEL3_CERT)
+                               if l3cert is None:
+                                       print "please run the genuine dreambox plugin"
+                                       return
+                               l3key = validate_cert(l3cert, l2key)
+                               if l3key is None:
+                                       return
+                               rnd = read_random()
+                               if rnd is None:
+                                       return
+                               val = etpm.challenge(rnd)
+                               result = decrypt_block(val, l3key)
+                       if self.hardware_info.device_name == "dm7025" or result[80:88] == rnd:
+                               if SoftwareTools.NetworkConnectionAvailable == True:
+                                       SoftwareTools.lastDownloadDate = time()
+                                       if SoftwareTools.list_updating is False and callback is None:
+                                               SoftwareTools.list_updating = True
+                                               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+                                       elif SoftwareTools.list_updating is False and callback is not None:
+                                               SoftwareTools.list_updating = True
+                                               self.NotifierCallback = callback
+                                               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+                                       elif SoftwareTools.list_updating is True and callback is not None:
+                                               self.NotifierCallback = callback
+                               else:
+                                       SoftwareTools.list_updating = False
+                                       if callback is not None:
+                                               callback(False)
+                                       elif self.NotifierCallback is not None:
+                                               self.NotifierCallback(False)
+                       else:
+                               SoftwareTools.NetworkConnectionAvailable = False
+                               SoftwareTools.list_updating = False
+                               if callback is not None:
+                                       callback(False)
+                               elif self.NotifierCallback is not None:
+                                       self.NotifierCallback(False)            
                else:
-                       SoftwareTools.list_updating = False
-                       if callback is not None:
-                               callback(False)
-                       elif self.NotifierCallback is not None:
-                               self.NotifierCallback(False)
+                       if SoftwareTools.NetworkConnectionAvailable == True:
+                               SoftwareTools.lastDownloadDate = time()
+                               if SoftwareTools.list_updating is False and callback is None:
+                                       SoftwareTools.list_updating = True
+                                       self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+                               elif SoftwareTools.list_updating is False and callback is not None:
+                                       SoftwareTools.list_updating = True
+                                       self.NotifierCallback = callback
+                                       self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+                               elif SoftwareTools.list_updating is True and callback is not None:
+                                       self.NotifierCallback = callback
+                       else:
+                               SoftwareTools.list_updating = False
+                               if callback is not None:
+                                       callback(False)
+                               elif self.NotifierCallback is not None:
+                                       self.NotifierCallback(False)
 
        def ipkgCallback(self, event, param):
                if event == IpkgComponent.EVENT_ERROR:
index cd425c3..4135a21 100755 (executable)
@@ -3,27 +3,17 @@
                     <tag type="Software" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>SoftwareManager</name>
                     <packagename>enigma2-plugin-systemplugins-softwaremanager</packagename>
-                    <shortdescription>SoftwareManager manages your Dreambox software.</shortdescription>
+                    <shortdescription>SoftwareManager manages your Dreambox software</shortdescription>
                     <description>The SoftwareManager manages your Dreambox software.\n
-                    It's easy to update your receiver's software, install or remove extensions or even backup and restore your system settings.
+                   It's easy to update your receiver's software, install or remove plugins or even backup and restore your system settings.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>SoftwareManager</name>
-                    <packagename>enigma2-plugin-systemplugins-softwaremanager</packagename>
-                    <shortdescription>Der SoftwareManager verwaltet Ihre Dreambox Software.</shortdescription>
-                    <description>Der SoftwareManager verwaltet Ihre Dreambox Software.\n
-                    Sie können nun einfach Ihre Dreambox-Software aktualisieren, neue Erweiterungen installieren oder entfernen,
-                    oder ihre Einstellungen sichern und wiederherstellen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_de.jpg" />
-          </info>
+
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-softwaremanager" />
          </files>
index 1e0ed4d..0cc5777 100755 (executable)
@@ -14,7 +14,8 @@ from Components.MenuList import MenuList
 from Components.Sources.List import List
 from Components.Slider import Slider
 from Components.Harddisk import harddiskmanager
-from Components.config import config,getConfigListEntry, ConfigSubsection, ConfigText, ConfigLocations
+from Components.config import config,getConfigListEntry, ConfigSubsection, ConfigText, ConfigLocations, ConfigYesNo, ConfigSelection
+from Components.ConfigList import ConfigListScreen
 from Components.Console import Console
 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
 from Components.SelectionList import SelectionList
@@ -26,7 +27,8 @@ from Components.AVSwitch import AVSwitch
 from Components.Network import iNetwork
 from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_PLUGIN, SCOPE_CURRENT_SKIN, SCOPE_METADIR
 from Tools.LoadPixmap import LoadPixmap
-from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad
+from Tools.NumericalTextInput import NumericalTextInput
+from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad, eRCInput, getPrevAsciiCode
 from cPickle import dump, load
 from os import path as os_path, system as os_system, unlink, stat, mkdir, popen, makedirs, listdir, access, rename, remove, W_OK, R_OK, F_OK
 from time import time, gmtime, strftime, localtime
@@ -43,6 +45,14 @@ config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
 config.plugins.configurationbackup.backupdirs = ConfigLocations(default=['/etc/enigma2/', '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
 
+config.plugins.SoftwareManager = ConfigSubsection()
+config.plugins.SoftwareManager.overwriteConfigFiles = ConfigSelection(
+                               [
+                                ("Y", _("Yes, always")),
+                                ("N", _("No, never")),                          
+                                ("ask", _("Always ask"))
+                               ], "Y")
+
 def write_cache(cache_file, cache_data):
        #Does a cPickle dump
        if not os_path.isdir( os_path.dirname(cache_file) ):
@@ -109,13 +119,16 @@ class UpdatePluginMenu(Screen):
                self.menu = args
                self.list = []
                self.oktext = _("\nPress OK on your remote control to continue.")
+               self.menutext = _("Press MENU on your remote control for additional options.")
+               self.infotext = _("Press INFO on your remote control for additional information.")
                self.text = ""
                self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
                if self.menu == 0:
+                       print "building menu entries"
                        self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your Dreambox" ) + self.oktext, None))
                        self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None))
                        self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None))
-                       self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext, None))
+                       self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext + "\n\n" + self.infotext, None))
                        self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None))
                        self.list.append(("ipkg-install", _("Install local extension"),  _("\nScan for local extensions and install them." ) + self.oktext, None))
                        for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER):
@@ -136,7 +149,7 @@ class UpdatePluginMenu(Screen):
                elif self.menu == 1:
                        self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None))
                        self.list.append(("backuplocation", _("Choose backup location"),  _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None))
-                       self.list.append(("backupfiles", _("Choose backup files"),  _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None))
+                       self.list.append(("backupfiles", _("Choose backup files"),  _("Select files for backup.") + self.oktext + "\n\n" + self.infotext, None))
                        if config.usage.setup_level.index >= 2: # expert+
                                self.list.append(("ipkg-manager", _("Packet management"),  _("\nView, install and remove available or installed packages." ) + self.oktext, None))
                        self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None))
@@ -156,25 +169,25 @@ class UpdatePluginMenu(Screen):
 
                self["menu"] = List(self.list)
                self["key_red"] = StaticText(_("Close"))
-               self["status"] = StaticText("")
+               self["status"] = StaticText(self.menutext)
 
-               self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions"],
+               self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "MenuActions"],
                {
                        "ok": self.go,
                        "back": self.close,
                        "red": self.close,
+                       "menu": self.handleMenu,
+                       "showEventInfo": self.handleInfo,
                }, -1)
                self.onLayoutFinish.append(self.layoutFinished)
                self.backuppath = getBackupPath()
                self.backupfile = getBackupFilename()
                self.fullbackupfilename = self.backuppath + "/" + self.backupfile
                self.onShown.append(self.setWindowTitle)
-               #self.onClose.append(self.cleanup)
 
        def layoutFinished(self):
                idx = 0
                self["menu"].index = idx
-               #self.getUpdateInfos()
 
        def setWindowTitle(self):
                self.setTitle(_("Software management"))
@@ -201,9 +214,17 @@ class UpdatePluginMenu(Screen):
                        self.text = _("No network connection available.")
                self["status"].setText(self.text)
 
+       def handleMenu(self):
+               self.session.open(SoftwareManagerSetup)
+               
+       def handleInfo(self):
+               current = self["menu"].getCurrent()
+               if current:
+                       currentEntry = current[0]
+                       if currentEntry in ("system-backup","backupfiles"):
+                               self.session.open(SoftwareManagerInfo, mode = "backupinfo")
 
        def go(self):
-               #iNetwork.stopPingConsole()
                current = self["menu"].getCurrent()
                if current:
                        currentEntry = current[0]
@@ -290,6 +311,185 @@ class UpdatePluginMenu(Screen):
                        self.exe = True
                        self.session.open(RestoreScreen, runRestore = True)
 
+class SoftwareManagerSetup(Screen, ConfigListScreen):
+
+       skin = """
+               <screen name="SoftwareManagerSetup" position="center,center" size="560,440" title="SoftwareManager setup">
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
+                       <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+                       <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+                       <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+                       <widget name="config" position="5,50" size="550,350" scrollbarMode="showOnDemand" />
+                       <ePixmap pixmap="skin_default/div-h.png" position="0,400" zPosition="1" size="560,2" />
+                       <widget source="introduction" render="Label" position="5,410" size="550,30" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />
+               </screen>"""
+
+       def __init__(self, session, skin_path = None):
+               Screen.__init__(self, session)
+               self.session = session
+               self.skin_path = skin_path
+               if self.skin_path == None:
+                       self.skin_path = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager")
+
+               self.onChangedEntry = [ ]
+               self.setup_title = _("Software manager setup")
+               self.overwriteConfigfilesEntry = None
+
+               self.list = [ ]
+               ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)
+
+               self["actions"] = ActionMap(["SetupActions"],
+                       {
+                               "cancel": self.keyCancel,
+                               "save": self.apply,
+                       }, -2)
+
+               self["key_red"] = StaticText(_("Cancel"))
+               self["key_green"] = StaticText(_("OK"))
+               self["key_yellow"] = StaticText()
+               self["key_blue"] = StaticText()
+               self["introduction"] = StaticText()
+
+               self.createSetup()
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(self.setup_title)
+
+       def createSetup(self):
+               self.list = [ ]
+               self.overwriteConfigfilesEntry = getConfigListEntry(_("Overwrite configuration files ?"), config.plugins.SoftwareManager.overwriteConfigFiles)
+               self.list.append(self.overwriteConfigfilesEntry)        
+               self["config"].list = self.list
+               self["config"].l.setSeperation(400)
+               self["config"].l.setList(self.list)
+               if not self.selectionChanged in self["config"].onSelectionChanged:
+                       self["config"].onSelectionChanged.append(self.selectionChanged)
+               self.selectionChanged()
+
+       def selectionChanged(self):
+               if self["config"].getCurrent() == self.overwriteConfigfilesEntry:
+                       self["introduction"].setText(_("Overwrite configuration files during software upgrade?"))
+               else:
+                       self["introduction"].setText("")
+
+       def newConfig(self):
+               pass
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+
+       def confirm(self, confirmed):
+               if not confirmed:
+                       print "not confirmed"
+                       return
+               else:
+                       self.keySave()
+
+       def apply(self):
+               self.session.openWithCallback(self.confirm, MessageBox, _("Use this settings?"), MessageBox.TYPE_YESNO, timeout = 20, default = True)
+
+       def cancelConfirm(self, result):
+               if not result:
+                       return
+               for x in self["config"].list:
+                       x[1].cancel()
+               self.close()
+
+       def keyCancel(self):
+               if self["config"].isChanged():
+                       self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"), MessageBox.TYPE_YESNO, timeout = 20, default = True)
+               else:
+                       self.close()
+
+       # for summary:
+       def changedEntry(self):
+               for x in self.onChangedEntry:
+                       x()
+               self.selectionChanged()
+
+       def getCurrentEntry(self):
+               return self["config"].getCurrent()[0]
+
+       def getCurrentValue(self):
+               return str(self["config"].getCurrent()[1].value)
+
+       def createSummary(self):
+               from Screens.Setup import SetupSummary
+               return SetupSummary
+
+
+class SoftwareManagerInfo(Screen):
+       skin = """
+               <screen name="SoftwareManagerInfo" position="center,center" size="560,440" title="SoftwareManager information">
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
+                       <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+                       <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+                       <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+                       <widget source="list" render="Listbox" position="5,50" size="550,340" scrollbarMode="showOnDemand" selectionDisabled="0">
+                               <convert type="TemplatedMultiContent">
+                                       {"template": [
+                                                       MultiContentEntryText(pos = (5, 0), size = (540, 26), font=0, flags = RT_HALIGN_LEFT | RT_HALIGN_CENTER, text = 0), # index 0 is the name
+                                               ],
+                                       "fonts": [gFont("Regular", 24),gFont("Regular", 22)],
+                                       "itemHeight": 26
+                                       }
+                               </convert>
+                       </widget>
+                       <ePixmap pixmap="skin_default/div-h.png" position="0,400" zPosition="1" size="560,2" />
+                       <widget source="introduction" render="Label" position="5,410" size="550,30" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />
+               </screen>"""
+
+       def __init__(self, session, skin_path = None, mode = None):
+               Screen.__init__(self, session)
+               self.session = session
+               self.mode = mode
+               self.skin_path = skin_path
+               if self.skin_path == None:
+                       self.skin_path = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager")
+
+               self["actions"] = ActionMap(["ShortcutActions", "WizardActions"],
+                       {
+                               "back": self.close,
+                               "red": self.close,
+                       }, -2)
+
+               self.list = []
+               self["list"] = List(self.list)
+               
+               self["key_red"] = StaticText(_("Close"))
+               self["key_green"] = StaticText()
+               self["key_yellow"] = StaticText()
+               self["key_blue"] = StaticText()
+               self["introduction"] = StaticText()
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(_("Softwaremanager information"))
+               if self.mode is not None:
+                       self.showInfos()
+
+       def showInfos(self):
+               if self.mode == "backupinfo":
+                       self.list = []
+                       backupfiles = config.plugins.configurationbackup.backupdirs.value
+                       for entry in backupfiles:
+                               print entry
+                               self.list.append((entry,))
+                       self['list'].setList(self.list)
+                       
 
 class PluginManager(Screen, DreamInfoHandler):
 
@@ -589,13 +789,13 @@ class PluginManager(Screen, DreamInfoHandler):
                                                status = "remove"
                                        else:
                                                status = "installed"
-                                       self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+                                       self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
                                else:
                                        if selectState == True:
                                                status = "install"
                                        else:
                                                status = "installable"
-                                       self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+                                       self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
                        if len(self.list):
                                self.list.sort(key=lambda x: x[0])
                        self["list"].style = "default"
@@ -904,8 +1104,7 @@ class PluginDetails(Screen, DreamInfoHandler):
                self.skin_path = plugin_path
                self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
                self.attributes = None
-               self.translatedAttributes = None
-               DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, language = self.language)
+               DreamInfoHandler.__init__(self, self.statusCallback, blocking = False)
                self.directory = resolveFilename(SCOPE_METADIR)
                if packagedata:
                        self.pluginname = packagedata[0]
@@ -943,8 +1142,6 @@ class PluginDetails(Screen, DreamInfoHandler):
                self.package = self.packageDetails[0]
                if self.package[0].has_key("attributes"):
                        self.attributes = self.package[0]["attributes"]
-               if self.package[0].has_key("translation"):
-                       self.translatedAttributes = self.package[0]["translation"]
 
                self.cmdList = []
                self.oktext = _("\nAfter pressing OK, please wait!")
@@ -954,7 +1151,7 @@ class PluginDetails(Screen, DreamInfoHandler):
                self.onLayoutFinish.append(self.setInfos)
 
        def setWindowTitle(self):
-               self.setTitle(_("Details for extension: " + self.pluginname))
+               self.setTitle(_("Details for plugin: ") + self.pluginname )
 
        def exit(self):
                self.close(False)
@@ -969,34 +1166,26 @@ class PluginDetails(Screen, DreamInfoHandler):
                pass
 
        def setInfos(self):
-               if self.translatedAttributes.has_key("name"):
-                       self.pluginname = self.translatedAttributes["name"]
-               elif self.attributes.has_key("name"):
+               if self.attributes.has_key("screenshot"):
+                       self.loadThumbnail(self.attributes)
+
+               if self.attributes.has_key("name"):
                        self.pluginname = self.attributes["name"]
                else:
                        self.pluginname = _("unknown")
 
-               if self.translatedAttributes.has_key("author"):
-                       self.author = self.translatedAttributes["author"]
-               elif self.attributes.has_key("author"):
+               if self.attributes.has_key("author"):
                        self.author = self.attributes["author"]
                else:
                        self.author = _("unknown")
 
-               if self.translatedAttributes.has_key("description"):
-                       self.description = self.translatedAttributes["description"]
-               elif self.attributes.has_key("description"):
-                       self.description = self.attributes["description"]
+               if self.attributes.has_key("description"):
+                       self.description = _(self.attributes["description"].replace("\\n", "\n"))
                else:
                        self.description = _("No description available.")
 
-               if self.translatedAttributes.has_key("screenshot"):
-                       self.loadThumbnail(self.translatedAttributes)
-               else:
-                       self.loadThumbnail(self.attributes)
-
                self["author"].setText(_("Author: ") + self.author)
-               self["detailtext"].setText(self.description.strip())
+               self["detailtext"].setText(_(self.description))
                if self.pluginstate in ('installable', 'install'):
                        self["key_green"].setText(_("Install"))
                else:
@@ -1006,6 +1195,10 @@ class PluginDetails(Screen, DreamInfoHandler):
                thumbnailUrl = None
                if entry.has_key("screenshot"):
                        thumbnailUrl = entry["screenshot"]
+                       if self.language == "de":
+                               if thumbnailUrl[-7:] == "_en.jpg":
+                                       thumbnailUrl = thumbnailUrl[:-7] + "_de.jpg"
+
                if thumbnailUrl is not None:
                        self.thumbnail = "/tmp/" + thumbnailUrl.split('/')[-1]
                        print "[PluginDetails] downloading screenshot " + thumbnailUrl + " to " + self.thumbnail
@@ -1095,7 +1288,7 @@ class PluginDetails(Screen, DreamInfoHandler):
 
 class UpdatePlugin(Screen):
        skin = """
-               <screen name="UpdatePlugin" position="center,center" size="550,200" title="Software update" >
+               <screen name="UpdatePlugin" position="center,center" size="550,300" title="Software update" >
                        <widget name="activityslider" position="0,0" size="550,5"  />
                        <widget name="slider" position="0,150" size="550,30"  />
                        <widget source="package" render="Label" position="10,30" size="540,20" font="Regular;18" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />
@@ -1115,9 +1308,11 @@ class UpdatePlugin(Screen):
                self["status"] = self.status
                self.package = StaticText()
                self["package"] = self.package
+               self.oktext = _("Press OK on your remote control to continue.")
 
                self.packages = 0
                self.error = 0
+               self.processed_packages = []
 
                self.activity = 0
                self.activityTimer = eTimer()
@@ -1151,20 +1346,34 @@ class UpdatePlugin(Screen):
                                self.slider.setValue(self.sliderPackages[param])
                        self.package.setText(param)
                        self.status.setText(_("Upgrading"))
-                       self.packages += 1
+                       if not param in self.processed_packages:
+                               self.processed_packages.append(param)
+                               self.packages += 1
                elif event == IpkgComponent.EVENT_INSTALL:
                        self.package.setText(param)
                        self.status.setText(_("Installing"))
-                       self.packages += 1
+                       if not param in self.processed_packages:
+                               self.processed_packages.append(param)
+                               self.packages += 1
+               elif event == IpkgComponent.EVENT_REMOVE:
+                       self.package.setText(param)
+                       self.status.setText(_("Removing"))
+                       if not param in self.processed_packages:
+                               self.processed_packages.append(param)
+                               self.packages += 1
                elif event == IpkgComponent.EVENT_CONFIGURING:
                        self.package.setText(param)
                        self.status.setText(_("Configuring"))
+                       
                elif event == IpkgComponent.EVENT_MODIFIED:
-                       self.session.openWithCallback(
-                               self.modificationCallback,
-                               MessageBox,
-                               _("A configuration file (%s) was modified since Installation.\nDo you want to keep your version?") % (param)
-                       )
+                       if config.plugins.SoftwareManager.overwriteConfigFiles.value in ("N", "Y"):
+                               self.ipkg.write(True and config.plugins.SoftwareManager.overwriteConfigFiles.value)
+                       else:
+                               self.session.openWithCallback(
+                                       self.modificationCallback,
+                                       MessageBox,
+                                       _("A configuration file (%s) was modified since Installation.\nDo you want to keep your version?") % (param)
+                               )
                elif event == IpkgComponent.EVENT_ERROR:
                        self.error += 1
                elif event == IpkgComponent.EVENT_DONE:
@@ -1178,7 +1387,7 @@ class UpdatePlugin(Screen):
                                self.activityslider.setValue(0)
                                
                                self.package.setText("")
-                               self.status.setText(_("Done - Installed or upgraded %d packages") % self.packages)
+                               self.status.setText(_("Done - Installed or upgraded %d packages") % self.packages + "\n\n" + self.oktext)
                        else:
                                self.activityTimer.stop()
                                self.activityslider.setValue(0)
@@ -1381,7 +1590,7 @@ class IPKGSource(Screen):
                self["text"].number(number)
 
 
-class PacketManager(Screen):
+class PacketManager(Screen, NumericalTextInput):
        skin = """
                <screen name="PacketManager" position="center,center" size="530,420" title="Packet manager" >
                        <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
@@ -1405,15 +1614,29 @@ class PacketManager(Screen):
                
        def __init__(self, session, plugin_path, args = None):
                Screen.__init__(self, session)
+               NumericalTextInput.__init__(self)
                self.session = session
                self.skin_path = plugin_path
 
-               self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"], 
+               self.setUseableChars(u'1234567890abcdefghijklmnopqrstuvwxyz')
+
+               self["shortcuts"] = NumberActionMap(["ShortcutActions", "WizardActions", "NumberActions", "InputActions", "InputAsciiActions", "KeyboardInputActions" ],
                {
                        "ok": self.go,
                        "back": self.exit,
                        "red": self.exit,
                        "green": self.reload,
+                       "gotAsciiCode": self.keyGotAscii,
+                       "1": self.keyNumberGlobal,
+                       "2": self.keyNumberGlobal,
+                       "3": self.keyNumberGlobal,
+                       "4": self.keyNumberGlobal,
+                       "5": self.keyNumberGlobal,
+                       "6": self.keyNumberGlobal,
+                       "7": self.keyNumberGlobal,
+                       "8": self.keyNumberGlobal,
+                       "9": self.keyNumberGlobal,
+                       "0": self.keyNumberGlobal
                }, -1)
                
                self.list = []
@@ -1438,12 +1661,44 @@ class PacketManager(Screen):
                self.onShown.append(self.setWindowTitle)
                self.onLayoutFinish.append(self.rebuildList)
 
+               rcinput = eRCInput.getInstance()
+               rcinput.setKeyboardMode(rcinput.kmAscii)                
+
+       def keyNumberGlobal(self, val):
+               key = self.getKey(val)
+               if key is not None:
+                       keyvalue = key.encode("utf-8")
+                       if len(keyvalue) == 1:
+                               self.setNextIdx(keyvalue[0])
+               
+       def keyGotAscii(self):
+               keyvalue = unichr(getPrevAsciiCode()).encode("utf-8")
+               if len(keyvalue) == 1:
+                       self.setNextIdx(keyvalue[0])
+               
+       def setNextIdx(self,char):
+               if char in ("0", "1", "a"):
+                       self["list"].setIndex(0)
+               else:
+                       idx = self.getNextIdx(char)
+                       if idx and idx <= self["list"].count:
+                               self["list"].setIndex(idx)
+
+       def getNextIdx(self,char):
+               idx = 0
+               for i in self["list"].list:
+                       if i[0][0] == char:
+                               return idx
+                       idx += 1
+
        def exit(self):
                self.ipkg.stop()
                if self.Console is not None:
                        if len(self.Console.appContainers):
                                for name in self.Console.appContainers.keys():
                                        self.Console.kill(name)
+               rcinput = eRCInput.getInstance()
+               rcinput.setKeyboardMode(rcinput.kmNone)
                self.close()
 
        def reload(self):
diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/LICENSE b/lib/python/Plugins/SystemPlugins/TempFanControl/LICENSE
new file mode 100755 (executable)
index 0000000..9970059
--- /dev/null
@@ -0,0 +1,12 @@
+This plugin is licensed under the Creative Commons 
+Attribution-NonCommercial-ShareAlike 3.0 Unported 
+License. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative
+Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+
+Alternatively, this plugin may be distributed and executed on hardware which
+is licensed by Dream Multimedia GmbH.
+
+This plugin is NOT free software. It is open source, you are allowed to
+modify it (if you keep the license), but it may not be commercially 
+distributed other than under the conditions noted above.
old mode 100644 (file)
new mode 100755 (executable)
index 78ff11c..cfdeb65
@@ -1,5 +1,9 @@
 installdir = $(LIBDIR)/enigma2/python/Plugins/SystemPlugins/TempFanControl
 
+SUBDIRS = meta
+
 install_PYTHON = \
        __init__.py \
        plugin.py
+
+dist_install_DATA = LICENSE
\ No newline at end of file
diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile.am
new file mode 100755 (executable)
index 0000000..da7be24
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_tempfancontrol.xml
diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/meta/plugin_tempfancontrol.xml b/lib/python/Plugins/SystemPlugins/TempFanControl/meta/plugin_tempfancontrol.xml
new file mode 100755 (executable)
index 0000000..a0bb5fa
--- /dev/null
@@ -0,0 +1,18 @@
+<default>
+         <prerequisites>
+                    <hardware type="dm8000" />
+                    <hardware type="dm500hd" />
+                    <tag type="System" />
+         </prerequisites>
+          <info>
+                    <author>Dream Multimedia</author>
+                    <name>TempFanControl</name>
+                    <packagename>enigma2-plugin-systemplugins-tempfancontrol</packagename>
+                    <shortdescription>Control your system fan</shortdescription>
+                    <description>Control your internal system fan.</description>
+          </info>
+
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-tempfancontrol" />
+       </files>
+</default>
old mode 100644 (file)
new mode 100755 (executable)
index c8af9cd..42fe82d
@@ -131,6 +131,7 @@ class TempFanControl(Screen, ConfigListScreen):
                ConfigListScreen.__init__(self, self.list, session = self.session)
                #self["config"].list = self.list
                #self["config"].setList(self.list)
+               self["config"].l.setSeperation(300)
                
                self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], 
                {
index 208c7e0..11b0c59 100755 (executable)
@@ -6,22 +6,14 @@
                     <tag type="Display" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>VideoEnhancement</name>
                     <packagename>enigma2-plugin-systemplugins-videoenhancement</packagename>
-                    <shortdescription>VideoEnhancement provides advanced video enhancement settings.</shortdescription>
-                    <description>The VideoEnhancement extension provides advanced video enhancement settings.</description>
+                    <shortdescription>VideoEnhancement provides advanced video enhancement settings</shortdescription>
+                    <description>The VideoEnhancement plugin provides advanced video enhancement settings.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videoenhancement_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Erweiterte A/V Einstellungen</name>
-                    <packagename>enigma2-plugin-systemplugins-videoenhancement</packagename>
-                    <shortdescription>Erweiterte A/V Einstellungen für Ihre Dreambox.</shortdescription>
-                    <description>Erweiterte A/V Einstellungen für Ihre Dreambox.</description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videoenhancement_de.jpg" />
-          </info>
 
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-videoenhancement" />
index c460943..78b170a 100755 (executable)
@@ -3,23 +3,14 @@
                     <tag type="Display" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>VideoTune</name>
                     <packagename>enigma2-plugin-systemplugins-videotune</packagename>
-                    <shortdescription>VideoTune helps fine-tuning your tv display.</shortdescription>
+                    <shortdescription>VideoTune helps fine-tuning your tv display</shortdescription>
                     <description>The VideoTune helps fine-tuning your tv display.\nYou can control brightness and contrast of your tv.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videotune.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia - DE</author>
-                    <name>VideoTune - DE </name>
-                    <packagename>enigma2-plugin-systemplugins-videotune</packagename>
-                    <shortdescription>VideoTune hilft beim fein-einstellen des Fernsehers.</shortdescription>
-                    <description>VideoTune hilf beim fein-einstellen des Fernsehers.\nSie können Kontrast und Helligkeit fein-einstellen.
-                    </description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videotune.jpg" />
-          </info>
          <files type="package"> <!-- ohne versionsnummer, ohne .ipkg -->
                <file type="package" name="enigma2-plugin-systemplugins-videotune" />
          </files>
index fbb6e3f..e16a7dc 100755 (executable)
@@ -3,22 +3,14 @@
                     <tag type="Display" />
                     <tag type="System" />
          </prerequisites>
-          <info language="en">
+          <info>
                     <author>Dream Multimedia</author>
                     <name>Videomode</name>
                     <packagename>enigma2-plugin-systemplugins-videomode</packagename>
-                    <shortdescription>Videomode provides advanced video modes.</shortdescription>
-                    <description>The Videomode extension provides advanced video modes.</description>
+                    <shortdescription>Videomode provides advanced video mode settings</shortdescription>
+                    <description>The Videomode plugin provides advanced video mode settings.</description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videomode_en.jpg" />
           </info>
-          <info language="de">
-                    <author>Dream Multimedia</author>
-                    <name>Videomode</name>
-                    <packagename>enigma2-plugin-systemplugins-videomode</packagename>
-                    <shortdescription>Videomode bietet erweiterte Video Einstellungen.</shortdescription>
-                    <description>Die Videomode-Erweiterung bietet erweiterte Video-Einstellungen.</description>
-                    <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videomode_de.jpg" />
-          </info>
 
          <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-systemplugins-videomode" />
index 2f36237..bdc1a88 100755 (executable)
@@ -4,8 +4,6 @@ SUBDIRS = meta
 
 install_PYTHON =       \
        __init__.py \
-       flags.py \
-       iwlibs.py \
        plugin.py \
        Wlan.py
 
index 1c1471c..baefd43 100755 (executable)
@@ -1,7 +1,3 @@
-#from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER
-#from Components.MultiContent import MultiContentEntryText
-#from Components.GUIComponent import GUIComponent
-#from Components.HTMLComponent import HTMLComponent
 from Components.config import config, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, ConfigSelection, ConfigPassword
 from Components.Console import Console
 
@@ -10,7 +6,8 @@ from string import maketrans, strip
 import sys
 import types
 from re import compile as re_compile, search as re_search
-from iwlibs import getNICnames, Wireless, Iwfreq
+from pythonwifi.iwlibs import getNICnames, Wireless, Iwfreq, getWNICnames
+from pythonwifi import flags as wififlags
 
 list = []
 list.append("WEP")
@@ -65,38 +62,42 @@ class Wlan:
                print "self.iface im iwconfigFinished",self.iface
                callback = extra_args
                data = { 'essid': False, 'frequency': False, 'acesspoint': False, 'bitrate': False, 'encryption': False, 'quality': False, 'signal': False }
-               #print "result im iwconfigFinished",result
                
                for line in result.splitlines():
-                       #print "line",line
                        line = line.strip()
                        if "ESSID" in line:
                                if "off/any" in line:
                                        ssid = _("No Connection")
                                else:
-                                       tmpssid=(line[line.index('ESSID')+7:len(line)-1])
-                                       if tmpssid == '':
-                                               ssid = _("Hidden networkname")
-                                       elif tmpssid ==' ':
-                                               ssid = _("Hidden networkname")
+                                       if "Nickname" in line:
+                                               tmpssid=(line[line.index('ESSID')+7:line.index('"  Nickname')])
+                                               if tmpssid == '':
+                                                       ssid = _("Hidden networkname")
+                                               elif tmpssid ==' ':
+                                                       ssid = _("Hidden networkname")
+                                               else:
+                                                       ssid = tmpssid
                                        else:
-                                           ssid = tmpssid
-                               #print "SSID->",ssid
+                                               tmpssid=(line[line.index('ESSID')+7:len(line)-1])
+                                               if tmpssid == '':
+                                                       ssid = _("Hidden networkname")
+                                               elif tmpssid ==' ':
+                                                       ssid = _("Hidden networkname")
+                                               else:
+                                                       ssid = tmpssid                                          
+
                                if ssid is not None:
                                        data['essid'] = ssid
                        if 'Frequency' in line:
                                frequency = line[line.index('Frequency')+10 :line.index(' GHz')]
-                               #print "Frequency",frequency   
                                if frequency is not None:
                                        data['frequency'] = frequency
                        if "Access Point" in line:
                                ap=line[line.index('Access Point')+14:len(line)-1]
-                               #print "AP",ap
                                if ap is not None:
                                        data['acesspoint'] = ap
                        if "Bit Rate" in line:
                                br = line[line.index('Bit Rate')+9 :line.index(' Mb/s')]
-                               #print "Bitrate",br
                                if br is not None:
                                        data['bitrate'] = br
                        if 'Encryption key' in line:
@@ -104,7 +105,6 @@ class Wlan:
                                    enc = _("Disabled")
                                else:
                                    enc = line[line.index('Encryption key')+15 :line.index('   Security')]
-                               #print "Encryption key",enc 
                                if enc is not None:
                                        data['encryption'] = _("Enabled")
                        if 'Quality' in line:
@@ -112,12 +112,10 @@ class Wlan:
                                        qual = line[line.index('Quality')+8:line.index('/100')]
                                else:
                                        qual = line[line.index('Quality')+8:line.index('Sig')]
-                               #print "Quality",qual
                                if qual is not None:
                                        data['quality'] = qual
                        if 'Signal level' in line:
-                               signal = line[line.index('Signal level')+14 :line.index(' dBm')]
-                               #print "Signal level",signal            
+                               signal = line[line.index('Signal level')+13 :line.index(' dBm')]
                                if signal is not None:
                                        data['signal'] = signal
 
@@ -130,7 +128,6 @@ class Wlan:
                                callback(True,self.wlaniface)
 
        def getAdapterAttribute(self, attribute):
-               print "im getAdapterAttribute"
                if self.wlaniface.has_key(self.iface):
                        print "self.wlaniface.has_key",self.iface
                        if self.wlaniface[self.iface].has_key(attribute):
@@ -142,13 +139,17 @@ class Wlan:
 
        
        def getWirelessInterfaces(self):
-               iwifaces = None
-               try:
-                       iwifaces = getNICnames()
-               except:
-                       print "[Wlan.py] No Wireless Networkcards could be found"
-               
-               return iwifaces
+               device = re_compile('[a-z]{2,}[0-9]*:')
+               ifnames = []
+
+               fp = open('/proc/net/wireless', 'r')
+               for line in fp:
+                       try:
+                               # append matching pattern, without the trailing colon
+                               ifnames.append(device.search(line).group()[:-1])
+                       except AttributeError:
+                               pass
+               return ifnames
 
        
        def getNetworkList(self):
@@ -156,8 +157,8 @@ class Wlan:
                ifobj = Wireless(self.iface) # a Wireless NIC Object
                
                #Association mappings
-               stats, quality, discard, missed_beacon = ifobj.getStatistics()
-               snr = quality.signallevel - quality.noiselevel
+               #stats, quality, discard, missed_beacon = ifobj.getStatistics()
+               #snr = quality.signallevel - quality.noiselevel
 
                try:
                        scanresults = ifobj.scan()
@@ -167,55 +168,47 @@ class Wlan:
                
                if scanresults is not None:
                        aps = {}
+                       (num_channels, frequencies) = ifobj.getChannelInfo()
+                       index = 1
                        for result in scanresults:
-                       
                                bssid = result.bssid
-               
-                               encryption = map(lambda x: hex(ord(x)), result.encode)
-               
-                               if encryption[-1] == "0x8":
+
+                               if result.encode.flags & wififlags.IW_ENCODE_DISABLED > 0:
+                                       encryption = False
+                               elif result.encode.flags & wififlags.IW_ENCODE_NOKEY > 0:
                                        encryption = True
                                else:
-                                       encryption = False
-               
+                                       encryption = None
+                               
+                               signal = str(result.quality.siglevel-0x100) + " dBm"
+                               quality = "%s/%s" % (result.quality.quality,ifobj.getQualityMax().quality)
+                               
                                extra = []
                                for element in result.custom:
                                        element = element.encode()
                                        extra.append( strip(self.asciify(element)) )
-                               
-                               if result.quality.sl is 0 and len(extra) > 0:
-                                       begin = extra[0].find('SignalStrength=')+15
-                                                                       
-                                       done = False
-                                       end = begin+1
-                                       
-                                       while not done:
-                                               if extra[0][begin:end].isdigit():
-                                                       end += 1
-                                               else:
-                                                       done = True
-                                                       end -= 1
-                                       
-                                       signal = extra[0][begin:end]
-                                       #print "[Wlan.py] signal is:" + str(signal)
+                               for element in extra:
+                                       print element
+                                       if 'SignalStrength' in element:
+                                               signal = element[element.index('SignalStrength')+15:element.index(',L')]                                        
+                                       if 'LinkQuality' in element:
+                                               quality = element[element.index('LinkQuality')+12:len(element)]                         
 
-                               else:
-                                       signal = str(result.quality.sl)
-                               
                                aps[bssid] = {
                                        'active' : True,
                                        'bssid': result.bssid,
-                                       'channel': result.frequency.getChannel(result.frequency.getFrequency()),
+                                       'channel': frequencies.index(ifobj._formatFrequency(result.frequency.getFrequency())) + 1,
                                        'encrypted': encryption,
                                        'essid': strip(self.asciify(result.essid)),
                                        'iface': self.iface,
-                                       'maxrate' : result.rate[-1],
-                                       'noise' : result.quality.getNoiselevel(),
-                                       'quality' : str(result.quality.quality),
-                                       'signal' : signal,
+                                       'maxrate' : ifobj._formatBitrate(result.rate[-1][-1]),
+                                       'noise' : '',#result.quality.nlevel-0x100,
+                                       'quality' : str(quality),
+                                       'signal' : str(signal),
                                        'custom' : extra,
                                }
-                               print aps[bssid]
+                               #print "GOT APS ENTRY:",aps[bssid]
+                               index = index + 1
                        return aps
 
                
@@ -226,12 +219,11 @@ class Wlan:
                        self.channel = str(fq.getChannel(str(ifobj.getFrequency()[0:-3])))
                except:
                        self.channel = 0
-               #print ifobj.getStatistics()
                status = {
-                                 'BSSID': str(ifobj.getAPaddr()),
+                                 'BSSID': str(ifobj.getAPaddr()), #ifobj.getStatistics()
                                  'ESSID': str(ifobj.getEssid()),
-                                 'quality': str(ifobj.getStatistics()[1].quality),
-                                 'signal': str(ifobj.getStatistics()[1].sl),
+                                 'quality': "%s/%s" % (ifobj.getStatistics()[1].quality,ifobj.getQualityMax().quality),
+                                 'signal': str(ifobj.getStatistics()[1].siglevel-0x100) + " dBm",
                                  'bitrate': str(ifobj.getBitrate()),
                                  'channel': str(self.channel),
                                  #'channel': str(fq.getChannel(str(ifobj.getFrequency()[0:-3]))),
@@ -326,7 +318,6 @@ class wpaSupplicant:
                                        essid = split[1][1:-1]
                                        
                                elif split[0] == 'proto':
-                                       print "split[1]",split[1]
                                        config.plugins.wlan.encryption.enabled.value = True
                                        if split[1] == "WPA" :
                                                mode = 'WPA'
@@ -354,12 +345,9 @@ class wpaSupplicant:
                                        else:
                                                config.plugins.wlan.encryption.wepkeytype.value = 'HEX'
                                                config.plugins.wlan.encryption.psk.value = split[1]                                             
-                                       print "[Wlan.py] Got Encryption: WEP - keytype is: "+config.plugins.wlan.encryption.wepkeytype.value
-                                       print "[Wlan.py] Got Encryption: WEP - key0 is: "+config.plugins.wlan.encryption.psk.value
                                        
                                elif split[0] == 'psk':
                                        config.plugins.wlan.encryption.psk.value = split[1][1:-1]
-                                       print "[Wlan.py] Got PSK: "+split[1][1:-1]
                                else:
                                        pass
                                
@@ -436,24 +424,30 @@ class Status:
                                if "off/any" in line:
                                        ssid = _("No Connection")
                                else:
-                                       tmpssid=(line[line.index('ESSID')+7:len(line)-1])
-                                       if tmpssid == '':
-                                               ssid = _("Hidden networkname")
-                                       elif tmpssid ==' ':
-                                               ssid = _("Hidden networkname")
+                                       if "Nickname" in line:
+                                               tmpssid=(line[line.index('ESSID')+7:line.index('"  Nickname')])
+                                               if tmpssid == '':
+                                                       ssid = _("Hidden networkname")
+                                               elif tmpssid ==' ':
+                                                       ssid = _("Hidden networkname")
+                                               else:
+                                                       ssid = tmpssid
                                        else:
-                                           ssid = tmpssid
-                               #print "SSID->",ssid
+                                               tmpssid=(line[line.index('ESSID')+7:len(line)-1])
+                                               if tmpssid == '':
+                                                       ssid = _("Hidden networkname")
+                                               elif tmpssid ==' ':
+                                                       ssid = _("Hidden networkname")
+                                               else:
+                                                       ssid = tmpssid                                          
                                if ssid is not None:
                                        data['essid'] = ssid
                        if 'Frequency' in line:
                                frequency = line[line.index('Frequency')+10 :line.index(' GHz')]
-                               #print "Frequency",frequency   
                                if frequency is not None:
                                        data['frequency'] = frequency
                        if "Access Point" in line:
                                ap=line[line.index('Access Point')+14:len(line)]
-                               #print "AP",ap
                                if ap is not None:
                                        data['acesspoint'] = ap
                                        if ap == "Not-Associated":
@@ -467,7 +461,6 @@ class Status:
                                                br += " Mb/s"
                                else:
                                        br = line[line.index('Bit Rate')+9 :line.index(' Mb/s')] + " Mb/s"
-                               #print "Bitrate",br
                                if br is not None:
                                        data['bitrate'] = br
                        if 'Encryption key' in line:
@@ -480,28 +473,30 @@ class Status:
                                        enc = line[line.index('Encryption key')+15 :line.index('   Security')]
                                        if enc is not None:
                                                enc = _("Enabled")
-                               #print "Encryption key",enc 
                                if enc is not None:
                                        data['encryption'] = enc
                        if 'Quality' in line:
                                if "/100" in line:
-                                       qual = line[line.index('Quality')+8:line.index('/100')]
+                                       #qual = line[line.index('Quality')+8:line.index('/100')]
+                                       qual = line[line.index('Quality')+8:line.index('  Signal')]
                                else:
                                        qual = line[line.index('Quality')+8:line.index('Sig')]
-                               #print "Quality",qual
                                if qual is not None:
                                        data['quality'] = qual
                        if 'Signal level' in line:
                                if "dBm" in line:
-                                       signal = line[line.index('Signal level')+14 :line.index(' dBm')]
+                                       signal = line[line.index('Signal level')+13 :line.index(' dBm')]
                                        signal += " dBm"
                                elif "/100" in line:
-                                       signal = line[line.index('Signal level')+13:line.index('/100  Noise')]
-                                       signal += "%"
+                                       if "Noise" in line:
+                                               signal = line[line.index('Signal level')+13:line.index('  Noise')]
+                                       else:
+                                               signal = line[line.index('Signal level')+13:len(line)]
                                else:
-                                       signal = line[line.index('Signal level')+13:line.index('  Noise')]
-                                       signal += "%"
-                               #print "Signal level",signal            
+                                       if "Noise" in line:
+                                               signal = line[line.index('Signal level')+13:line.index('  Noise')]
+                                       else:
+                                               signal = line[line.index('Signal level')+13:len(line)]                                          
                                if signal is not None:
                                        data['signal'] = signal
 
@@ -515,12 +510,10 @@ class Status:
                                        callback(True,self.wlaniface)
 
        def getAdapterAttribute(self, iface, attribute):
-               print "im getAdapterAttribute"
                self.iface = iface
                if self.wlaniface.has_key(self.iface):
-                       print "self.wlaniface.has_key",self.iface
                        if self.wlaniface[self.iface].has_key(attribute):
                                return self.wlaniface[self.iface][attribute]
                return None
        
-iStatus = Status()
\ No newline at end of file
+iStatus = Status()
diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/flags.py b/lib/python/Plugins/SystemPlugins/WirelessLan/flags.py
deleted file mode 100755 (executable)
index 4435f84..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- coding: ISO-8859-1 -*-
-# python-wifi -- a wireless library to access wireless cards via python
-# Copyright (C) 2004, 2005, 2006 Róman Joost
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public License
-#    as published by the Free Software Foundation; either version 2.1 of
-#    the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful, but
-#    WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-#    USA 
-
-modes = ['Auto', 
-         'Ad-Hoc',
-         'Managed',
-         'Master', 
-         'Repeat',
-         'Second',
-         'Monitor']
-
-IFNAMSIZE = 16
-IW_ESSID_MAX_SIZE = 16
-
-KILO = 10**3
-MEGA = 10**6
-GIGA = 10**9
-
-# ioctl calls for the Linux/i386 kernel
-SIOCIWFIRST   = 0x8B00    # FIRST ioctl identifier
-SIOCGIFCONF   = 0x8912    # ifconf struct
-SIOCGIWNAME   = 0x8B01    # get name == wireless protocol
-SIOCGIWFREQ   = 0x8B05    # get channel/frequency
-SIOCSIWMODE   = 0x8B06    # set the operation mode
-SIOCGIWMODE   = 0x8B07    # get operation mode
-SIOCGIWSENS   = 0x8B09    # get sensitivity
-SIOCGIWAP     = 0x8B15    # get AP MAC address
-SIOCSIWSCAN   = 0x8B18    # set scanning off
-SIOCGIWSCAN   = 0x8B19    # get scanning results
-SIOCGIWRATE   = 0x8B21    # get default bit rate
-SIOCGIWRTS    = 0x8B23    # get rts/cts threshold
-SIOCGIWFRAG   = 0x8B25    # get fragmention thrh
-SIOCGIWTXPOW  = 0x8B27    # get transmit power (dBm)
-SIOCGIWRETRY  = 0x8B29    # get retry limit
-SIOCGIWRANGE  = 0x8B0B    # range
-SIOCGIWSTATS  = 0x8B0F    # get wireless statistics
-SIOCSIWESSID  = 0x8B1A    # set essid
-SIOCGIWESSID  = 0x8B1B    # get essid
-SIOCGIWPOWER  = 0x8B2D    # get power managment settings
-SIOCGIWENCODE = 0x8B2B    # get encryption information
-SIOCIWLAST    = 0x8BFF    # LAST ioctl identifier
-
-# Power management flags
-IW_POWER_ON = 0x0000        # No details ...
-IW_POWER_TYPE = 0xF000      # Type of parameter
-IW_POWER_PERIOD = 0x1000    # Value is a period/duration of
-IW_POWER_TIMEOUT = 0x2000   # Value is a timeout
-IW_POWER_MODE = 0x0F00      # Power management mode
-IW_POWER_MIN = 0x0001       # Value is a minimum
-IW_POWER_MAX = 0x0002       # Value is a maximum
-IW_POWER_RELATIVE = 0x0004  # Value is not in seconds/ms/us
-
-# Retry limits 
-IW_RETRY_TYPE = 0xF000      # Type of parameter
-
-# encoding stuff
-IW_ENCODE_DISABLED = 0x8000     # encoding is disabled
-IW_ENCODE_NOKEY = 0x0800      # key is write only, not present
-
-# constants responsible for scanning
-IW_SCAN_MAX_DATA = 4096
-
-IW_EV_LCP_LEN = 4
-IW_EV_CHAR_LEN = IW_EV_LCP_LEN + IFNAMSIZE
-IW_EV_UINT_LEN = IW_EV_LCP_LEN + 4
-IW_EV_FREQ_LEN = IW_EV_LCP_LEN + 8
-IW_EV_ADDR_LEN = IW_EV_LCP_LEN + 16
-IW_EV_POINT_LEN = IW_EV_LCP_LEN + 4
-IW_EV_PARAM_LEN = IW_EV_LCP_LEN + 8
-IW_EV_QUAL_LEN = IW_EV_LCP_LEN + 4
-
-EPERM = 1
-E2BIG = 7
-EAGAIN = 11
-
-IWHT_NULL = 0
-IWHT_CHAR = 2
-IWHT_UINT = 4
-IWHT_FREQ = 5
-IWHT_ADDR = 6
-IWHT_POINT = 8
-IWHT_PARAM = 9
-IWHT_QUAL = 10
-
-IWEVFIRST     = 0x8C00    # FIRST event identifier
-IWEVQUAL      = 0x8C01    # Quality statistics from scan
-IWEVCUSTOM    = 0x8C02    # Custom Ascii string from Driver
-IWEVLAST      = 0x8C0A    # LAST event identifier
diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/iwlibs.py b/lib/python/Plugins/SystemPlugins/WirelessLan/iwlibs.py
deleted file mode 100755 (executable)
index c5f9c6d..0000000
+++ /dev/null
@@ -1,1114 +0,0 @@
-# -*- coding: ISO-8859-1 -*-
-# python-wifi -- a wireless library to access wireless cards via python
-# Copyright (C) 2004, 2005, 2006 Róman Joost
-# 
-# Contributions from:
-#   Mike Auty <m.auty@softhome.net> (Iwscanresult, Iwscan)
-#
-#    This library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public License
-#    as published by the Free Software Foundation; either version 2.1 of
-#    the License, or (at your option) any later version.
-#
-#    This library is distributed in the hope that it will be useful, but
-#    WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#    Lesser General Public License for more details.
-#
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with this library; if not, write to the Free Software
-#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-#    USA 
-
-from struct import pack as struct_pack, \
-       unpack as struct_unpack, \
-       calcsize as struct_calcsize
-
-from array import array
-from math import ceil, log10
-from fcntl import ioctl
-from socket import AF_INET, SOCK_DGRAM, socket
-from time import sleep
-from re import compile
-
-from flags import *    
-
-def getNICnames():
-    """ extract wireless device names of /proc/net/wireless 
-        
-        returns empty list if no devices are present
-
-        >>> getNICnames()
-        ['eth1', 'wifi0']
-    """
-    device = compile('[a-z]+[0-9]+')
-    ifnames = []
-    
-    f = open('/proc/net/wireless', 'r')
-    data = f.readlines()
-    for line in data:
-        try:
-            ifnames.append(device.search(line).group())
-        except AttributeError:
-            pass 
-    # if we couldn't lookup the devices, try to ask the kernel
-    if ifnames == []:
-        ifnames = getConfiguredNICnames()
-    
-    return ifnames
-
-def getConfiguredNICnames():
-    """get the *configured* ifnames by a systemcall
-       
-       >>> getConfiguredNICnames()
-       []
-    """
-    iwstruct = Iwstruct()
-    ifnames = []
-    buff = array('c', '\0'*1024)
-    caddr_t, length = buff.buffer_info()
-    s = iwstruct.pack('iP', length, caddr_t)
-    try:
-        result = iwstruct._fcntl(SIOCGIFCONF, s)
-    except IOError, (i, e):
-        return i, e
-   
-    # get the interface names out of the buffer
-    for i in range(0, 1024, 32):
-        ifname = buff.tostring()[i:i+32]
-        ifname = struct_unpack('32s', ifname)[0]
-        ifname = ifname.split('\0', 1)[0]
-        if ifname:
-            # verify if ifnames are really wifi devices
-            wifi = Wireless(ifname)
-            result = wifi.getAPaddr()
-            if result[0] == 0:
-                ifnames.append(ifname)
-
-    return ifnames  
-
-def makedict(**kwargs):
-    return kwargs
-
-
-class Wireless(object):
-    """Access to wireless interfaces"""
-    
-    def __init__(self, ifname):
-        self.sockfd = socket(AF_INET, SOCK_DGRAM)
-        self.ifname = ifname
-        self.iwstruct = Iwstruct()
-    
-    def getAPaddr(self):
-        """ returns accesspoint mac address 
-        
-            >>> from iwlibs import Wireless, getNICnames
-            >>> ifnames = getNICnames()
-            >>> ifnames
-            ['eth1', 'wifi0']
-            >>> wifi = Wireless(ifnames[0])
-            >>> wifi.getAPaddr()
-            '00:0D:88:8E:4E:93'
-
-            Test with non-wifi card:
-            >>> wifi = Wireless('eth0')
-            >>> wifi.getAPaddr()
-            (95, 'Operation not supported')
-
-            Test with non-existant card:
-            >>> wifi = Wireless('eth2')
-            >>> wifi.getAPaddr()
-            (19, 'No such device')
-        """
-        buff, s = self.iwstruct.pack_wrq(32)
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCGIWAP,
-                                             data=s)
-        if i > 0:
-            return result
-
-        return self.iwstruct.getMAC(result)
-   
-    def getBitrate(self):
-        """returns device currently set bit rate 
-        
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getBitrate()
-            '11 Mb/s'
-        """
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                            SIOCGIWRATE)
-        if i > 0:
-            return result
-        iwfreq = Iwfreq(result)
-        return iwfreq.getBitrate()
-    
-    def getBitrates(self):
-        """returns the number of available bitrates for the device
-           
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> num, rates = wifi.getBitrates()
-            >>> num == len(rates)
-            True
-        """
-        range = Iwrange(self.ifname)
-        if range.errorflag:
-            return (range.errorflag, range.error)
-        return (range.num_bitrates, range.bitrates)
-
-    def getChannelInfo(self):
-        """returns the number of channels and available frequency for
-           the device
-
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> num, rates = wifi.getChannelInfo()
-            >>> num == len(rates)
-            True
-            """
-        range = Iwrange(self.ifname)
-        if range.errorflag:
-            return (range.errorflag, range.error)
-        return (range.num_channels, range.frequencies)
-
-    def getEssid(self):
-        """get essid information
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getEssid()
-            'romanofski'
-        """
-        essid = ""
-        buff, s = self.iwstruct.pack_wrq(32)
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCGIWESSID, 
-                                             data=s)
-        if i > 0:
-            return result
-        str = buff.tostring()
-        return str.strip('\x00')
-
-    def setEssid(self, essid):
-        """set essid """
-        raise NotImplementedError
-        if len(essid) > IW_ESSID_MAX_SIZE:
-            return "essid to big"
-        buff, s = self.iwstruct.pack_test(essid, 32)
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCSIWESSID, 
-                                             data=s)
-        if i > 0:
-            return result
-
-    def getEncryption(self):
-        """get encryption information which is probably a string of '*',
-        'open', 'private'
-            
-            as a normal user, you will get a 'Operation not permitted'
-            error:
-        
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getEncryption()
-            (1, 'Operation not permitted')
-        """
-        iwpoint = Iwpoint(self.ifname)
-        if iwpoint.errorflag:
-            return (iwpoint.errorflag, iwpoint.error)
-        return iwpoint.getEncryptionKey()
-
-    def getFragmentation(self):
-        """returns fragmentation threshold 
-           
-           It depends on what the driver says. If you have fragmentation
-           threshold turned on, you'll get an int. If it's turned of
-           you'll get a string: 'off'.
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getFragmentation()
-            'off'
-        """
-        iwparam = Iwparam(self.ifname, SIOCGIWFRAG)
-        if iwparam.errorflag:
-            return (iwparam.errorflag, iwparam.error)
-        return iwparam.getValue()
-        
-    def getFrequency(self):
-        """returns currently set frequency of the card 
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getFrequency()
-            '2.417GHz' 
-        """
-        i, r = self.iwstruct.iw_get_ext(self.ifname, 
-                                        SIOCGIWFREQ)
-        if i > 0:
-            return (i, r)
-        iwfreq = Iwfreq(r)
-        return iwfreq.getFrequency()
-    
-        
-    def getMode(self):
-        """returns currently set operation mode 
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getMode()
-            'Managed' 
-        """
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCGIWMODE)
-        if i > 0:
-            return result
-        mode = self.iwstruct.unpack('i', result[:4])[0]
-        return modes[mode]
-
-    def setMode(self, mode):
-        """sets the operation mode """
-        try:
-            this_modes = [x.lower() for x in modes]
-            mode = mode.lower()
-            wifimode = this_modes.index(mode)
-        except ValueError:
-            return "Invalid operation mode!"
-        
-        s = self.iwstruct.pack('I', wifimode)
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCSIWMODE, 
-                                             data=s)
-        if i > 0:
-            return result
-    
-    def getWirelessName(self):
-        """ returns wireless name 
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getWirelessName()
-            'IEEE 802.11-DS'
-        """
-        i, result = self.iwstruct.iw_get_ext(self.ifname, 
-                                             SIOCGIWNAME)
-        if i > 0:
-            return result
-        return result.split('\0')[0]
-    
-    def getPowermanagement(self):
-        """returns power management settings 
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getPowermanagement()
-            'off'
-        """
-        iwparam = Iwparam(self.ifname, SIOCGIWPOWER)
-        if iwparam.errorflag:
-            return (iwparam.errorflag, iwparam.error)
-        return iwparam.getValue()
-
-    
-    def getRetrylimit(self):
-        """returns limit retry/lifetime
-
-            man iwconfig:
-            Most cards have MAC retransmissions, and some  allow  to set
-            the behaviour of the retry mechanism.
-                     
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getRetrylimit()
-            16
-        """
-        iwparam = Iwparam(self.ifname, SIOCGIWRETRY)
-        if iwparam.errorflag:
-            return (iwparam.errorflag, iwparam.error)
-        return iwparam.getValue()
-    
-    def getRTS(self):
-        """returns rts threshold 
-            
-            returns int, 'auto', 'fixed', 'off'
-        
-            man iwconfig:
-            RTS/CTS adds a handshake before each packet transmission to
-            make sure that the channel is clear. This adds overhead, but
-            increases performance in case of hidden  nodes or  a large
-            number of active nodes. This parameter sets the size of the
-            smallest packet for which the node sends RTS;  a value equal
-            to the maximum packet size disable the mechanism. 
-            
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getRTS()
-            'off'
-        """
-        iwparam = Iwparam(self.ifname, SIOCGIWRTS)
-        if iwparam.errorflag:
-            return (iwparam.errorflag, iwparam.error)
-        return iwparam.getValue()
-    
-    def getSensitivity(self):
-        """returns sensitivity information 
-        
-            man iwconfig:
-            This is the lowest signal level for which the hardware
-            attempt  packet  reception, signals  weaker  than  this are
-            ignored. This is used to avoid receiving background noise,
-            so you should  set  it according  to  the  average noise
-            level. Positive values are assumed to be the raw value used
-            by the hardware  or a percentage, negative values are
-            assumed to be dBm.
-        
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getSensitivity()
-            'off'
-            
-        """
-        iwparam = Iwparam(self.ifname, SIOCGIWSENS)
-        if iwparam.errorflag:
-            return (iwparam.errorflag, iwparam.error)
-        return iwparam.getValue()
-        
-    def getTXPower(self):
-        """returns transmit power in dBm 
-        
-            >>> from iwlibs import Wireless
-            >>> wifi = Wireless('eth1')
-            >>> wifi.getTXPower()
-            '17 dBm'
-        """
-        i, r = self.iwstruct.iw_get_ext(self.ifname, 
-                                        SIOCGIWTXPOW)
-        if i > 0:
-            return (i, r)
-        iwfreq = Iwfreq(r)
-        return iwfreq.getTransmitPower()
-         
-    def getStatistics(self):
-        """returns statistics information which can also be found in
-           /proc/net/wireless 
-        """
-        iwstats = Iwstats(self.ifname)
-        if iwstats.errorflag > 0:
-            return (iwstats.errorflag, iwstats.error)
-        return [iwstats.status, iwstats.qual, iwstats.discard,
-            iwstats.missed_beacon]
-
-    def scan(self):
-        """returns Iwscanresult objects, after a successful scan"""
-        iwscan = Iwscan(self.ifname)
-        return iwscan.scan()
-
-
-class Iwstruct(object):
-    """basic class to handle iwstruct data """
-    
-    def __init__(self):
-        self.idx = 0
-        self.sockfd = socket(AF_INET, SOCK_DGRAM)
-
-    def parse_data(self, fmt, data):
-        """ unpacks raw C data """
-        size = struct_calcsize(fmt)
-        idx = self.idx
-
-        str = data[idx:idx + size]
-        self.idx = idx+size
-        value = struct_unpack(fmt, str)
-
-        # take care of a tuple like (int, )
-        if len(value) == 1:
-            return value[0]
-        else:
-            return value
-    
-    def pack(self, fmt, *args):
-        """ calls struct_pack and returns the result """
-        return struct_pack(fmt, *args)
-
-    def pack_wrq(self, buffsize):
-        """ packs wireless request data for sending it to the kernel """
-        # Prepare a buffer
-        # We need the address of our buffer and the size for it. The
-        # ioctl itself looks for the pointer to the address in our
-        # memory and the size of it.
-        # Dont change the order how the structure is packed!!!
-        buff = array('c', '\0'*buffsize)
-        caddr_t, length = buff.buffer_info()
-        s = struct_pack('Pi', caddr_t, length)
-        return buff, s
-    
-    def pack_test(self, string, buffsize):
-        """ packs wireless request data for sending it to the kernel """
-        buffsize = buffsize - len(string)
-        buff = array('c', string+'\0'*buffsize)
-        caddr_t, length = buff.buffer_info()
-        s = struct_pack('Pii', caddr_t, length, 1)
-        return buff, s
-
-    def unpack(self, fmt, packed_data):
-        """ unpacks data with given format """
-        return struct_unpack(fmt, packed_data)
-
-    def _fcntl(self, request, args):
-        return ioctl(self.sockfd.fileno(), request, args)
-    
-    def iw_get_ext(self, ifname, request, data=None):
-        """ read information from ifname """
-        # put some additional data behind the interface name
-        if data is not None:
-            buff = IFNAMSIZE-len(ifname)
-            ifreq = ifname + '\0'*buff
-            ifreq = ifreq + data
-        else:
-            ifreq = (ifname + '\0'*32)
-            
-        try:
-            result = self._fcntl(request, ifreq)
-        except IOError, (i, e):
-            return i, e
-        
-        return (0, result[16:])
-
-    def getMAC(self, packed_data):
-        """ extracts mac addr from packed data and returns it as str """
-        mac_addr = struct_unpack('xxBBBBBB', packed_data[:8])
-        return "%02X:%02X:%02X:%02X:%02X:%02X" % mac_addr
-
-class Iwparam(object):
-    """class to hold iwparam data """
-    
-    def __init__(self, ifname, ioctl):
-        # (i) value, (b) fixed, (b) disabled, (b) flags
-        self.fmt = "ibbH"
-        self.value = 0
-        self.fixed = 0
-        self.disabled = 0
-        self.flags = 0
-        self.errorflag = 0
-        self.error = ""
-        self.ioctl = ioctl 
-        self.ifname = ifname
-        self.update()
-    
-    def getValue(self):
-        """returns the value if not disabled """
-
-        if self.disabled:
-            return 'off'
-        if self.flags & IW_RETRY_TYPE == 0:
-            return self.getRLAttributes()
-        else:
-            return self.getPMAttributes()
-
-    def getRLAttributes(self):
-        """returns a string with attributes determined by self.flags
-        """
-        return self.value
-
-    def getPMAttributes(self):
-        """returns a string with attributes determined by self.flags
-           and IW_POWER*
-        """
-        result = ""
-        
-        # Modifiers
-        if self.flags & IW_POWER_MIN == 0:
-            result = " min"
-        if self.flags & IW_POWER_MAX == 0:
-            result = " max"
-            
-        # Type
-        if self.flags & IW_POWER_TIMEOUT == 0:
-            result = " period:" 
-        else:
-            result = " timeout:"
-        # Value with or without units
-        # IW_POWER_RELATIVE - value is *not* in s/ms/us
-        if self.flags & IW_POWER_RELATIVE:
-            result += "%f" %(float(self.value)/MEGA)
-        else:
-            if self.value >= MEGA:
-                result += "%fs" %(float(self.value)/MEGA)
-            elif self.value >= KILO:
-                result += "%fms" %(float(self.value)/KILO)
-            else:
-                result += "%dus" % self.value
-
-        return result
-        
-    def update(self):
-        iwstruct = Iwstruct()
-        i, r = iwstruct.iw_get_ext(self.ifname, 
-                                   self.ioctl)
-        if i > 0:
-            self.errorflag = i
-            self.error = r
-        self._parse(r)
-    
-    def _parse(self, data):
-        """ unpacks iwparam data """
-        iwstruct = Iwstruct()
-        self.value, self.fixed, self.disabled, self.flags =\
-            iwstruct.parse_data(self.fmt, data)
-        
-class Iwfreq(object):
-    """ class to hold iwfreq data
-        delegates to Iwstruct class
-    """
-    
-    def __init__(self, data=None):
-        self.fmt = "ihbb"
-        if data is not None:
-            self.frequency = self.parse(data)
-        else:
-            self.frequency = 0
-        self.iwstruct = Iwstruct()
-        
-    def __getattr__(self, attr):
-        return getattr(self.iwstruct, attr)
-
-    def parse(self, data):
-        """ unpacks iwparam"""
-        
-        size = struct_calcsize(self.fmt)
-        m, e, i, pad = struct_unpack(self.fmt, data[:size])
-        # XXX well, its not *the* frequency - we need a better name
-        if e == 0:
-            return m
-        else:
-            return float(m)*10**e
-    
-    def getFrequency(self):
-        """returns Frequency (str) 
-            
-           data - binary data returned by systemcall (iw_get_ext())
-        """
-        freq = self.frequency
-        
-        if freq >= GIGA:
-            return "%0.3fGHz" %(freq/GIGA)
-
-        if freq >= MEGA:
-            return "%0.3fMHZ" %(freq/MEGA)
-
-        if freq >= KILO:
-            return "%0.3fKHz" %(freq/KILO)
-    
-    def getBitrate(self):
-        """ returns Bitrate in Mbit 
-        
-           data - binary data returned by systemcall (iw_get_ext())
-        """
-        bitrate = self.frequency
-
-        if bitrate >= GIGA:
-            return "%i Gb/s" %(bitrate/GIGA)
-
-        if bitrate >= MEGA:
-            return "%i Mb/s" %(bitrate/MEGA)
-        
-        if bitrate >= KILO:
-            return "%i Kb/s" %(bitrate/KILO)
-
-    def getTransmitPower(self):
-        """ returns transmit power in dbm """
-        # XXX something flaky is going on with m and e
-        # eg. m = 50 and e should than be 0, because the number is stored in
-        # m and don't needs to be recalculated
-        return "%i dBm" %self.mw2dbm(self.frequency/10)
-    
-    def getChannel(self, freq):
-        """returns channel information given by frequency
-           
-           returns None if frequency can't be converted
-           freq = frequency to convert (int)
-           iwrange = Iwrange object
-        """
-        
-        try:
-            freq = float(freq)
-        except:
-            return None
-        
-        lut = {}
-        #13 Channels beginning at 2.412GHz and inreasing by 0,005 GHz steps
-        for i in range(0,12):
-            cur = float( 2.412 + ( i * 0.005 ) )
-            lut[str(cur)] = i+1
-        # Channel 14 need special actions ;)
-        lut['2.484'] = 14
-        
-        
-        if str(freq) in lut.keys():
-                return lut[str(freq)]
-        
-        return None
-    
-          
-    def mw2dbm(self, mwatt):
-        """ converts mw to dbm(float) """
-        return ceil(10.0 * log10(mwatt))
-        
-    def _setFrequency(self, list):
-        """sets self.frequency by given list 
-           
-           currently only used by Iwrange
-        """
-        assert len(list) == 4
-        m, e, i, pad = list
-        if e == 0:
-            self.frequency = m
-        else:
-            self.frequency = m #float(m)*10**e
-
-class Iwstats(object):
-    """ class to hold iwstat data """
-
-    def __init__(self, ifname):
-        # (2B) status, 4B iw_quality, 6i iw_discarded
-        self.fmt = "2B4B6i"
-        self.status = 0
-        self.qual = Iwquality()
-        self.discard = {}
-        self.missed_beacon = 0
-        self.ifname = ifname
-        self.errorflag = 0
-        self.error = ""
-        self.update()
-
-    def update(self):
-        iwstruct = Iwstruct()
-        buff, s = iwstruct.pack_wrq(32)
-        i, result = iwstruct.iw_get_ext(self.ifname, 
-                                        SIOCGIWSTATS, 
-                                        data=s)
-        if i > 0:
-            self.error = result
-            self.errorflag = i
-        self._parse(buff.tostring())
-    
-    def _parse(self, data):
-        """ unpacks iwstruct data """
-        struct = Iwstruct()
-        iwqual = Iwquality()
-        iwstats_data = struct.parse_data(self.fmt, data)
-        
-        self.status = iwstats_data[0:2]
-        self.qual.quality, self.qual.sl, self.qual.nl,\
-            self.qual.flags = iwstats_data[2:6]
-        nwid, code, frag, retries, flags = iwstats_data[6:11]
-        self.missed_beacon = iwstats_data[11:12][0]
-        self.discard = makedict(nwid=nwid, code=code,
-            fragment=frag, retries=retries, misc=flags)
-
-class Iwquality(object):
-    """ class to hold iwquality data """
-
-    def __init__(self):
-        self.quality = 0
-        self.sl = 0
-        self.nl = 0
-        self.updated = 0
-        self.fmt = "4B"
-
-    def parse(self, data):
-        """ unpacks iwquality data """
-        struct = Iwstruct()
-        qual, sl, nl, flags = struct.parse_data(self.fmt, data)
-
-        # compute signal and noise level
-        self.signal_level = sl
-        self.noise_level = nl
-
-        # asign the other values
-        self.quality = qual
-        self.updated = flags
-
-    def setValues(self, list):
-        """ assigns values given by a list to our attributes """
-        attributes = ["quality", "signallevel", "noise_level",
-            "updated"]
-        assert len(list) == 4
-        
-        for i in range(len(list)):
-            setattr(self, attributes[i], list[i])
-    
-    def getSignallevel(self):
-        """ returns signal level """
-        return self.sl-0x100
-
-    def setSignallevel(self, sl):
-        """ sets signal level """
-        self.sl = sl
-    signallevel = property(getSignallevel, setSignallevel)
-    
-    def getNoiselevel(self):
-        """ returns noise level """
-        return self.nl - 0x100
-
-    def setNoiselevel(self):
-        raise NotImplementedError
-        self.nl = nl
-    noiselevel = property(getNoiselevel, setNoiselevel)
-
-class Iwpoint(object):
-    """ class to hold iwpoint data """
-
-    def __init__(self, ifname):
-        self.key = [0,0,0,0]
-        self.fields = 0
-        self.flags = 0
-        # (4B) pointer to data, H length, H flags
-        self.fmt = "4BHH"
-        self.errorflag = 0
-        self.error = ""
-        self.ifname = ifname
-        self.update()
-
-    def __getattr__(self, attr):
-        return getattr(self.iwstruct, attr)
-    
-    def update(self):
-        iwstruct = Iwstruct()
-        buff, s = iwstruct.pack_wrq(32)
-        i, result = iwstruct.iw_get_ext(self.ifname, 
-                                        SIOCGIWENCODE, 
-                                        data=s)
-        if i > 0:
-            self.errorflag = i
-            self.error = result
-        self._parse(result)
-        
-    def getEncryptionKey(self):
-        """ returns encryption key as '**' or 'off' as str """
-        if self.flags & IW_ENCODE_DISABLED != 0:
-            return 'off'
-        elif self.flags & IW_ENCODE_NOKEY != 0:
-            # a key is set, so print it
-            return '**' * self.fields
-    
-    def _parse(self, data):
-        """ unpacks iwpoint data
-        """
-        iwstruct = Iwstruct()
-        ptr, ptr, ptr, ptr, self.fields, self.flags =\
-            iwstruct.parse_data(self.fmt, data)
-  &nb