Beispiel #1
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('Common Interface'))
        self['actions'] = ActionMap(
            ['OkCancelActions', 'CiSelectionActions'], {
                'left': self.keyLeft,
                'right': self.keyLeft,
                'ok': self.okbuttonClick,
                'cancel': self.cancel
            }, -1)
        self.dlg = None
        self.state = {}
        self.list = []
        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['entries'] = menuList
        self['entries'].onSelectionChanged.append(self.selectionChanged)
        self['text'] = Label(_('Slot %d') % 1)
        return
Beispiel #2
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
Beispiel #3
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Common Interface"))
        self["actions"] = ActionMap(
            ["OkCancelActions", "CiSelectionActions"], {
                "left": self.keyLeft,
                "right": self.keyLeft,
                "ok": self.okbuttonClick,
                "cancel": self.cancel
            }, -1)

        self.dlg = None
        self.state = {}
        self.list = []
        self.slot = 0
        for slot in range(SystemInfo["CommonInterface"]):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.slot += 1
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["entries"].onSelectionChanged.append(self.selectionChanged)
        self["text"] = Label("")
        self.onLayoutFinish.append(self.layoutFinished)
Beispiel #4
0
    def __init__(self, session):
        self.skin = Volume_adjust.skin
        Screen.__init__(self, session)
        # Path of the config file
        self.filename = "/etc/volume.xml"
        global offset
        offset = 0
        self["key_red"] = StaticText(_("delete"))
        self["key_green"] = StaticText(_("add Service"))
        self["key_yellow"] = StaticText(_("change"))
        self["key_blue"] = StaticText(_("add Current"))
        self["press_menu"] = StaticText(
            _("press the menu button to set a general AC3/Dolby offset"))
        self["ServiceList.desc"] = Label(_("Channel \t\t\tVolume +"))

        self["actions"] = ActionMap(
            ["ColorActions", "OkCancelActions", "MenuActions"], {
                "green": self.greenPressed,
                "red": self.redPressed,
                "yellow": self.yellowPressed,
                "blue": self.bluePressed,
                "menu": self.config_menu,
                "ok": self.okPressed,
                "cancel": self.cancel
            }, -1)

        self.servicelist = []
        self.read_volume = []
        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self["ServiceList"] = serviceList

        self.loadXML()  # load the config file
        self.onShown.append(self.setWindowTitle)
Beispiel #5
0
	def __init__(self, session):
		self.skin = Volume_adjust.skin
		Screen.__init__(self, session)
		# Path of the config file
		self.filename="/etc/volume.xml"
		global offset
		offset = 0
		self["key_red"] = StaticText(_("delete"))
		self["key_green"] = StaticText(_("add Service"))
		self["key_yellow"] = StaticText(_("change"))
		self["key_blue"] = StaticText(_("add Current"))
		self["press_menu"] = StaticText(_("press the menu button to set a general AC3/Dolby offset"))
		self["ServiceList.desc"] = Label(_("Channel \t\t\tVolume +"))

		self["actions"] = ActionMap(["ColorActions","OkCancelActions","MenuActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"blue": self.bluePressed,
				"menu": self.config_menu,
				"ok": self.okPressed,
				"cancel": self.cancel
			}, -1)

		self.servicelist = []
		self.read_volume=[]
		serviceList = ConfigList(self.servicelist)
		serviceList.list = self.servicelist
		serviceList.l.setList(self.servicelist)
		self["ServiceList"] = serviceList

		self.loadXML() # load the config file
		self.onShown.append(self.setWindowTitle)
Beispiel #6
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self["actions"] = ActionMap(
            ["OkCancelActions", "CiSelectionActions"], {
                "left": self.keyLeft,
                "right": self.keyLeft,
                "ok": self.okbuttonClick,
                "cancel": self.cancel
            }, -1)

        self.dlg = None
        self.state = {}
        self.list = []

        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["entries"].onSelectionChanged.append(self.selectionChanged)
        self["text"] = Label(_("Slot %d") % (1))
Beispiel #7
0
	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					if  state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
