A few naming changes to MIDI API per issue #17724
authorJussi Kalliokoski <jussi.kalliokoski@gmail.com>
Sun, 12 Aug 2012 17:43:35 +0300
changeset 112 df28ddef0c73
parent 111 b5e6a31b0b75
child 113 8a31db30feb2
A few naming changes to MIDI API per issue #17724

* MIDIDevice -> MIDIPort
* MIDIInputDevice -> MIDIInput
* MIDIOutputDevice -> MIDIOutput
midi/specification.html
--- a/midi/specification.html	Fri Aug 10 13:29:08 2012 -0400
+++ b/midi/specification.html	Sun Aug 12 17:43:35 2012 +0300
@@ -319,20 +319,20 @@
       <dl title="[NoInterfaceObject]
                  interface MIDIAccess"
           class="idl">
-        <dt>sequence&lt;MIDIDevice&gt; enumerateInputs()</dt>
+        <dt>sequence&lt;MIDIPort&gt; enumerateInputs()</dt>
         <dd>
           Returns a list of the MIDI input devices available on the system.
 <!-- TODO: Specify the steps the UA is required to take. -->
         </dd>
-        <dt>sequence&lt;MIDIDevice&gt; enumerateOutputs()</dt>
+        <dt>sequence&lt;MIDIPort&gt; enumerateOutputs()</dt>
         <dd>
           Returns a list of the MIDI output devices available on the system.
 <!-- TODO: Specify the steps the UA is required to take. -->
         </dd>
-        <dt><a>MIDIInputDevice</a> getInput(MIDIDevice or DOMString target)</dt>
+        <dt><a>MIDIInput</a> getInput(MIDIPort or DOMString target)</dt>
         <dd>
-          Acquires access to the input <code><a>MIDIDevice</a></code> requested
-          as a <code><a>MIDIInputDevice</a></code> instance. 
+          Acquires access to the input <code><a>MIDIPort</a></code> requested
+          as a <code><a>MIDIInput</a></code> instance. 
 
           <p>
             When the
@@ -343,17 +343,17 @@
           <ol>
             <li>
               <p>Let <var>target</var> be the
-              <code><a>MIDIDevice</a></code> argument.
+              <code><a>MIDIPort</a></code> argument.
               If the <var>target</var> is a DOMString,
-              <var>target</var> will be a <code><a>MIDIDevice</a></code>
+              <var>target</var> will be a <code><a>MIDIPort</a></code>
               whose <code>deviceFingerprint</code> matches the supplied
               DOMString.
             </li>
 
             <li>
               <p>
-                If <var>target</var> is not a <code><a>MIDIDevice</a></code>
-                instance, or if the MIDIDevice is not a valid MIDI input
+                If <var>target</var> is not a <code><a>MIDIPort</a></code>
+                instance, or if the MIDIPort is not a valid MIDI input
                 device, throw a <code>TYPE_ERROR</code> exception.
               </p>
             </li>
@@ -374,16 +374,16 @@
 
             <li>
               <p>
-                Return a <code>MIDIInputDevice</code> corresponding the
+                Return a <code>MIDIInput</code> corresponding the
                 <var>target</var> argument.
               </p>
             </li>
           </ol>
         </dd>
-        <dt><a>MIDIOutputDevice</a> getOutput(MIDIDevice or DOMString target)</dt>
+        <dt><a>MIDIOutput</a> getOutput(MIDIPort or DOMString target)</dt>
         <dd>
-          Acquires access to the output <code><a>MIDIDevice</a></code> requested
-          as a <code><a>MIDIOutputDevice</a></code> instance. 
+          Acquires access to the output <code><a>MIDIPort</a></code> requested
+          as a <code><a>MIDIOutput</a></code> instance. 
 
           <p>
             When the
@@ -394,17 +394,17 @@
           <ol>
             <li>
               <p>Let <var>target</var> be the
-              <code><a>MIDIDevice</a></code> argument.
+              <code><a>MIDIPort</a></code> argument.
               If the <var>target</var> is a DOMString,
-              <var>target</var> will be a <code><a>MIDIDevice</a></code>
+              <var>target</var> will be a <code><a>MIDIPort</a></code>
               whose <code>deviceFingerprint</code> matches the supplied
               DOMString.
             </li>
 
             <li>
               <p>
-                If <var>target</var> is not a <code><a>MIDIDevice</a></code>
-                instance, or if the MIDIDevice is not a valid MIDI output
+                If <var>target</var> is not a <code><a>MIDIPort</a></code>
+                instance, or if the MIDIPort is not a valid MIDI output
                 device, throw a <code>TYPE_ERROR</code> exception.
               </p>
             </li>
@@ -425,7 +425,7 @@
 
             <li>
               <p>
-                Return a <code>MIDIOutputDevice</code> corresponding the
+                Return a <code>MIDIOutput</code> corresponding the
                 <var>target</var> argument.
               </p>
             </li>
@@ -492,11 +492,11 @@
     </section>
 
     <section>
