add ci
[vuplus_dvbapp] / lib / python / Screens / Ci.py
1 from Screen import *
2 from Components.MenuList import MenuList
3 from Components.ActionMap import ActionMap
4 from Components.Header import Header
5 from Components.Button import Button
6 from Components.Label import Label
7
8 class CiMmi(Screen):
9         def addEntry(self, list, entry):
10                 if entry[0] == "TEXT":          #handle every item (text / pin only?)
11                         pass
12                 pass
13
14         def __init__(self, session, slotid, title, subtitle, bottom, entries):
15                 Screen.__init__(self, session)
16
17                 self.slotid = slotid
18                 self["title"] = Label(title)
19                 self["subtitle"] = Label(subtitle)
20                 self["bottom"] = Label(bottom)
21                                 
22                 list = [ ]
23                 for entry in entries:
24                         self.addEntry(list, entry)
25                 self["entries"] = MenuList(list)        #menulist!?
26                 
27                 self["actions"] = ActionMap(["OkCancelActions"], 
28                         {
29                                 #"ok": self.okbuttonClick,
30                                 "cancel": self.close
31                         })
32
33 #just for testing - we need an cimanager? (or not?)
34 class CiSelection(Screen):
35         def okbuttonClick(self):
36                 #generate menu / list
37                 list = [ ]
38                 list.append( ("TEXT", "CA-Info") )
39                 list.append( ("TEXT", "Card Status") )
40                 #list.append( ("PIN", "Card Pin") )
41                 self.session.open(CiMmi, 0, "Wichtiges CI", "Mainmenu", "Footer", list)
42                 
43         def __init__(self, session):
44                 Screen.__init__(self, session)
45                 
46                 self["actions"] = ActionMap(["OkCancelActions"], 
47                         {
48                                 "ok": self.okbuttonClick,
49                                 "cancel": self.close
50                         })