Beispiel #8
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions", "ColorActions"],
			{
				"blue": self.CIAssignment,
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]
		self["key_blue"] = Label(_("CI assignment"))
		self["key_blue"].hide()
		self["pixmap_blue"] = Pixmap()
		self["pixmap_blue"].hide()

		for slot in range(SystemInfo["CommonInterface"]):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.layoutFinished)
Beispiel #9
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self["actions"] = ActionMap(
            ["OkCancelActions", "CiSelectionActions"], {
                "left": self.keyLeft,
                "right": self.keyLeft,
                "ok": self.okbuttonClick,
                "cancel": self.cancel
            }, -1)

        self.dlg = None
        self.state = {}
        self.slots = []
        self.HighBitrateEntry = {}
        self.RelevantPidsRoutingEntry = {}

        self.entryData = []
        self.DVBCiDelayEntry = None

        self.list = []
        self["entries"] = ConfigList(self.list)
        self["entries"].list = self.list
        self["entries"].l.setList(self.list)
        self["text"] = Label(_("Slot %d") % (1))
        self.onLayoutFinish.append(self.initialUpdate)
Beispiel #10
0
    def __init__(self, session, ci_slot="9"):

        Screen.__init__(self, session)
        self.ci_slot = ci_slot
        self.filename = eEnv.resolve("${sysconfdir}/enigma2/ci") + str(
            self.ci_slot) + ".xml"

        self["key_red"] = StaticText(_("Delete"))
        self["key_green"] = StaticText(_("Add service"))
        self["key_yellow"] = StaticText(_("Add provider"))
        self["key_blue"] = StaticText(_("Select CAId"))
        self["CAidList_desc"] = StaticText(_("Assigned CAIds:"))
        self["CAidList"] = StaticText()
        self["ServiceList_desc"] = StaticText(_("Assigned services/provider:"))
        self["ServiceList_info"] = StaticText()

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "MenuActions"], {
                "green": self.greenPressed,
                "red": self.redPressed,
                "yellow": self.yellowPressed,
                "blue": self.bluePressed,
                "menu": self.menuPressed,
                "cancel": self.cancel
            }, -1)

        print(
            "[CommonInterfaceAssignment] CI_Wizzard_Config Configuring CI Slots : %d  "
            % self.ci_slot)

        i = 0
        self.caidlist = []
        for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
            i += 1
            self.caidlist.append((str(hex(int(caid))), str(caid), i))

        print(
            "[CommonInterfaceAssignment] CI_Wizzard_Config_CI%d read following CAIds from CI: %s"
            % (self.ci_slot, self.caidlist))

        self.selectedcaid = []
        self.servicelist = []
        self.caids = ""

        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self["ServiceList"] = serviceList

        self.loadXML()
        # if config mode !=advanced autoselect any caid
        if config.usage.setup_level.index <= 1:  # advanced
            self.selectedcaid = self.caidlist
            self.finishedCAidSelection(self.selectedcaid)
        self.onShown.append(self.setWindowTitle)
Beispiel #11
0
    def __init__(self, session, ci_slot="9"):

        Screen.__init__(self, session)
        self.ci_slot = ci_slot
        self.filename = "/etc/enigma2/ci" + str(self.ci_slot) + ".xml"

        self["key_red"] = StaticText(_("Delete"))
        self["key_green"] = StaticText(_("add Service"))
        self["key_yellow"] = StaticText(_("add Provider"))
        self["key_blue"] = StaticText(_("select CAId"))
        self["CAidList_desc"] = StaticText(_("assigned CAIds:"))
        self["CAidList"] = StaticText()
        self["ServiceList_desc"] = StaticText(_("assigned Services/Provider:"))
        self["ServiceList_info"] = StaticText()

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"],
            {
                "green": self.greenPressed,
                "red": self.redPressed,
                "yellow": self.yellowPressed,
                "blue": self.bluePressed,
                "cancel": self.cancel,
            },
            -1,
        )

        print "[CI_Wizzard_Config] Configuring CI Slots : %d  " % self.ci_slot

        i = 0
        self.caidlist = []
        print eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot)
        for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
            i += 1
            self.caidlist.append((str(hex(int(caid))), str(caid), i))

        print "[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s" % (self.ci_slot, self.caidlist)

        self.selectedcaid = []
        self.servicelist = []
        self.caids = ""

        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self["ServiceList"] = serviceList

        self.loadXML()
        # if config mode !=advanced autoselect any caid
        if config.usage.setup_level.index <= 1:  # advanced
            self.selectedcaid = self.caidlist
            self.finishedCAidSelection(self.selectedcaid)
        self.onShown.append(self.setWindowTitle)
