- dynamic interface handling
[enigma2-plugins.git] / networkwizard / src / networkwizard.xml
1 <wizard>
2                 <step id="welcome" nextstep="selectinterface">
3                         <text value="Welcome.\n\nIf you want to connect your Dreambox to the Internet, this wizard will guide you through the basic network setup of your Dreambox.\n\nPress OK to start configuring your network" />
4                         <code>
5 self.clearSelectedKeys()
6 self.selectKey("OK")
7                         </code>
8                 </step>
9
10                 <step id="selectinterface">
11
12                         <text value="Please select the network interface that you want to use for your internet connection.\n\nPlease press OK to continue." />
13                         <list type="dynamic" source="listInterfaces" evaluation="InterfaceSelectionMade" onselect="InterfaceSelectionMoved" />
14                         <code>
15 self.clearSelectedKeys()
16 self.selectKey("OK")
17 self.selectKey("UP")
18 self.selectKey("DOWN")
19                         </code>
20                         <code pos="after">
21 self.checkInterface(self.selectedInterface)                         
22 self.currStep = self.getStepWithID(self.NextStep)
23                         </code> 
24                 </step>
25
26                 <step id="nwconfig" nextstep="confdns">
27                         <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." />
28                         <config screen="AdapterSetup" module="NetworkSetup" args="self.selectedInterface" type="ConfigList" />
29                         <code>
30 self.clearSelectedKeys()
31 self.selectKey("OK")
32 self.selectKey("UP")
33 self.selectKey("DOWN")
34 self.selectKey("LEFT")
35 self.selectKey("RIGHT")
36                         </code>
37                 </step>
38
39                 <step id="confdns" nextstep="checklanstatusend">
40                         <text value="Please configure or verify your Nameservers by filling out the required values.\nWhen you are ready press OK to continue." />
41                         <config screen="NameserverSetup" module="NetworkSetup" type="ConfigList" />
42                         <code>
43 self.clearSelectedKeys()
44 self.selectKey("OK")
45                         </code>
46                         <code pos="after">
47 self.checkNetwork()
48                         </code> 
49                 </step>
50
51                 <step id="checklanstatusend" nextstep="end">
52                 <condition>
53 self.condition = (self.InterfaceState == True )
54                 </condition>
55                         <text value="Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\nPlease press OK to continue." />
56                         <code>
57 self.clearSelectedKeys()
58 self.selectKey("OK")
59                         </code>
60                 </step>
61
62                 <step id="checklanstatusend">
63                 <condition>
64 self.condition = (self.InterfaceState == False )
65                 </condition>
66                         <text value="Your internet connection is not working!\nPlease choose what you want to do next." />
67                         <code>
68 self.clearSelectedKeys()
69 self.selectKey("OK")
70 self.selectKey("UP")
71 self.selectKey("DOWN")
72                         </code>
73                         <list>
74                                 <listentry caption="Configure your network again" step="selectinterface" />
75                                 <listentry caption="Exit wizard and configure later manually" step="end" />
76                         </list>
77                 </step>
78
79                 <step id="scanwlan" nextstep="nwconfig">
80                 <condition>
81 self.checkInterface(self.selectedInterface)                     
82 self.condition = (self.isInterfaceUp == True and self.WlanPluginInstalled == True)
83                 </condition>
84                         <text value="Please select the wireless LAN network that you want to connect to.\n\nPlease press OK to continue." />
85                         <list type="dynamic" source="listModes" evaluation="modeSelectionMade" onselect="modeSelectionMoved" />
86                         <code>
87 self.clearSelectedKeys()
88 self.selectKey("OK")
89 self.selectKey("UP")
90 self.selectKey("DOWN")
91 self.selectKey("LEFT")
92 self.selectKey("RIGHT")
93                         </code>
94                         <code pos="after">
95 self.saveAccessPoint(self.ap)
96                         </code>
97                 </step>
98
99                 <step id="scanwlan">
100                 <condition>
101 self.checkInterface(self.selectedInterface)                             
102 self.condition = (self.isInterfaceUp == False and self.WlanPluginInstalled == True)
103                 </condition>
104                         <text value="Your wireless LAN internet connection could not be started!\nHave you attached your USB WLAN Stick?\n\nPlease choose what you want to do next." />
105                         <list>
106                                 <listentry caption="Configure your wireless LAN again" step="scanwlan" />
107                                 <listentry caption="Configure your internal LAN" step="selectinterface" />
108                                 <listentry caption="Exit wizard and configure later manually" step="end" />
109                         </list>
110                         <code>
111 self.clearSelectedKeys()
112 self.selectKey("OK")
113 self.selectKey("UP")
114 self.selectKey("DOWN")
115                         </code>
116                 </step>
117
118                 <step id="scanwlan">
119                 <condition>
120 self.checkInterface(self.selectedInterface)                             
121 self.condition = (self.isInterfaceUp == True and self.WlanPluginInstalled == False)
122                 </condition>
123                         <text value="The wireless LAN plugin is not installed!\nPlease install it and choose what you want to do next." />
124                         <list>
125                                 <listentry caption="Configure your internal LAN" step="selectinterface" />
126                                 <listentry caption="Exit wizard and configure later manually" step="end" />
127                         </list>
128                         <code>
129 self.clearSelectedKeys()
130 self.selectKey("OK")
131 self.selectKey("UP")
132 self.selectKey("DOWN")
133                         </code>
134                 </step>
135
136                 <step id="end">
137                         <text value="Thank you for using the wizard. Your Network is now ready to use.\nPlease press OK to continue." />
138                         <code>
139 self.clearSelectedKeys()
140 self.selectKey("OK")
141                         </code>
142                 </step>
143 </wizard>
144
145