|
1 <script xmlns="http://www.nokia.com/ns/cep/script/1.0/" xmlns:cep="http://www.nokia.com/ns/cep/1.0/"> |
|
2 <!-- Do nothing if the following pre-conditions do not match --> |
|
3 <if> |
|
4 <or> |
|
5 <!-- sensor settings are disabled --> |
|
6 <notEqual> |
|
7 <contextRef source='Sensor' type='Setting.Active' value='On'/> |
|
8 </notEqual> |
|
9 <!-- silence ringing tone turning interaction is disabled --> |
|
10 <notEqual> |
|
11 <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceCalls' value='On'/> |
|
12 </notEqual> |
|
13 </or> |
|
14 <actions> |
|
15 <!-- do nothing --> |
|
16 </actions> |
|
17 </if> |
|
18 |
|
19 <!-- activate silence ringing tone feature and orientation sensor channel--> |
|
20 <elseIf> |
|
21 <!-- call ringing --> |
|
22 <contextChanged> |
|
23 <contextRef source='Call' type='State' value='Ringing'/> |
|
24 </contextChanged> |
|
25 <actions> |
|
26 <!-- Activate orientation channel (0x01) from sensor source (0x10282DF0) --> |
|
27 <sourceCommand uid='0x10282DF0'> |
|
28 <sensorCommand channelId='0x01' id='activate'/> |
|
29 </sourceCommand> |
|
30 <!-- Publish context that indicates that alarm is active --> |
|
31 <publishContext define='true'> |
|
32 <contextRef source='Feature' type='SilenceRingingTone.Active' value='true'/> |
|
33 </publishContext> |
|
34 </actions> |
|
35 </elseIf> |
|
36 |
|
37 <!-- deactivate silence ringing tone feature and orientation sensor channel--> |
|
38 <elseIf> |
|
39 <or> |
|
40 <!-- call was connected --> |
|
41 <contextChanged> |
|
42 <contextRef source='Call' type='State' value='Connected'/> |
|
43 </contextChanged> |
|
44 <!-- call was disconnected --> |
|
45 <contextChanged> |
|
46 <contextRef source='Call' type='State' value='Disconnected'/> |
|
47 </contextChanged> |
|
48 <contextChanged> |
|
49 <contextRef source='Call' type='State' value='Disconnecting'/> |
|
50 </contextChanged> |
|
51 </or> |
|
52 <actions> |
|
53 <!-- Deactivate orientation channel (0x01) from sensor source (0x10282DF0) --> |
|
54 <sourceCommand uid='0x10282DF0'> |
|
55 <sensorCommand channelId='0x01' id='deactivate'/> |
|
56 </sourceCommand> |
|
57 <!-- Publish context that indicates that alarm is active --> |
|
58 <publishContext define='true'> |
|
59 <contextRef source='Feature' type='SilenceRingingTone.Active' value='false'/> |
|
60 </publishContext> |
|
61 </actions> |
|
62 </elseIf> |
|
63 </script> |