Beispiel #12
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions", "CiSelectionActions"], {
                "left": self.keyLeft,
                "right": self.keyRight,
                "cancel": self.cancel,
                "ok": self.ok,
                "green": self.save,
                "red": self.cancel,
                "blue": self.blue,
            }, -1)

        self.list = []

        self.softcam = CamControl('softcam')
        self.cardserver = CamControl('cardserver')

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList

        softcams = self.softcam.getList()
        cardservers = self.cardserver.getList()

        self.softcams = ConfigSelection(choices=softcams)
        self.softcams.value = self.softcam.current()

        self.list.append(getConfigListEntry(_("Select Softcam"),
                                            self.softcams))
        if cardservers:
            self.cardservers = ConfigSelection(choices=cardservers)
            self.cardservers.value = self.cardserver.current()
            self.list.append(
                getConfigListEntry(_("Select Card Server"), self.cardservers))

        self.list.append(
            getConfigListEntry(_("Restart softcam"),
                               ConfigAction(self.restart, "s")))
        if cardservers:
            self.list.append(
                getConfigListEntry(_("Restart cardserver"),
                                   ConfigAction(self.restart, "c")))
            self.list.append(
                getConfigListEntry(_("Restart both"),
                                   ConfigAction(self.restart, "sc")))

        self["key_red"] = Label(_("Cancel"))
        self["key_green"] = Label(_("OK"))
        self["key_blue"] = Label(_("ECM Info's"))
Beispiel #13
0
	def __init__(self, session, args = 0):
		self.skin = CIselectMainMenu.skin
		Screen.__init__(self, session)
		#--->
		#---<
		#+++>
		appname = ""
		#+++<	
		
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Config"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"ok": self.greenPressed,
				"cancel": self.cancel
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				#--->
				#-if state == 0:
				#---<
				#+++>
				if state == 0 or state == -1:
				#+++<	
					appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
				elif state == 1:	
					appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
				elif state == 2:
					appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
				self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
Beispiel #14
0
    def __init__(self, session, args=0):

        Screen.__init__(self, session)

        self["key_red"] = StaticText(_("Close"))
        self["key_green"] = StaticText(_("Edit"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"], {
                "green": self.greenPressed,
                "red": self.close,
                "ok": self.greenPressed,
                "cancel": self.close
            }, -1)

        if getBoxType() in ('zgemmah9combo', ):
            NUM_CI = 1
        else:
            NUM_CI = eDVBCIInterfaces.getInstance(
            ) and eDVBCIInterfaces.getInstance().getNumOfSlots()

        print("[CI_Wizzard] FOUND %d CI Slots " % NUM_CI)

        self.dlg = None
        self.state = {}
        self.list = []
        if NUM_CI and NUM_CI > 0:
            for slot in list(range(NUM_CI)):
                state = eDVBCI_UI.getInstance().getState(slot)
                if state != -1:
                    appname = _("Slot %d") % (slot +
                                              1) + " - " + _("unknown error")
                    if state == 0:
                        appname = _("Slot %d") % (slot + 1) + " - " + _(
                            "no module found")
                    elif state == 1:
                        appname = _("Slot %d") % (slot + 1) + " - " + _(
                            "init modules")

                    elif state == 2:
                        appname = _("Slot %d") % (
                            slot + 1) + " - " + eDVBCI_UI.getInstance(
                            ).getAppName(slot)
                    self.list.append((appname, ConfigNothing(), 0, slot))
        else:
            self.list.append((_("no CI slots found"), ConfigNothing(), 1, -1))
        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["CiList"] = menuList
        self.onShown.append(self.setWindowTitle)
