home *** CD-ROM | disk | FTP | other *** search
/ Thomson (Residential) / TGSTPv7203.iso / mac / HIW / xml / mod_devicesettings.xml < prev    next >
Extensible Markup Language  |  2008-02-11  |  7KB  |  145 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE fsm SYSTEM "fsm.dtd">
  3. <!-- 
  4.     Shows custom pages and other pages for user definable settings, including:
  5.      - PPP account settings (showPageEnterAccount) + normalization (normalizeAuthentication)
  6.      - wireless security settings (mod_wirelesssecurity)
  7.      - host/ST IP configuration (mod_ipconfig)
  8.     See documentation of the respective modules for more information.
  9.  
  10.     Input properties:
  11.     - profile: The profile object.
  12.  
  13.     Output properties:
  14.   - profile: The modified profile object.
  15.     - interface: Interface object to which the host must be configured.
  16.   - securityMode: The chosen wireless encryption type.
  17.   - networkKey: The entered encryption key.
  18.  
  19.   Exit events:
  20.   - finished: User passed all pages.
  21. -->
  22.  
  23. <fsm>
  24.     <property key="profile" required="yes"/>
  25.     <states>
  26.         <!-- custom pages -->
  27.         <state type="showCustomPages" name="customPageFsm"/>
  28.         <!-- enter account page -->
  29.         <state type="compare" name="checkShowEnterAccountPage">
  30.             <property key="type" value="number"/>
  31.             <property key="comparisonType" value="smaller"/>
  32.             <property key="input1" value="-1"/>
  33.         </state>
  34.         <state type="showPageEnterAccount" name="enterAccountPage">
  35.       <property key="registerPage" value="1"/>
  36.       <property key="backEnabled" value="1"/>
  37.         </state>
  38.         <state type="normalizeAuthentication" name="normalizeAuthentication">
  39.             <!--property key="plugin" value=".dll"/-->
  40.             <!--property key="usernamePostfix" value=""/-->
  41.         </state>
  42.         <!-- wireless security page -->
  43.         <state type="compare" name="checkShowWirelessSecurityPage">
  44.             <property key="type" value="number"/>
  45.             <property key="comparisonType" value="smaller"/>
  46.             <property key="input1" value="-1"/>
  47.         </state>
  48.         <state file="mod_settings_wirelessconfig.xml" name="wirelessSecurity"/>
  49.         <!-- IP config select and expert page -->
  50.         <state type="compare" name="checkShowIpConfigPages">
  51.             <property key="comparisonType" value="equal"/>
  52.             <property key="input1" value="user"/>
  53.         </state>
  54.     <state type="compare" name="checkConfigureAuto">
  55.       <property key="comparisonType" value="equal"/>
  56.       <property key="input1" value="auto"/>
  57.     </state>
  58.     <state type="configInterface" name="configureDHCP"/>
  59.         <state file="mod_settings_ipconfig.xml" name="ipConfigPages"/>
  60.     </states>
  61.  
  62.     <events>
  63.         <event name="finished"/>
  64.     </events>
  65.  
  66.     <transitions>
  67.         <!-- custom pages -->
  68.         <transition startstate="customPageFsm">
  69.             <propertymap target="profile" function="$fsm.profile"/>
  70.             <propertymap target="language" function="$app.programLanguage"/>
  71.         </transition>
  72.  
  73.         <!-- EnterAccount page + normalization -->
  74.         <transition fromstate="customPageFsm" tostate="checkShowEnterAccountPage" event="finished">
  75.             <!-- output --><propertymap target="fsm.profile" function="$profile"/>
  76.             <propertymap target="input2" function="pos(join(property($profile, 'wizardAddedPages'), ';'), 'EnterAccount')"/>
  77.         </transition>
  78.         <transition fromstate="checkShowEnterAccountPage" tostate="enterAccountPage" event="true">
  79.             <propertymap target="profile" function="$fsm.profile"/>
  80.         </transition>
  81.         <transition fromstate="enterAccountPage" tostate="normalizeAuthentication" event="pageNext">
  82.             <!-- output --><propertymap target="fsm.profile" function="$profile"/>
  83.             <propertymap target="username" function="$username"/>
  84.             <propertymap target="password" function="$password"/>
  85.         </transition>
  86.  
  87.         <!-- WirelessSecurity page -->
  88.         <transition fromstate="checkShowEnterAccountPage" tostate="checkShowWirelessSecurityPage" event="false">
  89.             <propertymap target="input2" function="pos(join(property($fsm.profile, 'wizardAddedPages'), ';'), 'WirelessSecurity')"/>
  90.         </transition>
  91.         <transition fromstate="normalizeAuthentication" tostate="checkShowWirelessSecurityPage" event="finished">
  92.             <!-- output --><propertymap target="fsm.profile" function="setproperty($fsm.profile, 'ST_PPP_USER', $username)"/>
  93.             <!-- output --><propertymap target="fsm.profile" function="setproperty($fsm.profile, '%ST_PPP_PASSWORD', $password)"/>
  94.             <propertymap target="input2" function="pos(join(property($fsm.profile, 'wizardAddedPages'), ';'), 'WirelessSecurity')"/>
  95.         </transition>
  96.         <transition fromstate="checkShowWirelessSecurityPage" tostate="wirelessSecurity" event="true">
  97.             <propertymap target="profile" function="$fsm.profile"/>
  98.             <propertymap target="ssid" function="property($app.device, '_SSID_SERIAL')"/>
  99.             <propertymap target="networkKey" function="property($app.device, '_WPAKEY_SERIAL')"/>
  100.             <propertymap target="securityMode" function="$app.pageWirelessSecurity.initialSecurityMode"/>
  101.             <propertymap target="allowedSecurityModes" function="split(lowercase($app.pageWirelessSecurity.allowedSecurityModes), ',')"/>
  102.         </transition>
  103.         <transition fromstate="wirelessSecurity" tostate="checkShowIpConfigPages" event="finished">
  104.             <!-- output --><propertymap target="fsm.ssid" function="$ssid"/>
  105.             <!-- output --><propertymap target="fsm.securityMode" function="$securityMode"/>
  106.             <!-- output --><propertymap target="fsm.networkKey" function="$networkKey"/>
  107.             <!-- output --><propertymap target="fsm.profile" function="$profile"/>
  108.             <propertymap target="input2" function="property($fsm.profile, 'HOST_SETUP')"/>
  109.         </transition>
  110.  
  111.         <!-- IP Configuration pages -->
  112.         <transition fromstate="checkShowWirelessSecurityPage" tostate="checkShowIpConfigPages" event="false">
  113.             <!-- default encryption type from template -->
  114.             <!-- output --><propertymap target="fsm.securityMode" function="property($fsm.profile, 'ST_WF_SECURITY')"/>
  115.             <!-- default ssid network key from device; assume _WEPKEY_SERIAL == _WPAKEY_SERIAL -->
  116.             <!-- output --><propertymap target="fsm.ssid" function="property($fsm.profile, '_SSID_SERIAL')"/>
  117.             <!-- output --><propertymap target="fsm.networkKey" function="property($app.device, '_WPAKEY_SERIAL')"/>
  118.             <propertymap target="input2" function="property($fsm.profile, 'HOST_SETUP')"/>
  119.         </transition>
  120.         <transition fromstate="checkShowIpConfigPages" tostate="ipConfigPages" event="true">
  121.             <propertymap target="profile" function="$fsm.profile"/>
  122.         </transition>
  123.     <transition fromstate="checkShowIpConfigPages" tostate="checkConfigureAuto" event="false">
  124.       <!-- output --><propertymap target="fsm.interface" function="property($app.device, 'lanInterface')"/>
  125.       <propertymap target="input2" function="property($fsm.profile, 'HOST_SETUP')"/>
  126.     </transition>
  127.     <transition fromstate="checkConfigureAuto" tostate="configureDHCP" event="true">
  128.       <propertymap target="interface" function="$fsm.interface"/>
  129.       <propertymap target="enableDhcp" function="1"/>
  130.     </transition>
  131.         <!-- finished -->
  132.         <transition fromstate="checkConfigureAuto" toexit="finished" event="false">
  133.             <!-- output --><propertymap target="fsm.interface" function="(dummy)"/>
  134.         </transition>
  135.     <transition fromstate="configureDHCP" toexit="finished" event="finished">
  136.       <!-- output --><propertymap target="fsm.interface" function="$interface"/>
  137.     </transition>
  138.         <transition fromstate="ipConfigPages" toexit="finished" event="finished">
  139.             <!-- output --><propertymap target="fsm.profile" function="$profile"/>
  140.             <!-- output --><propertymap target="fsm.interface" function="$interface"/>
  141.         </transition>
  142.  
  143.     </transitions>
  144. </fsm>
  145.