phoneapp/silenceactionplugin/data/silenceringingtone_activate.rul
author Fionntina Carville <fionntinac@symbian.org>
Mon, 15 Nov 2010 11:44:32 +0000
branchRCL_3
changeset 84 1dabaed15bcd
parent 81 c26cc2a7c548
permissions -rw-r--r--
Bug 3539. Update localisation mappings for phone.

<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 following pre-conditions do not match -->
    <if>
        <or>
            <!-- sensor settings are disabled -->
            <notEqual>
                <contextRef source='Sensor' type='Setting.Active' value='On'/>
            </notEqual>
            <!-- silence ringing tone turning interaction is disabled -->
            <notEqual>
                <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceCalls' value='On'/>
            </notEqual>
        </or>
        <actions>
            <!-- do nothing -->
        </actions>
    </if>

    <!-- activate silence ringing tone feature and orientation sensor channel-->
    <elseIf>
        <!-- call ringing -->
        <contextChanged>
            <contextRef source='Call' type='State' value='Ringing'/>
        </contextChanged>
        <actions>
            <!-- Activate orientation channel (0x01) from sensor source (0x10282DF0) -->
            <sourceCommand uid='0x10282DF0'>
                <sensorCommand channelId='0x01' id='activate'/>
            </sourceCommand>
            <!-- Publish context that indicates that alarm is active -->
            <publishContext define='true'>
                <contextRef source='Feature' type='SilenceRingingTone.Active' value='true'/>
            </publishContext>
        </actions>
    </elseIf>

    <!-- deactivate silence ringing tone feature and orientation sensor channel-->
    <elseIf>
        <or>
            <!-- call was connected -->
            <contextChanged>
                <contextRef source='Call' type='State' value='Connected'/>
            </contextChanged>
            <!-- call was disconnected -->
            <contextChanged>
                <contextRef source='Call' type='State' value='Disconnected'/>
            </contextChanged>
            <contextChanged>
                <contextRef source='Call' type='State' value='Disconnecting'/>
            </contextChanged>
        </or>
        <actions>
            <!-- Deactivate orientation channel (0x01) from sensor source (0x10282DF0) -->
            <sourceCommand uid='0x10282DF0'>
                <sensorCommand channelId='0x01' id='deactivate'/>
            </sourceCommand>
            <!-- Publish context that indicates that alarm is active -->
            <publishContext define='true'>
                <contextRef source='Feature' type='SilenceRingingTone.Active' value='false'/>
            </publishContext>
        </actions>
    </elseIf>
</script>