Remove VuplusEvent plugin.
authorhschang <chang@dev3>
Thu, 12 Mar 2015 02:56:16 +0000 (11:56 +0900)
committerhschang <chang@dev3>
Thu, 12 Mar 2015 02:56:16 +0000 (11:56 +0900)
configure.ac
lib/python/Plugins/Extensions/Makefile.am
lib/python/Plugins/Extensions/VuplusEvent/Makefile.am [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/__init__.py [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/_vuplusauthenticity.so [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/meta/Makefile.am [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/meta/plugin_vuplusevent.xml [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/plugin.py [deleted file]
lib/python/Plugins/Extensions/VuplusEvent/vuplusauthenticity.py [deleted file]

index 89cb2be..94654cd 100644 (file)
@@ -193,8 +193,6 @@ lib/python/Plugins/Extensions/WebBrowser/Makefile
 lib/python/Plugins/Extensions/WebBrowser/meta/Makefile
 lib/python/Plugins/Extensions/WebBrowser/keymap/Makefile
 lib/python/Plugins/Extensions/WebBrowser/desc/Makefile
 lib/python/Plugins/Extensions/WebBrowser/meta/Makefile
 lib/python/Plugins/Extensions/WebBrowser/keymap/Makefile
 lib/python/Plugins/Extensions/WebBrowser/desc/Makefile
-lib/python/Plugins/Extensions/VuplusEvent/Makefile
-lib/python/Plugins/Extensions/VuplusEvent/meta/Makefile
 lib/python/Plugins/Extensions/StreamTV/Makefile
 lib/python/Plugins/Extensions/StreamTV/meta/Makefile
 lib/python/Plugins/Extensions/StreamTV/icons/Makefile
 lib/python/Plugins/Extensions/StreamTV/Makefile
 lib/python/Plugins/Extensions/StreamTV/meta/Makefile
 lib/python/Plugins/Extensions/StreamTV/icons/Makefile
index bb13519..55e9352 100755 (executable)
@@ -1,7 +1,7 @@
 installdir = $(pkglibdir)/python/Plugins/Extensions
 
 SUBDIRS = TuxboxPlugins CutListEditor PicturePlayer MediaScanner MediaPlayer GraphMultiEPG SocketMMI DVDBurn Modem WebBrowser \
 installdir = $(pkglibdir)/python/Plugins/Extensions
 
 SUBDIRS = TuxboxPlugins CutListEditor PicturePlayer MediaScanner MediaPlayer GraphMultiEPG SocketMMI DVDBurn Modem WebBrowser \
-       VuplusEvent StreamTV DLNABrowser DLNAServer HbbTV BackupSuiteUSB BackupSuiteHDD
+       StreamTV DLNABrowser DLNAServer HbbTV BackupSuiteUSB BackupSuiteHDD
 
 if HAVE_LIBDDVD
 SUBDIRS += DVDPlayer
 
 if HAVE_LIBDDVD
 SUBDIRS += DVDPlayer
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/Makefile.am b/lib/python/Plugins/Extensions/VuplusEvent/Makefile.am
deleted file mode 100644 (file)
index 42ac1cf..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-installdir = $(pkglibdir)/python/Plugins/Extensions/VuplusEvent
-
-SUBDIRS = meta
-
-install_PYTHON =       \
-       __init__.py \
-       plugin.py \
-       _vuplusauthenticity.so \
-       vuplusauthenticity.py
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/__init__.py b/lib/python/Plugins/Extensions/VuplusEvent/__init__.py
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/_vuplusauthenticity.so b/lib/python/Plugins/Extensions/VuplusEvent/_vuplusauthenticity.so
deleted file mode 100755 (executable)
index deaee24..0000000
Binary files a/lib/python/Plugins/Extensions/VuplusEvent/_vuplusauthenticity.so and /dev/null differ
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/meta/Makefile.am b/lib/python/Plugins/Extensions/VuplusEvent/meta/Makefile.am
deleted file mode 100755 (executable)
index 488478c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-installdir = $(datadir)/meta
-
-dist_install_DATA = plugin_vuplusevent.xml
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/meta/plugin_vuplusevent.xml b/lib/python/Plugins/Extensions/VuplusEvent/meta/plugin_vuplusevent.xml
deleted file mode 100755 (executable)
index 193b78b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<default>
-         <prerequisites>
-                    <tag type="System" />
-         </prerequisites>
-          <info>
-                    <author>hschang</author>
-                    <name>Return the Love Event (only for genuine box)</name>
-                    <packagename>enigma2-plugin-systemplugins-vuplusevent</packagename>
-                    <shortdescription>Don't lose the chance to get the gift.</shortdescription>
-                    <description>Don't lose the chance to get the gift.</description>
-        </info>
-        <files type="package">
-                    <file type="package" name="enigma2-plugin-systemplugins-vuplusevent" />
-        </files>
-
-</default>
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/plugin.py b/lib/python/Plugins/Extensions/VuplusEvent/plugin.py
deleted file mode 100755 (executable)
index fa476ea..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-from Screens.Screen import Screen
-from Components.ActionMap import ActionMap
-from Components.ConfigList import ConfigListScreen
-from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigSelection, ConfigText, ConfigInteger,NoSave
-from Components.Sources.StaticText import StaticText
-from Components.Label import Label
-from Plugins.Plugin import PluginDescriptor
-from Tools.Directories import resolveFilename, SCOPE_PLUGINS, fileExists
-from Screens.MessageBox import MessageBox
-from enigma import eTimer
-import vuplusauthenticity
-import os
-import socket
-import urllib2
-
-default_email_address = "Please input your E-mail address"
-config.plugins.vuplusauthenticity = ConfigSubsection()
-config.plugins.vuplusauthenticity.sn_a = NoSave(ConfigSelection(default = "MSA", choices = [ ("MSA", _("MSA")), ("MA", _("MA")), ("MB", _("MB")), ("MC", _("MC")), ("C", _("C")), ("D", _("D")), ("E", _("E")), ("F", _("F")), ("G", _("G"))] ))
-config.plugins.vuplusauthenticity.sn_b = NoSave(ConfigInteger(default = 0,  limits = (1, 9999999999)))
-config.plugins.vuplusauthenticity.sn_b_mx = NoSave(ConfigInteger(default = 0,  limits = (1, 999999999)))
-config.plugins.vuplusauthenticity.sn_b_msa = NoSave(ConfigInteger(default = 0,  limits = (1, 9999999)))
-config.plugins.vuplusauthenticity.email = NoSave(ConfigText(default = default_email_address, visible_width = 50, fixed_size = False))
-
-GENUINE_MESSAGES={
-               -6 : "UNEXPECTED ERROR(2).",
-               -5 : "INVALID SERIAL NUMBER.",
-               -4 : " Connect to server failed, \nplease check your network configuration and retry.",
-               -3 : "UNEXPECTED ERROR(1).",
-               -2 : "DEVICE OPEN ERROR.",
-               -1 : "AUTHENTICATION FAILED.",
-               0 : "AUTHENTICATION SUCCESS."
-}
-
-class VuplusAuthenticity(Screen, ConfigListScreen):
-       skin =  """
-               <screen name="VuplusAuthenticity" position="center,center" size="600,320" title="Return the Love Event (only for genuine box)">
-                       <ePixmap pixmap="skin_default/buttons/red.png" position="140,15" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="320,15" size="140,40" alphatest="on" />
-
-                       <widget source="key_red" render="Label" position="140,15" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_green" render="Label" position="320,15" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-
-                       <widget name="config" zPosition="2" position="10,70" size="580,80" scrollbarMode="showOnDemand" transparent="1" />
-                       <widget name="text1" position="10,160" size="580,50" font="Regular;32" halign="center" valign="center"/>
-                       <widget name="text2" position="10,220" size="580,100" font="Regular;18" halign="center" valign="center"/>
-               </screen>
-               """
-       def __init__(self,session):
-               Screen.__init__(self,session)
-               self.session = session
-               self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
-               {
-                       "ok": self.Start,
-                       "cancel": self.keyExit,
-                       "red": self.keyExit,
-                       "green": self.Start,
-               }, -2)
-               self.genuine = None
-               self.list = []
-               ConfigListScreen.__init__(self, self.list, session = self.session)
-               self["key_red"] = StaticText(_("Exit"))
-               self["key_green"] = StaticText(_("Start"))
-               self["text1"]=Label("Press green button to start")
-               self["text2"]=Label("With this plugin you can verify the authenticity of your Vu+.\nFor more information, please visit our website \nhttp://vuplus.com")
-               self.createSetup()
-               self.onLayoutFinish.append(self.checkKernelVer)
-               self.checkTimer = eTimer()
-               self.checkTimer.callback.append(self.invalidKVer)
-               self.requestauth_timer = eTimer()
-               self.requestauth_timer.callback.append(self.requestauth)
-
-       def checkKernelVer(self):
-               KVer = os.uname()[2]
-               if float(KVer[:3]) < 3.1:
-                       self.checkTimer.start(0,True)
-
-       def invalidKVer(self):
-               self.session.openWithCallback(self.close, MessageBox, _("For use this plugin, you must update the kernel version to 3.1 or later"), MessageBox.TYPE_ERROR)
-
-       def createSetup(self):
-               self.list = []
-               self.sn_aEntry = getConfigListEntry(_("1-1. Serial Number (The first two or three letters of SN)"), config.plugins.vuplusauthenticity.sn_a)
-               if config.plugins.vuplusauthenticity.sn_a.value == "MSA":
-                       self.sn_bEntry = getConfigListEntry(_("1-2. Serial Number (The remaining numbers of SN)"), config.plugins.vuplusauthenticity.sn_b_msa)
-               elif config.plugins.vuplusauthenticity.sn_a.value in [ 'MA', 'MB', 'MC' ]:
-                       self.sn_bEntry = getConfigListEntry(_("1-2. Serial Number (The remaining numbers of SN)"), config.plugins.vuplusauthenticity.sn_b_mx)
-               else:
-                       self.sn_bEntry = getConfigListEntry(_("1-2. Serial Number (The remaining numbers of SN)"), config.plugins.vuplusauthenticity.sn_b)
-               self.emailEntry = getConfigListEntry(_("2. Contact"), config.plugins.vuplusauthenticity.email)
-               self.list.append( self.sn_aEntry )
-               self.list.append( self.sn_bEntry )
-               self.list.append( self.emailEntry )
-               self["config"].list = self.list
-               self["config"].l.setList(self.list)
-
-       def confirmValidSN(self):
-               if config.plugins.vuplusauthenticity.sn_a.value == 'MSA':
-                       sn_length = 7
-                       sn = str(config.plugins.vuplusauthenticity.sn_b_msa.value)
-               elif config.plugins.vuplusauthenticity.sn_a.value in [ 'MA', 'MB', 'MC' ]:
-                       sn_length = 9
-                       sn = str(config.plugins.vuplusauthenticity.sn_b_mx.value)
-               else:
-                       sn_length = 10
-                       sn = str(config.plugins.vuplusauthenticity.sn_b.value)
-               if len(sn) > sn_length or sn == '0':
-                       return False
-               else:
-                       while(len(sn)<sn_length):
-                               sn = '0'+sn
-                       if sn_length == 10:
-                               if int(sn[:3]) == 0 or int(sn[3:5]) not in range(1,53) or int(sn[-5:]) == 0:
-                                       return False
-                               else:
-                                       return True
-                       if sn_length == 9:
-                               if int(sn[:2]) not in range(28) or int(sn[2:4]) not in range(1,53) or int(sn[-5:]) == 0:
-                                       return False
-                               else:
-                                       return True
-                       else:
-                               if int(sn[:2]) not in range(1,53) or int(sn[-5:]) == 0:
-                                       return False
-                               else:
-                                       return True
-
-       def displayResult(self, ret = -5):
-               global GENUINE_MESSAGES
-               self["text1"].setText(GENUINE_MESSAGES[ret])
-               self["key_green"].text = _("Restart")
-
-       def Start(self):
-               self["text1"].setText("WAITING......")
-               msg = "Please note that you agree to send software information of the box by applying the event.\nThe collected data will be used in a form that does not personally identify you."
-               self.session.openWithCallback(self.userConfirmCallback, MessageBoxGenuine, _(msg), MessageBox.TYPE_YESNO)
-
-       def userConfirmCallback(self,ret):
-               if ret:
-                       self.requestauth_timer.start(0,True)
-               else:
-                       self["text1"].setText("Press green button to start")
-
-       def getModel(self):
-               if fileExists("/proc/stb/info/vumodel"):
-                       vumodel = open("/proc/stb/info/vumodel")
-                       info=vumodel.read().strip()
-                       vumodel.close()
-                       return info
-               else:
-                       return "unknown"
-
-       def requestauth(self):
-               if(not self.confirmValidSN()):
-                       self.displayResult(-5)
-                       return
-               if config.plugins.vuplusauthenticity.sn_a.value == 'MSA':
-                       sn_length = 7
-                       sn_b = str(config.plugins.vuplusauthenticity.sn_b_msa.value)
-               if config.plugins.vuplusauthenticity.sn_a.value in [ 'MA', 'MB', 'MC' ]:
-                       sn_length = 9
-                       sn_b = str(config.plugins.vuplusauthenticity.sn_b_mx.value)
-               else:
-                       sn_length = 10
-                       sn_b = str(config.plugins.vuplusauthenticity.sn_b.value)
-               while(len(sn_b)<sn_length):
-                       sn_b = '0'+sn_b
-               serial_number = config.plugins.vuplusauthenticity.sn_a.value + sn_b
-               model =self.getModel()
-               email = config.plugins.vuplusauthenticity.email.value
-               if len(email) == 0 or email == default_email_address:
-                       email = "none"
-               try:
-                       ret=vuplusauthenticity.requestauth(serial_number, model, email)
-                       self.displayResult(ret)
-               except :
-                       self.displayResult(-6)
-
-       def keyLeft(self):
-               ConfigListScreen.keyLeft(self)
-               self.createSetup()
-
-       def keyRight(self):
-               ConfigListScreen.keyRight(self)
-               self.createSetup()
-
-       def keyExit(self):
-               self.close()
-
-class MessageBoxGenuine(MessageBox):
-       skin = """
-               <screen name="MessageBoxGenuine" position="center,center" size="600,10" title="Message">
-               <widget name="text" position="65,8" size="420,0" font="Regular;22" />
-               <widget name="ErrorPixmap" pixmap="Vu_HD/icons/input_error.png" position="5,5" size="53,53" alphatest="blend" />
-               <widget name="QuestionPixmap" pixmap="Vu_HD/icons/input_question.png" position="5,5" size="53,53" alphatest="blend" />
-               <widget name="InfoPixmap" pixmap="Vu_HD/icons/input_info.png" position="5,5" size="53,53" alphatest="blend" />
-               <widget name="list" position="100,100" size="380,375" transparent="1" />
-               <applet type="onLayoutFinish">
-# this should be factored out into some helper code, but currently demonstrates applets.
-from enigma import eSize, ePoint
-
-orgwidth = self.instance.size().width()
-orgpos = self.instance.position()
-textsize = self[&quot;text&quot;].getSize()
-
-# y size still must be fixed in font stuff...
-textsize = (textsize[0] + 50, textsize[1] + 50)
-offset = 0
-if self.type == self.TYPE_YESNO:
-       offset = 60
-wsizex = textsize[0] + 60
-wsizey = textsize[1] + offset
-if (280 &gt; wsizex):
-       wsizex = 280
-wsize = (wsizex, wsizey)
-
-
-# resize
-self.instance.resize(eSize(*wsize))
-
-# resize label
-self[&quot;text&quot;].instance.resize(eSize(*textsize))
-
-# move list
-listsize = (wsizex, 50)
-self[&quot;list&quot;].instance.move(ePoint(0, textsize[1]))
-self[&quot;list&quot;].instance.resize(eSize(*listsize))
-
-# center window
-newwidth = wsize[0]
-self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
-               </applet>
-       </screen>"""
-       def __init__(self, session, text, type = MessageBox.TYPE_YESNO, timeout = -1, close_on_any_key = False, default = True, enable_input = True, msgBoxID = None):
-               MessageBox.__init__(self,session, text, type, timeout, close_on_any_key, default, enable_input,msgBoxID)
-               if type == MessageBox.TYPE_YESNO:
-                       self.list = [ (_("Agree"), 0), (_("Exit"), 1) ]
-                       self["list"].setList(self.list)
-
-def main(session, **kwargs):
-       session.open(VuplusAuthenticity)
-
-def Plugins(**kwargs):
-       return [PluginDescriptor(name=_("Return the Love Event"), description="Don't lose the chance to get the gift.", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main)]
-
diff --git a/lib/python/Plugins/Extensions/VuplusEvent/vuplusauthenticity.py b/lib/python/Plugins/Extensions/VuplusEvent/vuplusauthenticity.py
deleted file mode 100755 (executable)
index cbd1206..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.39
-#
-# Do not make changes to this file unless you know what you are doing--modify
-# the SWIG interface file instead.
-# This file is compatible with both classic and new-style classes.
-
-from sys import version_info
-if version_info >= (2,6,0):
-    def swig_import_helper():
-        from os.path import dirname
-        import imp
-        fp = None
-        try:
-            fp, pathname, description = imp.find_module('_vuplusauthenticity', [dirname(__file__)])
-        except ImportError:
-            import _vuplusauthenticity
-            return _vuplusauthenticity
-        if fp is not None:
-            try:
-                _mod = imp.load_module('_vuplusauthenticity', fp, pathname, description)
-            finally:
-                fp.close()
-                return _mod
-    _vuplusauthenticity = swig_import_helper()
-    del swig_import_helper
-else:
-    import _vuplusauthenticity
-del version_info
-try:
-    _swig_property = property
-except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'SwigPyObject':
-            self.__dict__[name] = value
-            return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
-    if (not static) or hasattr(self,name):
-        self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
-
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
-def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError(name)
-
-def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
-try:
-    _object = object
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-
-
-
-def requestauth(*args):
-  return _vuplusauthenticity.requestauth(*args)
-requestauth = _vuplusauthenticity.requestauth
-
-