phoneapp/silenceactionplugin/data/silence.rul
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:24 +0200
branchRCL_3
changeset 5 2a26698d78ba
parent 0 5f000ab63145
permissions -rw-r--r--
Revision: 201009 Kit: 201010

<script xmlns="http://www.nokia.com/ns/cep/script/1.0/"
xmlns:cep="http://www.nokia.com/ns/cep/1.0/">

    <!-- Check if we have incoming call and we receive display down orientation event -->
    <if>
        <and>
            <!-- Must have a ringin call and receive orientation event from sensor -->
            <equals>
                <contextRef source='Call' type='State'/>
                <string>Ringing</string>
            </equals>
            <equals>
                <contextRef source='Sensor' type='Setting.Active'/>
                <string>On</string>
            </equals>
            <!-- Check that turning interaction is set -->
            <equals>
                <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceCalls'/>
                <string>On</string>
            </equals>
            <!-- ...and previous orientation is not 'Undefined' ... -->
            <notEqual>
                <contextRef source='Sensor' type='Event.Orientation.Previous'/>
                <string>Undefined</string>
            </notEqual>
            <contextChanged>
                <contextRef source='Sensor' type='Event.Orientation'/>
            </contextChanged>
            <equals>
                <contextRef source='Sensor' type='Event.Orientation'/>
                <string>DisplayDownwards</string>
            </equals>
        </and>
        <actions>
            <!-- DEBUG -->
            <!-- <publishContext><contextRef source="Test" type="Log" value="silence.rul - 01 silence call only"/></publishContext> -->

            <!-- Silence ringing tone -->
            <Phone Command='Silence'/>
            <!-- Vibra feedback -->
            <Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
        </actions>
    </if>

</script>