alarmui/group/alarmui_snooze.rul
branchRCL_3
changeset 66 bd7edf625bdd
child 67 1539a383d7b6
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 <script xmlns="http://www.nokia.com/ns/cep/script/1.0/" xmlns:cep="http://www.nokia.com/ns/cep/1.0/">
       
     2     <!-- If alarm is not active, nothing needs to be done -->
       
     3     <if>
       
     4         <equals>
       
     5             <contextRef source='Alarm' type='Status.Active' value='false'/>
       
     6         </equals>
       
     7         <actions>
       
     8             <!-- Do nothing -->
       
     9         </actions>        
       
    10     </if>
       
    11     
       
    12     <!-- Snooze alarm when device is turned upside down -->
       
    13     <elseIf>
       
    14         <and>
       
    15             <!-- Check that turning interaction is set -->
       
    16             <equals>
       
    17             	   <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceAlarm'/>
       
    18                  <string>On</string>
       
    19             </equals>
       
    20                  <!-- ...and previous orientation is not 'Undefined' ... -->
       
    21             <notEqual>
       
    22                  <contextRef source='Sensor' type='Event.Orientation.Previous'/>
       
    23                  <string>Undefined</string>
       
    24             </notEqual>
       
    25                  <!-- ...and we receive a new orientation event from sensors... -->
       
    26 	    <contextChanged>
       
    27 	         <contextRef source='Sensor' type='Event.Orientation'/>
       
    28 	    </contextChanged>
       
    29     	    <equals>
       
    30                  <contextRef source='Sensor' type='Event.Orientation'/>
       
    31                  <string>DisplayDownwards</string>
       
    32     	    </equals>
       
    33         </and>
       
    34         <actions>
       
    35            <!-- snooze the alarm -->
       
    36             <AlarmUI.Snooze/>
       
    37         </actions>
       
    38     </elseIf>
       
    39 </script>