alarmui/group/alarmui_snooze.rul
author andy simpson <andrews@symbian.org>
Thu, 02 Sep 2010 15:47:07 +0100
branchRCL_3
changeset 67 1539a383d7b6
parent 30 d68a4b5d5885
parent 66 bd7edf625bdd
permissions -rw-r--r--
Merge after removal of incorrect RCL_3 drop

<script xmlns="http://www.nokia.com/ns/cep/script/1.0/" xmlns:cep="http://www.nokia.com/ns/cep/1.0/">
    <!-- If alarm is not active, nothing needs to be done -->
    <if>
        <equals>
            <contextRef source='Alarm' type='Status.Active' value='false'/>
        </equals>
        <actions>
            <!-- Do nothing -->
        </actions>        
    </if>
    
    <!-- Snooze alarm when device is turned upside down -->
    <elseIf>
        <and>
            <!-- Check that turning interaction is set -->
            <equals>
            	   <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceAlarm'/>
                 <string>On</string>
            </equals>
                 <!-- ...and previous orientation is not 'Undefined' ... -->
            <notEqual>
                 <contextRef source='Sensor' type='Event.Orientation.Previous'/>
                 <string>Undefined</string>
            </notEqual>
                 <!-- ...and we receive a new orientation event from sensors... -->
	    <contextChanged>
	         <contextRef source='Sensor' type='Event.Orientation'/>
	    </contextChanged>
    	    <equals>
                 <contextRef source='Sensor' type='Event.Orientation'/>
                 <string>DisplayDownwards</string>
    	    </equals>
        </and>
        <actions>
           <!-- snooze the alarm -->
            <AlarmUI.Snooze/>
        </actions>
    </elseIf>
</script>