Beispiel #15
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions", "CiSelectionActions"],
            {
                "left": self.keyLeft,
                "right": self.keyRight,
                "cancel": self.cancel,
                "green": self.reset_both,
                "yellow": self.reset_sc,
                "red": self.cancel,
                "blue": self.download,
            },
            -1,
        )

        self.list = []

        self.softcam = CamConfig("emu")
        self.cardserver = SrvConfig("crdsrv")

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["info"] = Label("")
        self["ecmtext"] = Label("")
        self.ecm()
        self.service()
        self.onShown.append(self.openTest)
        self.mytimer = eTimer()
        self.mytimer.callback.append(self.ecm)
        self.mytimer.start(1000)

        softcams = [_("None")] + self.softcam.getList()
        cardservers = [_("None")] + self.cardserver.getList()

        self.softcams = ConfigSelection(choices=softcams)
        self.softcams.value = self.softcam.current() or _("None")
        self.cardservers = ConfigSelection(choices=cardservers)
        self.cardservers.value = self.cardserver.current() or _("None")

        self.list.append(getConfigListEntry(_("Select Cam:"), self.softcams))
        self.list.append(getConfigListEntry(_("Select Cardserver:"), self.cardservers))

        self["key_red"] = Label(_("Cancel"))
        self["key_yellow"] = Label(_("Start"))
        self["key_green"] = Label(_("Restart"))
        self["key_blue"] = Label(_("Download"))
Beispiel #16
0
	def __init__(self, session, ci_slot="9"):
		self.skin = CIconfigMenu.skin
		Screen.__init__(self, session)
		self.ci_slot=ci_slot
		self.filename="/etc/enigma2/ci"+str(self.ci_slot)+".xml"

		self["key_red"] = StaticText(_("delete"))
		self["key_green"] = StaticText(_("add Service"))
		self["key_yellow"] = StaticText(_("add Provider"))
		self["key_blue"] = StaticText(_("select CAId"))
		self["CAidList.desc"] = Label(_("assigned CAIds"))
		self["ServiceList.desc"] = Label(_("assigned Services/Provider"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"blue": self.bluePressed,
				"ok": self.okPressed,
				"cancel": self.cancel
			}, -1)

		print "[CI_Wizzard_Config] Configuring CI Slots : %d  " % self.ci_slot

		i=0
		self.caidlist=[]
		print eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot)
		for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
			i+=1
			self.caidlist.append((str(hex(int(caid))),str(caid),i))

		print "[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s" %(self.ci_slot, self.caidlist)
		self.selectedcaid =[]
		self.servicelist = []
		self.caids=_("no CAId selected")
		self["CAidList"] = Label(self.caids)

		serviceList = ConfigList(self.servicelist)
		serviceList.list = self.servicelist
		serviceList.l.setList(self.servicelist)
		self["ServiceList"] = serviceList

		self.loadXML()
		# if config mode !=advanced autoselect any caid
		if config.usage.setup_level.index <= 1: # advanced
			self.selectedcaid=self.caidlist
		self.onShown.append(self.setWindowTitle)
Beispiel #17
0
    def __init__(self, session, menu_path=""):
        Screen.__init__(self, session)
        screentitle = _("Common interface")
        if config.usage.show_menupath.value == 'large':
            menu_path += screentitle
            title = menu_path
            self["menu_path_compressed"] = StaticText("")
        elif config.usage.show_menupath.value == 'small':
            title = screentitle
            self["menu_path_compressed"] = StaticText(
                menu_path +
                " >" if not menu_path.endswith(' / ') else menu_path[:-3] +
                " >" or "")
        else:
            title = screentitle
            self["menu_path_compressed"] = StaticText("")
        Screen.setTitle(self, title)

        self["key_red"] = Label(_("Exit"))

        self["actions"] = ActionMap(
            ["SetupActions", "OkCancelActions", "CiSelectionActions"], {
                "left": self.keyLeft,
                "right": self.keyLeft,
                "ok": self.okbuttonClick,
                "red": self.cancel,
                "cancel": self.cancel
            }, -1)

        self.dlg = None
        self.state = {}
        self.list = []

        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["entries"].onSelectionChanged.append(self.selectionChanged)
        self["text"] = Label(_("Slot %d") % (1))
        self.onLayoutFinish.append(self.layoutFinished)