-      <h2><a>MIDIDevice</a> Interface</h2>
+      <h2><a>MIDIPort</a> Interface</h2>
 
       <p id="event-mididevice-devicedisconnect">
         Whenever the MIDI device corresponding the
-        <code><a>MIDIDevice</a></code> is disconnected or becomes unavailable,
+        <code><a>MIDIPort</a></code> is disconnected or becomes unavailable,
         the UA SHOULD run the following steps:
       </p>
 
@@ -512,7 +512,7 @@
 
       <p id="event-mididevice-deviceconnect">
         Whenever the MIDI device corresponding the
-        <code><a>MIDIDevice</a></code> is connected or reconnected,
+        <code><a>MIDIPort</a></code> is connected or reconnected,
         the UA MUST run the following steps:
       </p>
 
@@ -526,30 +526,30 @@
         </li>
       </ol>
 
-      <dl class="idl" title='enum MIDIDeviceType'>
+      <dl class="idl" title='enum MIDIPortType'>
         <dt>"input"</dt>
         <dd>
-          If a MIDIDevice is an input device, this MUST be this value.
+          If a MIDIPort is an input device, this MUST be this value.
         </dd>
         <dt>"output"</dt>
         <dd>
-          If a MIDIDevice is an output device, this MUST be this value.
+          If a MIDIPort is an output device, this MUST be this value.
         </dd>
       </dl>
 
-      <div class="idl" title="MIDIInputDevice implements MIDIDevice"></div>
-      <div class="idl" title="MIDIOutputDevice implements MIDIDevice"></div>
+      <div class="idl" title="MIDIInput implements MIDIPort"></div>
+      <div class="idl" title="MIDIOutput implements MIDIPort"></div>
       <dl title="[NoInterfaceObject]
-                 interface MIDIDevice : EventTarget"
+                 interface MIDIPort : EventTarget"
           class="idl">
-        <dt>readonly attribute MIDIDeviceType deviceType</dt>
+        <dt>readonly attribute MIDIPortType deviceType</dt>
         <dd>
           <p>
             A descriptor property to distinguish whether the device is an
             input or an output device.
-            For <code><a>MIDIOutputDevice</a></code>,
+            For <code><a>MIDIOutput</a></code>,
             this MUST be <code>"output"</code>.
-            For <code><a>MIDIInputDevice</a></code>,
+            For <code><a>MIDIInput</a></code>,
             this MUST be <code>"input"</code>.
           </p>
         </dd>
@@ -582,7 +582,7 @@
               This event handler, of type <code><a href=
               "#event-mididevice-devicedisconnect">devicedisconnect</a></code>,
               SHOULD be supported by all objects implementing the
-              <code><a>MIDIDevice</a></code> interface.
+              <code><a>MIDIPort</a></code> interface.
             </p>
         </dd>
         <dt class="no-docs">[TreatNonCallableAsNull] attribute
@@ -592,7 +592,7 @@
               This event handler, of type <code><a href=
               "#event-mididevice-deviceconnect">deviceconnect</a></code>,
               SHOULD be supported by all objects implementing the
-              <code><a>MIDIDevice</a></code> interface.
+              <code><a>MIDIPort</a></code> interface.
             </p>
         </dd>
       </dl>
@@ -609,18 +609,18 @@
       </div>
 
       <section>
-        <h3><a>MIDIInputDevice</a> Interface</h3>
+        <h3><a>MIDIInput</a> Interface</h3>
 
         <p id="event-midiinputdevice-midimessage">
           Whenever the MIDI device corresponding the
-          <code><a>MIDIInputDevice</a></code> sends a MIDI message, the UA MUST
+          <code><a>MIDIInput</a></code> sends a MIDI message, the UA MUST
           run the following steps:
         </p>
 
         <ol>
           <li>
             <p>
-              Let <code>device</code> be the <code><a>MIDIInputDevice</a></code>.
+              Let <code>device</code> be the <code><a>MIDIInput</a></code>.
             </p>
           </li>
 
@@ -650,7 +650,7 @@
         </ol>
 
         <dl title="[NoInterfaceObject]
-                   interface MIDIInputDevice implements EventTarget"
+                   interface MIDIInput implements EventTarget"
             class="idl">
           <dt class="no-docs">[TreatNonCallableAsNull] attribute
                               Function? onmidimessage</dt>
@@ -659,16 +659,16 @@
               This event handler, of type <code><a href=
               "#event-midiinputdevice-midimessage">midimessage</a></code>,
               MUST be supported by all objects implementing
-              <code><a>MIDIInputDevice</a></code> interface.
+              <code><a>MIDIInput</a></code> interface.
             </p>
           </dd>
         </dl>
       </section>
 
       <section>
-        <h3><a>MIDIOutputDevice</a> Interface</h3>
+        <h3><a>MIDIOutput</a> Interface</h3>
         <dl title="[NoInterfaceObject]
-                   interface MIDIOutputDevice"
+                   interface MIDIOutput"
             class="idl">
           <dt>boolean sendMIDIMessage(MIDIMessage message)</dt>
           <dd>