</pre></li>
<li>Define the event ("at 10 PM every day").
-<p>A <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_ON_TIME</span> type event entry is created, and a key-value comparison of <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY == 22</span> is set to the event.
+<p>A <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_TIME</span> type event entry is created, and a key-value comparison of <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY == 1320</span> is set to the event.
</p>
<pre class="prettyprint">
// Composing an event
context_trigger_rule_entry_h event = NULL;
-context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_ON_TIME, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &event);
+context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_TIME, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &event);
context_trigger_rule_entry_add_key(event, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_TIME_OF_DAY);
-context_trigger_rule_entry_add_comparison_int(event, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_EQUAL_TO, 22);
+context_trigger_rule_entry_add_comparison_int(event, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_EQUAL_TO, 1320);
// Adding the event to the rule and releasing the resources
context_trigger_rule_add_entry(rule, event);
<th>Valid operands</th>
</tr>
<tr>
- <td rowspan="2"><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_ON_TIME</span></td>
+ <td rowspan="2"><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_TIME</span></td>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY</span></td>
<td>Integer</td>
- <td>From 0 to 23 (hour)</td>
+ <td>From 0 to 1439 (minute)</td>
</tr>
<tr>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_DAY_OF_WEEK</span></td>
</span></td>
</tr>
<tr>
- <td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_TIME_OF_DAY</span></td>
+ <td rowspan="3"><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_TIME</span></td>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY</span></td>
<td>Integer</td>
<td>From 0 to 1439 (minute)</td>
</tr>
<tr>
- <td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_DAY_OF_WEEK</span></td>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_DAY_OF_WEEK</span></td>
<td>String</td>
<td><span style="font-family: Courier New,Courier,monospace">
</span></td>
</tr>
<tr>
- <td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_DAY_OF_MONTH</span></td>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_DAY_OF_MONTH</span></td>
<td>Integer</td>
<td>From 1 to 31</td>
</tr>
<tr>
<td>
- <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_FLIGHT_MODE</span>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_POWER_SAVING_MODE</span></p>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_SILENT_MODE</span></p>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_VIBRATION_MODE</span></p>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_FLIGHT_MODE</span></p>
+ <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_POWER_SAVING_MODE</span>
<p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_POWER_SAVING_MODE</span></p>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_SILENT_MODE</span></p>
- <p><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_CONDITION_VIBRATION_MODE</span></p>
</td>
<td><span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_IS_ENABLED</span></td>
<td>Integer</td>
<li>Combining attributes into an event or condition
-<p>Some event and condition items provide multiple attributes. The logical connection between attributes must be set properly to fulfill the requirement. For example, when you use <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_ON_TIME</span> to define a rule "at 4 PM every Monday", the comparisons regarding the 2 attributes, <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY</span> and <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_DAY_OF_WEEK</span> must be satisfied together.</p>
+<p>Some event and condition items provide multiple attributes. The logical connection between attributes must be set properly to fulfill the requirement. For example, when you use <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_EVENT_TIME</span> to define a rule "at 4 PM every Monday", the comparisons regarding the 2 attributes, <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TIME_OF_DAY</span> and <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_DAY_OF_WEEK</span> must be satisfied together.</p>
<p>On the contrary, using <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_APP_USE_FREQUENCY</span>, if you want to check whether a specific application belongs to the 5 most frequently used applications, or the application was used at least 10 times, both comparisons against <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_RANK</span> and <span style="font-family: Courier New,Courier,monospace">CONTEXT_TRIGGER_TOTAL_COUNT</span> must be connected by a logical disjunction.</p>
<p>The following example illustrates the cases described above:</p>
<pre class="prettyprint">
// Composing an event "at 4 PM every Monday"
context_trigger_rule_entry_h time_event;
-context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_ON_TIME, <span class="highlight">CONTEXT_TRIGGER_LOGICAL_CONJUNCTION</span>, &time_event);
+context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_TIME, <span class="highlight">CONTEXT_TRIGGER_LOGICAL_CONJUNCTION</span>, &time_event);
context_trigger_rule_entry_add_key(time_event, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_TIME_OF_DAY);
-context_trigger_rule_entry_add_comparison_int(time_event, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_EQUAL_TO, 16);
+context_trigger_rule_entry_add_comparison_int(time_event, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_EQUAL_TO, 960);
context_trigger_rule_entry_add_key(time_event, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_DAY_OF_WEEK);
context_trigger_rule_entry_add_comparison_string(time_event, CONTEXT_TRIGGER_DAY_OF_WEEK, CONTEXT_TRIGGER_EQUAL_TO, CONTEXT_TRIGGER_MON);
// Composing a condition "if the current time is between 18:30 and 21:30"
context_trigger_rule_entry_h time_condition;
-context_trigger_rule_condition_create(CONTEXT_TRIGGER_CONDITION_TIME_OF_DAY, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &time_condition);
+context_trigger_rule_condition_create(CONTEXT_TRIGGER_CONDITION_TIME, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &time_condition);
context_trigger_rule_entry_add_key(time_condition, <span class="highlight">CONTEXT_TRIGGER_LOGICAL_CONJUNCTION</span>, CONTEXT_TRIGGER_TIME_OF_DAY);
context_trigger_rule_entry_add_comparison_int(time_condition, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_GREATER_THAN_OR_EQUAL_TO, 1110);
context_trigger_rule_entry_add_comparison_int(time_condition, CONTEXT_TRIGGER_TIME_OF_DAY, CONTEXT_TRIGGER_LESS_THAN_OR_EQUAL_TO, 1290);