Beispiel #18
0
	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Edit"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.close,
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		if getBoxType() in ('zgemmah9combo'):
			NUM_CI = 1
		else:
			NUM_CI = eDVBCIInterfaces.getInstance() and eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if  NUM_CI and NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					appname = _("Slot %d") %(slot+1) + " - " + _("unknown error")
					if state == 0:
						appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
					elif state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")

					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )
		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
Beispiel #19
0
    def __init__(self, session, args=0):
        Screen.__init__(self, session)
        self.setTitle(_("CI assignment"))
        self["key_red"] = StaticText(_("Close"))
        self["key_green"] = StaticText(_("Edit"))
        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"], {
                "green": self.greenPressed,
                "red": self.close,
                "ok": self.greenPressed,
                "cancel": self.close
            }, -1)

        NUM_CI = SystemInfo["CommonInterface"]

        print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

        self.dlg = None
        self.state = {}
        self.list = []
        if NUM_CI and NUM_CI > 0:
            for slot in range(NUM_CI):
                state = eDVBCI_UI.getInstance().getState(slot)
                if state != -1:
                    appname = _("Slot %d") % (slot +
                                              1) + " - " + _("unknown error")
                    if state == 0:
                        appname = _("Slot %d") % (slot + 1) + " - " + _(
                            "no module found")
                    elif state == 1:
                        appname = _("Slot %d") % (slot + 1) + " - " + _(
                            "init modules")
                    elif state == 2:
                        appname = _("Slot %d") % (
                            slot + 1) + " - " + eDVBCI_UI.getInstance(
                            ).getAppName(slot)
                    self.list.append((appname, ConfigNothing(), 0, slot))
        else:
            self.list.append((_("no CI slots found"), ConfigNothing(), 1, -1))

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["CiList"] = menuList
Beispiel #20
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyRight,
				"cancel": self.cancel,
				"ok": self.ok,
				"green": self.save,
				"red": self.cancel,
				"blue": self.blue,
			},-1)

		self.list = [ ]

		self.softcam = CamControl('softcam')
		self.cardserver = CamControl('cardserver')

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList

		softcams = self.softcam.getList()
		cardservers = self.cardserver.getList()

		self.softcams = ConfigSelection(choices = softcams)
		self.softcams.value = self.softcam.current()

		self.list.append(getConfigListEntry(_("Select Softcam"), self.softcams))
		if cardservers:
			self.cardservers = ConfigSelection(choices = cardservers)
			self.cardservers.value = self.cardserver.current()
			self.list.append(getConfigListEntry(_("Select Card Server"), self.cardservers))

		self.list.append(getConfigListEntry(_("Restart softcam"), ConfigAction(self.restart, "s")))
		if cardservers:
			self.list.append(getConfigListEntry(_("Restart cardserver"), ConfigAction(self.restart, "c")))
			self.list.append(getConfigListEntry(_("Restart both"), ConfigAction(self.restart, "sc")))

		self["key_red"] = Label(_("Cancel"))
		self["key_green"] = Label(_("OK"))
		self["key_blue"] = Label(_("ECM Info's"))
Beispiel #21
0
	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		screentitle = _("Common interface")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)

		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.layoutFinished)
Beispiel #22
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.setTitle(_('Common Interface'))
     self['actions'] = ActionMap(
         ['OkCancelActions', 'CiSelectionActions'], {
             'left': self.keyLeft,
             'right': self.keyLeft,
             'ok': self.okbuttonClick,
             'cancel': self.cancel
         }, -1)
     self.dlg = None
     self.state = {}
     self.slots = []
     self.HighBitrateEntry = {}
     self.RelevantPidsRoutingEntry = {}
     self.entryData = []
     self.list = []
     self['entries'] = ConfigList(self.list)
     self['entries'].list = self.list
     self['entries'].l.setList(self.list)
     self['text'] = Label(_('Slot %d') % 1)
     self.onLayoutFinish.append(self.initialUpdate)
