phoneapp/silenceactionplugin/data/silenceringingtone_silence.rul
branchRCL_3
changeset 25 5266b1f337bd
parent 12 b68fcd923911
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/silenceactionplugin/data/silenceringingtone_silence.rul	Wed Sep 01 12:30:10 2010 +0100
@@ -0,0 +1,30 @@
+<script xmlns="http://www.nokia.com/ns/cep/script/1.0/" xmlns:cep="http://www.nokia.com/ns/cep/1.0/">
+    <!-- do nothing if the pre-conditions do not match -->
+    <if>
+        <!-- silence ringing tone feature is not active -->
+        <notEqual>
+            <contextRef source='Feature' type='SilenceRingingTone.Active' value='true'/>
+        </notEqual>
+        <actions>
+            <!-- do nothing -->
+        </actions>
+    </if>
+
+    <!-- silence the ringing tone -->
+    <elseIf>
+        <and>
+            <!-- display is turned down -->
+            <contextChanged>
+                <contextRef source='Sensor' type='Event.Orientation' value='DisplayDownwards'/>
+            </contextChanged>
+            <!-- previous orientation state is not undefined -->
+            <notEqual>
+                <contextRef source='Sensor' type='Event.Orientation.Previous' value='Undefined'/>
+            </notEqual>
+        </and>
+        <actions>
+            <!-- Silence ringing tone -->
+            <Phone Command='Silence'/>
+        </actions>
+    </elseIf>
+</script>
\ No newline at end of file