Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #58 from cdumez/requirements_section
Browse files Browse the repository at this point in the history
Add a requirements section to the specification (closes #3, #7, #13, #14)
  • Loading branch information
marcoscaceres committed Apr 4, 2014
2 parents b6c5027 + 25c8505 commit b016ea7
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 22 deletions.
56 changes: 40 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,23 @@ <h2 class="no-num no-toc" id="toc">
<li><a href="#terminology"><span class="secno">3 </span>
Terminology
</a></li>
<li><a href="#task-scheduler-api"><span class="secno">4 </span>
<li><a href="#requirements"><span class="secno">4 </span>
Requirements
</a></li>
<li><a href="#task-scheduler-api"><span class="secno">5 </span>
Task Scheduler API
</a>
<ol class="toc">
<li><a href="#interface-navigator"><span class="secno">4.1 </span>
<li><a href="#interface-navigator"><span class="secno">5.1 </span>
Interface <code title="">Navigator</code>
</a></li>
<li><a href="#interface-taskscheduler"><span class="secno">4.2 </span>
<li><a href="#interface-taskscheduler"><span class="secno">5.2 </span>
Interface <code title="">TaskScheduler</code>
</a></li>
<li><a href="#interface-scheduledtask"><span class="secno">4.3 </span>
<li><a href="#interface-scheduledtask"><span class="secno">5.3 </span>
<span>Interface <code title="">ScheduledTask</code></span>
</a></li>
<li><a href="#the-task-system-message"><span class="secno">4.4 </span>
<li><a href="#the-task-system-message"><span class="secno">5.4 </span>
The <code title="task-system-message">task</code> system message
</a></ol></li>
<li><a class="no-num" href="#references">
Expand Down Expand Up @@ -239,7 +242,32 @@ <h2 id="terminology"><span class="secno">3 </span>
The term <dfn id="system-message"><a href="http://www.w3.org/TR/runtime/#system-messages">system message</a></dfn> is defined in
<a href="#refsRUNTIME">[RUNTIME]</a>.
</p>
<h2 id="task-scheduler-api"><span class="secno">4 </span>
<h2 id="requirements"><span class="secno">4 </span>
Requirements
</h2>
<p>
Below is a summary of requirements associated with this API:
</p>
<ol>
<li>An application <em class="ct">must</em> only be able to access its own scheduled tasks.
</li>
<li>A scheduled task identifier <em class="ct">must</em> be unique within the application origin.
</li>
<li>A scheduled task <em class="ct">must</em> automatically be restored upon system restart.
</li>
<li>A scheduled task <em class="ct">must</em> actively wake the system if the scheduled time is reached while sleeping.
</li>
<li>A scheduled task that was supposed to trigger when the system was off <em class="ct">must</em> be executed
immediately after the system's next start up.
</li>
<li>A scheduled task <em class="ct">must</em> trigger immediately if the system's clock jumps past the task's scheduled
time.
</li>
<li>A scheduled task and its associated data <em class="ct">must</em> be removed when the application that scheduled it
is uninstalled.
</li>
</ol>
<h2 id="task-scheduler-api"><span class="secno">5 </span>
Task Scheduler API
</h2>
<p>
Expand All @@ -251,22 +279,18 @@ <h2 id="task-scheduler-api"><span class="secno">4 </span>
<ul>
<li>Web applications can schedule multiple tasks and get a returned ID for each of them.
</li>
<li>The returned ID is unique (within the application origin) and can be used to specify and remove the scheduled task.
<li>Each <code><a href="#scheduledtask">ScheduledTask</a></code> has a unique identifier that can be used to specify and remove the scheduled task.
</li>
<li>Web applications can pass a <a href="#json-serializable-object">JSON-serializable object</a> to describe more details about each task setting.
</li>
<li>Web applications can only access their own scheduled tasks.
</li>
<li>When a scheduled time is reached, an <code title="task-system-message"><a href="#the-task-system-message">task</a></code> <code><a href="#system-message">system message</a></code> is
sent to the application.
</li>
<li>All the tasks that have been scheduled are automatically restored after rebooting the system.
</li>
<li>ScheduledTask API actually does more than <code>setTimeout()</code> because it can actively <em>wake</em> the
system from sleeping.
system from sleeping and scheduled task are not lost when closing the application or restarting the system.
</li>
</ul>
<h3 id="interface-navigator"><span class="secno">4.1 </span>
<h3 id="interface-navigator"><span class="secno">5.1 </span>
Interface <code title="">Navigator</code>
</h3>
<pre class="idl">partial interface Navigator {
Expand All @@ -277,7 +301,7 @@ <h3 id="interface-navigator"><span class="secno">4.1 </span>
The <dfn id="navigator-taskscheduler" title="Navigator-taskScheduler"><code>taskScheduler</code></dfn> attribute provides the developer access to a
<code><a href="#taskscheduler">TaskScheduler</a></code>.
</p>
<h3 id="interface-taskscheduler"><span class="secno">4.2 </span>
<h3 id="interface-taskscheduler"><span class="secno">5.2 </span>
Interface <code title="">TaskScheduler</code>
</h3>
<p>
Expand Down Expand Up @@ -413,7 +437,7 @@ <h3 id="interface-taskscheduler"><span class="secno">4.2 </span>
</ol>
</li>
</ol>
<h3 id="interface-scheduledtask"><span class="secno">4.3 </span>
<h3 id="interface-scheduledtask"><span class="secno">5.3 </span>
<span>Interface <code title="">ScheduledTask</code></span>
</h3>
<p>
Expand All @@ -438,7 +462,7 @@ <h3 id="interface-scheduledtask"><span class="secno">4.3 </span>
The <dfn id="scheduledtask-data" title="ScheduledTask-data"><code>data</code></dfn> attribute optionally represents the <span>JSON-serializable
data</span> associated with the task.
</p>
<h3 id="the-task-system-message"><span class="secno">4.4 </span>
<h3 id="the-task-system-message"><span class="secno">5.4 </span>
The <dfn title="task-system-message"><code title="task-system-message">task</code></dfn> system message
</h3>
<p>
Expand Down
33 changes: 27 additions & 6 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,31 @@ <h2 id="terminology">
The term <dfn><a href="http://www.w3.org/TR/runtime/#system-messages">system message</a></dfn> is defined in
<span data-anolis-ref="">RUNTIME</span>.
</p>
<h2 id="requirements">
Requirements
</h2>
<p>
Below is a summary of requirements associated with this API:
</p>
<ol>
<li>An application <em class="ct">must</em> only be able to access its own scheduled tasks.
</li>
<li>A scheduled task identifier <em class="ct">must</em> be unique within the application origin.
</li>
<li>A scheduled task <em class="ct">must</em> automatically be restored upon system restart.
</li>
<li>A scheduled task <em class="ct">must</em> actively wake the system if the scheduled time is reached while sleeping.
</li>
<li>A scheduled task that was supposed to trigger when the system was off <em class="ct">must</em> be executed
immediately after the system's next start up.
</li>
<li>A scheduled task <em class="ct">must</em> trigger immediately if the system's clock jumps past the task's scheduled
time.
</li>
<li>A scheduled task and its associated data <em class="ct">must</em> be removed when the application that scheduled it
is uninstalled.
</li>
</ol>
<h2>
Task Scheduler API
</h2>
Expand All @@ -224,19 +249,15 @@ <h2>
<ul>
<li>Web applications can schedule multiple tasks and get a returned ID for each of them.
</li>
<li>The returned ID is unique (within the application origin) and can be used to specify and remove the scheduled task.
<li>Each <code>ScheduledTask</code> has a unique identifier that can be used to specify and remove the scheduled task.
</li>
<li>Web applications can pass a <span>JSON-serializable object</span> to describe more details about each task setting.
</li>
<li>Web applications can only access their own scheduled tasks.
</li>
<li>When a scheduled time is reached, an <code title="task-system-message">task</code> <code>system message</code> is
sent to the application.
</li>
<li>All the tasks that have been scheduled are automatically restored after rebooting the system.
</li>
<li>ScheduledTask API actually does more than <code>setTimeout()</code> because it can actively <em>wake</em> the
system from sleeping.
system from sleeping and scheduled task are not lost when closing the application or restarting the system.
</li>
</ul>
<h3>
Expand Down

0 comments on commit b016ea7

Please sign in to comment.