Beispiel #23
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('Common Interface'))
        self['actions'] = ActionMap(['OkCancelActions', 'CiSelectionActions'], {'left': self.keyLeft,
         'right': self.keyLeft,
         'ok': self.okbuttonClick,
         'cancel': self.cancel}, -1)
        self.dlg = None
        self.state = {}
        self.list = []
        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['entries'] = menuList
        self['entries'].onSelectionChanged.append(self.selectionChanged)
        self['text'] = Label(_('Slot %d') % 1)
Beispiel #24
0
    def __init__(self, session, args = 0):
        Screen.__init__(self, session)
        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Edit'))
        self['actions'] = ActionMap(['ColorActions', 'SetupActions'], {'green': self.greenPressed,
         'red': self.close,
         'ok': self.greenPressed,
         'cancel': self.close}, -1)
        NUM_CI = eDVBCIInterfaces.getInstance().getNumOfSlots()
        print '[CI_Wizzard] FOUND %d CI Slots ' % NUM_CI
        self.dlg = None
        self.state = {}
        self.list = []
        if NUM_CI > 0:
            for slot in range(NUM_CI):
                state = eDVBCI_UI.getInstance().getState(slot)
                if state == 0:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('no module found')
                elif state == 1:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('init modules')
                elif state == 2:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + eDVBCI_UI.getInstance().getAppName(slot)
                else:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + 'Unknown state %d' % state
                self.list.append((appname,
                 ConfigNothing(),
                 0,
                 slot))

        else:
            self.list.append((_('no CI slots found'),
             ConfigNothing(),
             1,
             -1))
        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['CiList'] = menuList
        self.onShown.append(self.setWindowTitle)
Beispiel #25
0
    def __init__(self, session, ci_slot = '9'):
        Screen.__init__(self, session)
        self.ci_slot = ci_slot
        self.filename = eEnv.resolve('${sysconfdir}/enigma2/ci') + str(self.ci_slot) + '.xml'
        self['key_red'] = StaticText(_('Delete'))
        self['key_green'] = StaticText(_('Add service'))
        self['key_yellow'] = StaticText(_('Add provider'))
        self['key_blue'] = StaticText(_('Select CAId'))
        self['CAidList_desc'] = StaticText(_('Assigned CAIds:'))
        self['CAidList'] = StaticText()
        self['ServiceList_desc'] = StaticText(_('Assigned services/provider:'))
        self['ServiceList_info'] = StaticText()
        self['actions'] = ActionMap(['ColorActions', 'SetupActions'], {'green': self.greenPressed,
         'red': self.redPressed,
         'yellow': self.yellowPressed,
         'blue': self.bluePressed,
         'cancel': self.cancel}, -1)
        print '[CI_Wizzard_Config] Configuring CI Slots : %d  ' % self.ci_slot
        i = 0
        self.caidlist = []
        print eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot)
        for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
            i += 1
            self.caidlist.append((str(hex(int(caid))), str(caid), i))

        print '[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s' % (self.ci_slot, self.caidlist)
        self.selectedcaid = []
        self.servicelist = []
        self.caids = ''
        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self['ServiceList'] = serviceList
        self.loadXML()
        if config.usage.setup_level.index <= 1:
            self.selectedcaid = self.caidlist
            self.finishedCAidSelection(self.selectedcaid)
        self.onShown.append(self.setWindowTitle)
Beispiel #26
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Common Interface"))
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.slots = []
		self.HighBitrateEntry = {}
		self.RelevantPidsRoutingEntry = {}
		self.entryData = []

		self.list = [ ]
		self["entries"] = ConfigList(self.list)
		self["entries"].list = self.list
		self["entries"].l.setList(self.list)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.initialUpdate)