alarmui/group/alarmuisnooze.rul
branchRCL_3
changeset 27 55d60436f00b
parent 21 9711e452b5e9
child 29 ae323dbb990e
child 30 d68a4b5d5885
--- a/alarmui/group/alarmuisnooze.rul	Tue Apr 27 16:36:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-<!-- defines a rules to snooze and stop an active alarm on a doubletap or turndown event -->
-<script xmlns="http://www.nokia.com/ns/cep/script/1.0/" xmlns:cep="http://www.nokia.com/ns/cep/1.0/">
-
-    <!-- active sensor channels when alarm expires -->
-		<if>
-        <equals>
-            <contextRef source='Sensor' type='Setting.Active'/>
-            <string>Off</string>
-        </equals>
-        <actions>
-        </actions>
-    </if>
-    <!-- Check if we have an active alarm and we receive an event -->
-    <elseIf>
-        <and>
-            <!-- Must have an active alarm and receive new double tap event or orientation event from sensor -->
-            <!-- ...alarm is active... -->
-            <notEqual>
-                <contextRef source='AlarmUI' type='State'/>
-                <string>Inactive</string>
-            </notEqual>
-            <or>
-                <and>
-                    <!-- Check that double tap interaction is set -->
-                    <equals>
-                        <contextRef source='Sensor' type='Setting.TappingInteraction.SilenceAlarm'/>
-                        <string>On</string>
-                    </equals>
-                    <!-- ...and we receive a new doubletap event from sensors -->
-                    <contextUpdated>
-                        <contextRef source='Sensor' type='Event.DoubleTap'/>
-        	          </contextUpdated>
-                </and>
-    	          <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>
-            </or>
-        </and>
-        <actions>
-           <!-- snooze the alarm -->
-            <AlarmUI.Snooze dummy='dummy'/>
-
-            <!-- request vibra feedback -->
-            <Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
-        </actions>
-    </elseIf>
-    <!-- Check if we just have an active alarm -->
-    <!-- active sensor channels when alarm expires -->
-    <elseIf>
-    		<and>
-            <!-- ...alarm is active... -->
-            <contextUpdated>
-                <contextRef source='AlarmUI' type='State'/>
-            </contextUpdated>
-            <notEqual>
-                <contextRef source='AlarmUI' type='State'/>
-                <string>Inactive</string>
-            </notEqual>
-        </and>
-        <actions>
-            <!-- Activate double tap events from sensor -->
-            <publishContext>
-                <contextRef source='Sensor' type='Event' value='DoubleTap.Activate'/>
-            </publishContext>
-            <!-- Activate orientation events from sensor -->
-            <publishContext>
-                <contextRef source='Sensor' type='Event' value='Orientation.Activate'/>
-            </publishContext>
-        </actions>
-    </elseIf>
-    <!-- stop an active alarm on a 'Stop' command -->
-    <elseIf>
-        <and>
-            <!-- alarm is active... -->
-            <notEqual>
-                <contextRef source='AlarmUI' type='State'/>
-                <string>Inactive</string>
-            </notEqual>
-            <!-- ...and we got a new stop command -->
-            <contextUpdated>
-                <contextRef source='AlarmUI' type='Command'/>
-            </contextUpdated>
-            <equals>
-                <contextRef source='AlarmUI' type='Command'/>
-                <string>Stop</string>
-            </equals>
-        </and>
-        <actions>
-            <!-- stop the alarm -->
-            <AlarmUI.Stop dummy='dummy'/>
-
-            <!-- request vibra feedback -->
-            <Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
-        </actions>
-    </elseIf>
-    <!-- snooze an active alarm on a 'Snooze' command -->
-    <elseIf>
-        <and>
-            <!-- alarm is active... -->
-            <notEqual>
-                <contextRef source='AlarmUI' type='State'/>
-                <string>Inactive</string>
-            </notEqual>
-            <!-- ...and we got a new stop command -->
-            <contextUpdated>
-                <contextRef source='AlarmUI' type='Command'/>
-            </contextUpdated>
-            <equals>
-                <contextRef source='AlarmUI' type='Command'/>
-                <string>Snooze</string>
-            </equals>
-        </and>
-        <actions>
-            <!-- snooze the alarm -->
-            <AlarmUI.Snooze dummy='dummy'/>
-
-            <!-- request vibra feedback -->
-            <Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
-        </actions>
-    </elseIf>
-</script>    
\ No newline at end of file