| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
| 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 16 * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE | 16 * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE |
| 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 23 * DAMAGE. | 23 * DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannel | 26 // https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate |
| 27 |
| 28 enum RTCDataChannelState { |
| 29 "connecting", |
| 30 "open", |
| 31 "closing", |
| 32 "closed" |
| 33 }; |
| 34 |
| 35 // https://w3c.github.io/webrtc-pc/#rtcdatachannel |
| 27 | 36 |
| 28 [ | 37 [ |
| 29 ActiveScriptWrappable, | 38 ActiveScriptWrappable, |
| 30 DependentLifetime, | 39 DependentLifetime, |
| 31 NoInterfaceObject, | 40 NoInterfaceObject, |
| 32 ] interface RTCDataChannel : EventTarget { | 41 ] interface RTCDataChannel : EventTarget { |
| 33 readonly attribute DOMString label; | 42 readonly attribute USVString label; |
| 34 readonly attribute boolean reliable; // DEPRECATED | |
| 35 readonly attribute boolean ordered; | 43 readonly attribute boolean ordered; |
| 36 readonly attribute unsigned short maxRetransmitTime; | 44 // TODO(foolip): |maxRetransmitTime| is called |maxPacketLifeTime| in the |
| 37 readonly attribute unsigned short maxRetransmits; | 45 // spec and both it and |maxRetransmits| are nullable. |
| 38 readonly attribute DOMString protocol; | 46 [Measure] readonly attribute unsigned short maxRetransmitTime; |
| 47 [Measure] readonly attribute unsigned short maxRetransmits; |
| 48 readonly attribute USVString protocol; |
| 39 readonly attribute boolean negotiated; | 49 readonly attribute boolean negotiated; |
| 40 readonly attribute unsigned short id; | 50 readonly attribute unsigned short id; |
| 41 readonly attribute DOMString readyState; | 51 readonly attribute RTCDataChannelState readyState; |
| 42 readonly attribute unsigned long bufferedAmount; | 52 readonly attribute unsigned long bufferedAmount; |
| 43 attribute unsigned long bufferedAmountLowThreshold; | 53 attribute unsigned long bufferedAmountLowThreshold; |
| 44 attribute EventHandler onopen; | 54 attribute EventHandler onopen; |
| 45 attribute EventHandler onbufferedamountlow; | 55 attribute EventHandler onbufferedamountlow; |
| 46 attribute EventHandler onerror; | 56 attribute EventHandler onerror; |
| 47 attribute EventHandler onclose; | 57 attribute EventHandler onclose; |
| 48 void close(); | 58 void close(); |
| 49 attribute EventHandler onmessage; | 59 attribute EventHandler onmessage; |
| 50 [RaisesException=Setter] attribute DOMString binaryType; | 60 [RaisesException=Setter] attribute DOMString binaryType; |
| 61 // TODO(foolip): |data| should be USVString. |
| 51 [RaisesException] void send(DOMString data); | 62 [RaisesException] void send(DOMString data); |
| 52 [RaisesException] void send(Blob data); | 63 [RaisesException] void send(Blob data); |
| 53 [RaisesException] void send(ArrayBuffer data); | 64 [RaisesException] void send(ArrayBuffer data); |
| 54 [RaisesException] void send(ArrayBufferView data); | 65 [RaisesException] void send(ArrayBufferView data); |
| 66 |
| 67 // Non-standard APIs |
| 68 [Measure] readonly attribute boolean reliable; |
| 55 }; | 69 }; |
| OLD | NEW |