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

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE fsm SYSTEM "fsm.dtd">
  3. <!-- 
  4.     Shows the hardware plug page, detects hardware from the provided
  5.     adaptor manager(s) and install software if necessary.
  6.  
  7.     Input properties:
  8.     - adaptorManagerList: List of adaptormanagers to use for detection. Default empty.
  9.   - serialFilter: Regexp to filter modems/routers on serial number. Default '*'
  10.   - nameFilter: Regexp to filter modems/routers on device name. Default '*'
  11.   - imageName: name of the image located in the 'Images' directory for 
  12.     displaying which hardware to plug.
  13.   - infoText: text to display above the image.
  14.   - timeout: Detection timeout in seconds. Default 600.
  15.  
  16.     Output properties:
  17.   - adaptorManager: Name of the plugin who's hardware is plugged. Only set 
  18.     if hardware was detected, not if a device was found over ethernet.
  19.       
  20.   Exit events:
  21.   - plugged: Non-wireless hardware or ethernet plugged.
  22.   - error: Software installation failed.
  23.  
  24.   Other files referred:
  25.   - ui/hwconnection.ui
  26.  
  27. -->
  28.  
  29. <fsm type="pageFsm">
  30.     <property key="timeout" value="600"/>
  31.     <property key="autoContinue" value="yes"/>
  32.     <property key="autoContinueTime" value="2"/>
  33.   <!-- states -->
  34.   <states>
  35.     <state type="showUiPageContinue" name="showPageInstallHardware">
  36.       <property key="fileName" value="ui/hwconnection.ui"/>
  37.       <property key="registerPage" value="1"/>
  38.       <property key="backEnabled" value="1"/>
  39.     </state>
  40.     <state type="installHW_detectAllHardware" name="detectPluggedDevices" weight="30"/>
  41.     <state type="updatePage" name="changeLabelInstall">
  42.         <property key="labelAction.text" value="tr(Installing software for the device...)"/>
  43.     </state>
  44.     <state type="updatePage" name="changeLabelFound">
  45.         <property key="labelAction.text" value="tr(Hardware found, click Next to continue.)"/>
  46.     </state>
  47.     <state type="updatePage" name="changeLabelError">
  48.         <property key="labelAction.text" value="tr(Failed to install software.)"/>
  49.     </state>
  50.     <state type="updatePage" name="changeLabelTimeout">
  51.       <property key="labelAction.text" value="tr(Hardware not found.)"/>
  52.     </state>
  53.     <state type="pluginCheckSoftwareInstallState" name="checkSoftwareInstallState" weight="1"/>
  54.     <state type="pluginInstallSoftware" name="installClientSoftware" weight="2"/>
  55.   </states>
  56.  
  57.     <events>
  58.     <event name="plugged"/>
  59.     <event name="error"/>
  60.     <event name="timeout"/>
  61.   </events>
  62.  
  63.   <transitions>
  64.     <transition name="start" startstate="showPageInstallHardware">
  65.       <propertymap target="image.pixmap" function="pixmap(concat($app.applicationPath, '/Images/', $fsm.imageName))"/>
  66.       <propertymap target="labelInfo.text" function="$fsm.infoText"/>
  67.       <propertymap target="labelAction.text" function="tr(Waiting for connection...)"/>
  68.     </transition>
  69.   <!-- wait for something to be plugged -->
  70.     <transition fromstate="showPageInstallHardware" tostate="detectPluggedDevices" event="continue">
  71.       <propertymap target="timeout" function="$fsm.timeout"/>
  72.       <propertymap target="adaptorManagerList" function="$fsm.adaptorManagerList"/>
  73.       <propertymap target="nameFilter" function="$fsm.nameFilter"/>
  74.       <propertymap target="serialFilter" function="$fsm.serialFilter"/>
  75.     </transition>
  76.  
  77.   <!-- ST plugged -->
  78.     <transition fromstate="detectPluggedDevices" tostate="changeLabelFound" event="pluggedSTdev">
  79.       <!-- output --><propertymap target="fsm.adaptorManager" function="$adaptorManagerName"/>
  80.     </transition>
  81.  
  82.   <!-- DM plugged -->
  83.     <transition fromstate="detectPluggedDevices" tostate="checkSoftwareInstallState" event="pluggedDMdev|needReboot"><!-- ignore reboot request -->
  84.       <!-- output --><propertymap target="fsm.adaptorManager" function="$adaptorManagerName"/>
  85.       <propertymap target="adaptorManager" function="$adaptorManagerName"/>
  86.     </transition>
  87.     <!-- install software -->
  88.     <transition fromstate="checkSoftwareInstallState" tostate="changeLabelInstall" event="nothingInstalled"/>
  89.     <transition fromstate="changeLabelInstall" tostate="installClientSoftware" event="continue">
  90.       <propertymap target="adaptorManager" function="$fsm.adaptorManager"/>
  91.     </transition>
  92.  
  93.         <!-- finish -->
  94.     <transition fromstate="checkSoftwareInstallState" tostate="changeLabelFound" event="allInstalled|notStarted"/>
  95.     <transition fromstate="installClientSoftware" tostate="changeLabelFound" event="success|notStarted"/>
  96.     <transition fromstate="changeLabelFound" toexit="plugged" event="continue"/>
  97.     
  98.     <!-- catch errors -->
  99.     <transition fromstate="installClientSoftware" tostate="changeLabelError" event="failed"/>
  100.     <transition fromstate="changeLabelError" toexit="error" event="continue"/>
  101.       <!-- timeout -->
  102.     <transition fromstate="detectPluggedDevices" tostate="changeLabelTimeout" event="timeout"/>
  103.     <transition fromstate="changeLabelTimeout" toexit="timeout" event="continue"/>
  104.   </transitions>
  105. </fsm>
  106.