Add FIXMEs to update WebRTC
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 16:49:13 +0000 (16:49 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 16:49:13 +0000 (16:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169735

Reviewed by Youenn Fablet.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h: Add RTCIceTransport.

Source/WebCore:

Rearrange order of methods and properties based on the 13 March 2017
version of the WebRTC spec.

* CMakeLists.txt: Add RTCIceTransport and RTCIceTransportState.
* DerivedSources.make:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCDataChannelEvent.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCIceCandidateEvent.idl:
* Modules/mediastream/RTCIceServer.idl:
* Modules/mediastream/RTCIceTransport.cpp: Added.
* Modules/mediastream/RTCIceTransport.idl: Added.
* Modules/mediastream/RTCIceTransport.h: Minor update to rename state to transportState.
(WebCore::RTCIceTransport::state):
(WebCore::RTCIceTransport::setState):
(WebCore::RTCIceTransport::transportState): Deleted.
(WebCore::RTCIceTransport::setTransportState): Deleted.
* Modules/mediastream/RTCIceTransportState.h: Added.
* Modules/mediastream/RTCIceTransportState.idl: Added.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/RTCRtpTransceiver.idl:
* Modules/mediastream/RTCStatsReport.idl:
* WebCore.xcodeproj/project.pbxproj:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::iceTransportStateChanged): Refactor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCDTMFSender.idl
Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.idl
Source/WebCore/Modules/mediastream/RTCDataChannelEvent.idl
Source/WebCore/Modules/mediastream/RTCIceCandidate.idl
Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.idl
Source/WebCore/Modules/mediastream/RTCIceServer.idl
Source/WebCore/Modules/mediastream/RTCIceTransport.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceTransport.h
Source/WebCore/Modules/mediastream/RTCIceTransport.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceTransportState.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceTransportState.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl
Source/WebCore/Modules/mediastream/RTCRtpSender.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl
Source/WebCore/Modules/mediastream/RTCStatsReport.idl
Source/WebCore/WebCore.xcodeproj/project.pbxproj

index ca93ec2..b464c21 100644 (file)
@@ -1,3 +1,12 @@
+2017-03-16  Jon Lee  <jonlee@apple.com>
+
+        Add FIXMEs to update WebRTC
+        https://bugs.webkit.org/show_bug.cgi?id=169735
+
+        Reviewed by Youenn Fablet.
+
+        * runtime/CommonIdentifiers.h: Add RTCIceTransport.
+
 2017-03-16  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Unreviewed, copy m_numberOfArgumentsToSkip
index 454798a..c08c128 100644 (file)
     macro(Request) \
     macro(RTCDTMFToneChangeEvent) \
     macro(RTCIceCandidate) \
+    macro(RTCIceTransport) \
     macro(RTCPeerConnection) \
     macro(RTCRtpReceiver) \
     macro(RTCRtpSender) \
index 51d71a3..3d2cf48 100644 (file)
@@ -244,6 +244,8 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/mediastream/RTCIceConnectionState.idl
     Modules/mediastream/RTCIceGatheringState.idl
     Modules/mediastream/RTCIceServer.idl
+    Modules/mediastream/RTCIceTransport.idl
+    Modules/mediastream/RTCIceTransportState.idl
     Modules/mediastream/RTCOfferAnswerOptions.idl
     Modules/mediastream/RTCOfferOptions.idl
     Modules/mediastream/RTCPeerConnection.idl
index 457d8fc..4ae6ec1 100644 (file)
@@ -1,3 +1,40 @@
+2017-03-16  Jon Lee  <jonlee@apple.com>
+
+        Add FIXMEs to update WebRTC
+        https://bugs.webkit.org/show_bug.cgi?id=169735
+
+        Reviewed by Youenn Fablet.
+
+        Rearrange order of methods and properties based on the 13 March 2017
+        version of the WebRTC spec.
+
+        * CMakeLists.txt: Add RTCIceTransport and RTCIceTransportState.
+        * DerivedSources.make:
+        * Modules/mediastream/RTCDTMFSender.idl:
+        * Modules/mediastream/RTCDTMFToneChangeEvent.idl:
+        * Modules/mediastream/RTCDataChannelEvent.idl:
+        * Modules/mediastream/RTCIceCandidate.idl:
+        * Modules/mediastream/RTCIceCandidateEvent.idl:
+        * Modules/mediastream/RTCIceServer.idl:
+        * Modules/mediastream/RTCIceTransport.cpp: Added.
+        * Modules/mediastream/RTCIceTransport.idl: Added.
+        * Modules/mediastream/RTCIceTransport.h: Minor update to rename state to transportState.
+        (WebCore::RTCIceTransport::state):
+        (WebCore::RTCIceTransport::setState):
+        (WebCore::RTCIceTransport::transportState): Deleted.
+        (WebCore::RTCIceTransport::setTransportState): Deleted.
+        * Modules/mediastream/RTCIceTransportState.h: Added.
+        * Modules/mediastream/RTCIceTransportState.idl: Added.
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/mediastream/RTCRtpReceiver.idl:
+        * Modules/mediastream/RTCRtpSender.idl:
+        * Modules/mediastream/RTCRtpTransceiver.idl:
+        * Modules/mediastream/RTCStatsReport.idl:
+        * WebCore.xcodeproj/project.pbxproj:
+        * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+        (WebCore::MediaEndpointPeerConnection::iceTransportStateChanged): Refactor.
+
 2017-03-16  Youenn Fablet  <youenn@apple.com>
 
         Improve WebRTC track enabled support
index 4ab640d..fc4fe73 100644 (file)
@@ -188,6 +188,8 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/mediastream/RTCIceConnectionState.idl \
     $(WebCore)/Modules/mediastream/RTCIceGatheringState.idl \
     $(WebCore)/Modules/mediastream/RTCIceServer.idl \
+    $(WebCore)/Modules/mediastream/RTCIceTransport.idl \
+    $(WebCore)/Modules/mediastream/RTCIceTransportState.idl \
     $(WebCore)/Modules/mediastream/RTCOfferAnswerOptions.idl \
     $(WebCore)/Modules/mediastream/RTCOfferOptions.idl \
     $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
index fba38cb..c9c216c 100644 (file)
@@ -873,12 +873,12 @@ void MediaEndpointPeerConnection::iceTransportStateChanged(const String& mid, RT
     ASSERT(transceiver);
 
     RTCIceTransportState transportState = static_cast<RTCIceTransportState>(mediaEndpointIceTransportState);
-    transceiver->iceTransport().setTransportState(transportState);
+    transceiver->iceTransport().setState(transportState);
 
     // Determine if the script needs to be notified.
     Vector<RTCIceTransportState> transportStates;
     for (auto& transceiver : m_peerConnection.getTransceivers())
-        transportStates.append(transceiver->iceTransport().transportState());
+        transportStates.append(transceiver->iceTransport().state());
 
     RTCIceTransportState derivedState = deriveAggregatedIceConnectionState(transportStates);
     m_peerConnection.updateIceConnectionState(static_cast<RTCIceConnectionState>(derivedState));
index fea23bd..e4ee4f8 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 [
     ActiveDOMObject,
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
     NoInterfaceObject,
 ] interface RTCDTMFSender : EventTarget {
+    // FIXME 169662: change to unsigned long with defaults
+    [MayThrowException] void insertDTMF(DOMString tones, optional long duration, optional long interToneGap);
+    attribute EventHandler ontonechange;
+    readonly attribute DOMString toneBuffer;
+
+    // Legacy
+    // FIXME 169662: remove
     readonly attribute boolean canInsertDTMF;
+    // FIXME 169662: remove
     readonly attribute MediaStreamTrack track;
-    readonly attribute DOMString toneBuffer;
+    // FIXME 169662: remove
     readonly attribute long duration;
+    // FIXME 169662: remove
     readonly attribute long interToneGap;
-
-    [MayThrowException] void insertDTMF(DOMString tones, optional long duration, optional long interToneGap);
-
-    attribute EventHandler ontonechange;
 };
index 722df3c..a70eebf 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -31,6 +32,9 @@
     readonly attribute DOMString tone;
 };
 
-dictionary RTCDTMFToneChangeEventInit : EventInit {
-    DOMString tone = "";
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
+] dictionary RTCDTMFToneChangeEventInit : EventInit {
+    required DOMString tone;
 };
index 1dc11f9..3debbc9 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// FIXME 169662: missing Constructor(DOMString type, RTCDataChannelEventInit eventInitDict)
 [
     NoInterfaceObject,
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
 ] interface RTCDataChannelEvent : Event {
     readonly attribute RTCDataChannel channel;
 };
index 49c74e1..79ef139 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
     readonly attribute DOMString candidate;
     readonly attribute DOMString? sdpMid;
     readonly attribute unsigned short? sdpMLineIndex;
+    // FIXME 169662: missing foundation
+    // FIXME 169662: missing priority
+    // FIXME 169662: missing ip
+    // FIXME 169662: missing protocol
+    // FIXME 169662: missing port
+    // FIXME 169662: missing type
+    // FIXME 169662: missing tcpType
+    // FIXME 169662: missing relatedAddress
+    // FIXME 169662: missing relatedPort
+    // FIXME 169662: missing ufrag
 
+    // FIXME 169662: add ufrag to the list
     serializer = {candidate, sdpMid, sdpMLineIndex};
 };
 
-dictionary RTCIceCandidateInit {
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
+] dictionary RTCIceCandidateInit {
+    // FIXME 169662: no longer required, with default string
     required DOMString candidate;
     DOMString? sdpMid = null;
     unsigned short? sdpMLineIndex = null;
+    // FIXME 169662: missing ufrag
 };
index ff00d5b..c7665b0 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// FIXME 169662: missing Constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict)
 [
     NoInterfaceObject,
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
 ] interface RTCIceCandidateEvent : Event {
+    // FIXME 169662: make nullable
     readonly attribute RTCIceCandidate candidate;
+    // FIXME 169662: missing url
 };
-
index b2529c6..d922187 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 [
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
     JSGenerateToJSObject,
 ] dictionary RTCIceServer {
     required (DOMString or sequence<DOMString>) urls;
     DOMString username;
     DOMString credential;
+    // FIXME 169662: missing credentialType
 };
diff --git a/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp b/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp
new file mode 100644 (file)
index 0000000..1a5006b
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RTCIceTransport.h"
index 66fda5b..81b080a 100644 (file)
@@ -48,8 +48,8 @@ public:
     }
     virtual ~RTCIceTransport() { }
 
-    RTCIceTransportState transportState() const { return m_transportState; }
-    void setTransportState(RTCIceTransportState state) { m_transportState = state; }
+    RTCIceTransportState state() const { return m_transportState; }
+    void setState(RTCIceTransportState state) { m_transportState = state; }
 
     RTCIceGatheringState gatheringState() const { return m_gatheringState; }
     void setGatheringState(RTCIceGatheringState state) { m_gatheringState = state; }
diff --git a/Source/WebCore/Modules/mediastream/RTCIceTransport.idl b/Source/WebCore/Modules/mediastream/RTCIceTransport.idl
new file mode 100644 (file)
index 0000000..5f68fc6
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+typedef RTCIceTransportState IceTransportState;
+typedef RTCIceGatheringState IceGatheringState;
+
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
+] interface RTCIceTransport {
+    // FIXME 169662: missing readonly attribute RTCIceRole role;
+    // FIXME 169662: missing readonly attribute RTCIceComponent component;
+    readonly attribute IceTransportState state;
+    // FIXME 169662: IceGathererState instead of IceGatheringState?
+    readonly attribute IceGatheringState gatheringState;
+    // FIXME 169662: missing sequence<RTCIceCandidate> getLocalCandidates();
+    // FIXME 169662: missing sequence<RTCIceCandidate> getRemoteCandidates();
+    // FIXME 169662: missing RTCIceCandidatePair? getSelectedCandidatePair();
+    // FIXME 169662: missing RTCIceParameters? getLocalParameters();
+    // FIXME 169662: missing RTCIceParameters? getRemoteParameters();
+    // FIXME 169662: missing attribute EventHandler onstatechange;
+    // FIXME 169662: missing attribute EventHandler ongatheringstatechange;
+    // FIXME 169662: missing attribute EventHandler onselectedcandidatepairchange;
+};
diff --git a/Source/WebCore/Modules/mediastream/RTCIceTransportState.h b/Source/WebCore/Modules/mediastream/RTCIceTransportState.h
new file mode 100644 (file)
index 0000000..d782702
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "PeerConnectionStates.h"
diff --git a/Source/WebCore/Modules/mediastream/RTCIceTransportState.idl b/Source/WebCore/Modules/mediastream/RTCIceTransportState.idl
new file mode 100644 (file)
index 0000000..bab9b01
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
+] enum RTCIceTransportState {
+    "new",
+    "checking",
+    "connected",
+    "completed",
+    "failed",
+    "disconnected",
+    "closed"
+};
index 75e60f9..3780f38 100644 (file)
@@ -68,19 +68,7 @@ public:
 
     ExceptionOr<void> initializeWith(Document&, RTCConfiguration&&);
 
-    const Vector<std::reference_wrapper<RTCRtpSender>>& getSenders() const { return m_transceiverSet->senders(); }
-    const Vector<std::reference_wrapper<RTCRtpReceiver>>& getReceivers() const { return m_transceiverSet->receivers(); }
-    const Vector<RefPtr<RTCRtpTransceiver>>& getTransceivers() const { return m_transceiverSet->list(); }
-
-    // Part of legacy MediaStream-based API (mostly implemented as JS built-ins)
-    Vector<RefPtr<MediaStream>> getRemoteStreams() const { return m_backend->getRemoteStreams(); }
-
-    ExceptionOr<Ref<RTCRtpSender>> addTrack(Ref<MediaStreamTrack>&&, const Vector<std::reference_wrapper<MediaStream>>&);
-    ExceptionOr<void> removeTrack(RTCRtpSender&);
-
-    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(Ref<MediaStreamTrack>&&, const RTCRtpTransceiverInit&);
-    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String& kind, const RTCRtpTransceiverInit&);
-
+    // 4.3.2 RTCPeerConnection Interface
     void queuedCreateOffer(RTCOfferOptions&&, PeerConnection::SessionDescriptionPromise&&);
     void queuedCreateAnswer(RTCAnswerOptions&&, PeerConnection::SessionDescriptionPromise&&);
 
@@ -94,21 +82,35 @@ public:
     RefPtr<RTCSessionDescription> currentRemoteDescription() const;
     RefPtr<RTCSessionDescription> pendingRemoteDescription() const;
 
-    RTCSignalingState signalingState() const { return m_signalingState; }
-
     void queuedAddIceCandidate(RTCIceCandidate&, DOMPromise<void>&&);
 
+    RTCSignalingState signalingState() const { return m_signalingState; }
     RTCIceGatheringState iceGatheringState() const { return m_iceGatheringState; }
     RTCIceConnectionState iceConnectionState() const { return m_iceConnectionState; }
 
     const RTCConfiguration& getConfiguration() const { return m_configuration; }
     ExceptionOr<void> setConfiguration(RTCConfiguration&&);
+    void close();
 
-    void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&);
+    // 5.1 RTCPeerConnection extensions
+    const Vector<std::reference_wrapper<RTCRtpSender>>& getSenders() const { return m_transceiverSet->senders(); }
+    const Vector<std::reference_wrapper<RTCRtpReceiver>>& getReceivers() const { return m_transceiverSet->receivers(); }
+    const Vector<RefPtr<RTCRtpTransceiver>>& getTransceivers() const { return m_transceiverSet->list(); }
+
+    ExceptionOr<Ref<RTCRtpSender>> addTrack(Ref<MediaStreamTrack>&&, const Vector<std::reference_wrapper<MediaStream>>&);
+    ExceptionOr<void> removeTrack(RTCRtpSender&);
 
+    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(Ref<MediaStreamTrack>&&, const RTCRtpTransceiverInit&);
+    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String& kind, const RTCRtpTransceiverInit&);
+
+    // 6.1 Peer-to-peer data API
     ExceptionOr<Ref<RTCDataChannel>> createDataChannel(ScriptExecutionContext&, String&&, RTCDataChannelInit&&);
 
-    void close();
+    // 8.2 Statistics API
+    void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&);
+
+    // Legacy MediaStream-based API, mostly implemented as JS built-ins
+    Vector<RefPtr<MediaStream>> getRemoteStreams() const { return m_backend->getRemoteStreams(); }
 
     // EventTarget
     EventTargetInterface eventTargetInterface() const final { return RTCPeerConnectionEventTargetInterfaceType; }
index fede457..fc06a96 100644 (file)
@@ -51,6 +51,8 @@
     ImplementedAs=RTCRtpTransceiverInit
 ] dictionary RTCRtpTransceiverInit {
     RTCRtpTransceiverDirection direction = "sendrecv";
+    // FIXME 169662: missing streams
+    // FIXME 169662: missing sendEncodings
 };
 
 [
index 645ab3c..85e78c1 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 Ericsson AB. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,4 +34,9 @@
     EnabledAtRuntime=PeerConnection,
 ] interface RTCRtpReceiver {
     readonly attribute MediaStreamTrack track;
+    // FIXME 169662: missing transport
+    // FIXME 169662: missing rtcpTransport
+    // FIXME 169662: missing getCapabilities
+    // FIXME 169662: missing getParameters
+    // FIXME 169662: missing getContributingSources
 };
index 21f91fd..0786746 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 Ericsson AB. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
     EnabledAtRuntime=PeerConnection,
 ] interface RTCRtpSender {
     readonly attribute MediaStreamTrack? track;
-
+    // FIXME 169662: missing transport
+    // FIXME 169662: missing rtcpTransport
+    // FIXME 169662: missing getCapabilities
+    // FIXME 169662: missing setParameters
+    // FIXME 169662: missing getParameters
     [MayThrowException] Promise<void> replaceTrack(MediaStreamTrack withTrack);
 };
index f9502ba..407871e 100644 (file)
@@ -36,11 +36,14 @@ typedef RTCRtpTransceiverDirection RtpTransceiverDirection;
     EnabledAtRuntime=PeerConnection
 ] interface RTCRtpTransceiver {
     readonly attribute DOMString? mid;
+    // FIXME 169662: missing [SameObject]
     readonly attribute RTCRtpSender sender;
+    // FIXME 169662: missing [SameObject]
     readonly attribute RTCRtpReceiver receiver;
     readonly attribute boolean stopped;
     readonly attribute RtpTransceiverDirection direction;
-
+    // FIXME 169662: missing currentDirection
     void setDirection(RtpTransceiverDirection direction);
     void stop();
+    // FIXME 169662: missing setCodecPreferences
 };
index dfdad55..0ced670 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,6 +26,7 @@
 [
     NoInterfaceObject,
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
     ImplementationLacksVTable,
 ] interface RTCStatsReport {
     readonly maplike<DOMString, object>;
@@ -45,6 +47,7 @@ enum RTCStatsType {
 };
 
 dictionary RTCStats {
+    // FIXME 169662: change type to DOMHighResTimeStamp
     unsigned long long timestamp;
     RTCStatsType type;
     DOMString id;
@@ -52,6 +55,7 @@ dictionary RTCStats {
 };
 
 dictionary RTCRTPStreamStats : RTCStats {
+    // FIXME 169662: change type to DOMString
     unsigned long ssrc;
     DOMString associateStatsId;
     boolean isRemote = false;
@@ -66,6 +70,8 @@ dictionary RTCRTPStreamStats : RTCStats {
     unsigned long long qpSum;
 };
 
+// FIXME 169662: missing RTCCodecStats
+
 [ JSGenerateToJSObject ]
 dictionary RTCInboundRTPStreamStats : RTCRTPStreamStats {
     unsigned long packetsReceived;
@@ -91,5 +97,16 @@ dictionary RTCOutboundRTPStreamStats : RTCRTPStreamStats {
     unsigned long packetsSent;
     unsigned long long bytesSent;
     double targetBitrate;
+    // FIXME 169662: missing roundTripTime
     unsigned long framesEncoded;
 };
+
+// FIXME 169662: missing RTCPeerConnectionStats
+// FIXME 169662: missing RTCMediaStreamStats
+// FIXME 169662: missing RTCMediaStreamTrackStats
+// FIXME 169662: missing RTCDataChannelStats
+// FIXME 169662: missing RTCTransportStats
+// FIXME 169662: missing RTCIceCandidateStats
+// FIXME 169662: missing RTCIceCandidatePairStats
+// FIXME 169662: missing RTCStatsIceCandidatePairState
+// FIXME 169662: missing RTCCertificateStats
index 86ad679..4a32363 100644 (file)
                316DCB4E1E7910A6001B5F87 /* JSRTCIceGatheringState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */; };
                316DCB4F1E7910A6001B5F87 /* JSRTCSignalingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB491E7910A6001B5F87 /* JSRTCSignalingState.cpp */; };
                316DCB501E7910A6001B5F87 /* JSRTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB4A1E7910A6001B5F87 /* JSRTCSignalingState.h */; };
+               316DCB8A1E7A6996001B5F87 /* RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB881E7A6996001B5F87 /* RTCIceTransport.cpp */; };
+               316DCB901E7A6C79001B5F87 /* RTCIceTransportState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB8D1E7A6C79001B5F87 /* RTCIceTransportState.h */; };
                316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */; };
                316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */; };
                316FE0730E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06F0E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp */; };
                3198480C1A1E6CE800A13318 /* JSAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319848041A1E6B5D00A13318 /* JSAnimationEvent.h */; };
                319AE063142D6B24006563A1 /* StyleFilterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319AE061142D6B24006563A1 /* StyleFilterData.cpp */; };
                319AE064142D6B24006563A1 /* StyleFilterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 319AE062142D6B24006563A1 /* StyleFilterData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               319BDE511E7A860400BA296C /* JSRTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319BDE4F1E7A858A00BA296C /* JSRTCIceTransport.cpp */; };
+               319BDE541E7A86CA00BA296C /* JSRTCIceTransportState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319BDE521E7A86C100BA296C /* JSRTCIceTransportState.cpp */; };
                319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 319FBD5D15D2F444009640A6 /* CachedImageClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                31A089041E737D51003B6609 /* WebGPUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31A088C61E737B4D003B6609 /* WebGPUBuffer.cpp */; };
                31A089051E737D51003B6609 /* WebGPUCommandBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31A088C91E737B4D003B6609 /* WebGPUCommandBuffer.cpp */; };
                316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceGatheringState.h; sourceTree = "<group>"; };
                316DCB491E7910A6001B5F87 /* JSRTCSignalingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCSignalingState.cpp; sourceTree = "<group>"; };
                316DCB4A1E7910A6001B5F87 /* JSRTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCSignalingState.h; sourceTree = "<group>"; };
+               316DCB881E7A6996001B5F87 /* RTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCIceTransport.cpp; sourceTree = "<group>"; };
+               316DCB891E7A6996001B5F87 /* RTCIceTransport.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceTransport.idl; sourceTree = "<group>"; };
+               316DCB8D1E7A6C79001B5F87 /* RTCIceTransportState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceTransportState.h; sourceTree = "<group>"; };
+               316DCB8E1E7A6C79001B5F87 /* RTCIceTransportState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceTransportState.idl; sourceTree = "<group>"; };
                316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframeRule.cpp; sourceTree = "<group>"; };
                316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSKeyframeRule.h; sourceTree = "<group>"; };
                316FE06F0E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframesRule.cpp; sourceTree = "<group>"; };
                319848041A1E6B5D00A13318 /* JSAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnimationEvent.h; sourceTree = "<group>"; };
                319AE061142D6B24006563A1 /* StyleFilterData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleFilterData.cpp; sourceTree = "<group>"; };
                319AE062142D6B24006563A1 /* StyleFilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleFilterData.h; sourceTree = "<group>"; };
+               319BDE4F1E7A858A00BA296C /* JSRTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceTransport.cpp; sourceTree = "<group>"; };
+               319BDE501E7A858A00BA296C /* JSRTCIceTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceTransport.h; sourceTree = "<group>"; };
+               319BDE521E7A86C100BA296C /* JSRTCIceTransportState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceTransportState.cpp; sourceTree = "<group>"; };
+               319BDE531E7A86C100BA296C /* JSRTCIceTransportState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceTransportState.h; sourceTree = "<group>"; };
                319FBD5D15D2F444009640A6 /* CachedImageClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedImageClient.h; sourceTree = "<group>"; };
                31A088C41E737B2C003B6609 /* JSWebGPURenderingContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderingContextCustom.cpp; sourceTree = "<group>"; };
                31A088C51E737B2C003B6609 /* JSWebGPURenderPassAttachmentDescriptorCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPassAttachmentDescriptorCustom.cpp; sourceTree = "<group>"; };
                                316DCB351E790E1B001B5F87 /* RTCIceGatheringState.idl */,
                                07AB996718DA3C010018771E /* RTCIceServer.h */,
                                07AB996818DA3C010018771E /* RTCIceServer.idl */,
+                               316DCB881E7A6996001B5F87 /* RTCIceTransport.cpp */,
                                5E6653091DA437BF00FDD84C /* RTCIceTransport.h */,
+                               316DCB891E7A6996001B5F87 /* RTCIceTransport.idl */,
+                               316DCB8D1E7A6C79001B5F87 /* RTCIceTransportState.h */,
+                               316DCB8E1E7A6C79001B5F87 /* RTCIceTransportState.idl */,
                                073794DC19EE2C5200E5A045 /* RTCOfferAnswerOptions.h */,
                                316DCB121E78BE43001B5F87 /* RTCOfferAnswerOptions.idl */,
                                316DCB281E78F395001B5F87 /* RTCOfferOptions.h */,
                                316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */,
                                073794E919EE341E00E5A045 /* JSRTCIceServer.cpp */,
                                073794EA19EE341E00E5A045 /* JSRTCIceServer.h */,
+                               319BDE4F1E7A858A00BA296C /* JSRTCIceTransport.cpp */,
+                               319BDE501E7A858A00BA296C /* JSRTCIceTransport.h */,
+                               319BDE521E7A86C100BA296C /* JSRTCIceTransportState.cpp */,
+                               319BDE531E7A86C100BA296C /* JSRTCIceTransportState.h */,
                                316DCB191E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp */,
                                316DCB1A1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h */,
                                316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */,
                                FD671A78159BB07000197559 /* MediaStreamAudioSourceNode.h in Headers */,
                                070F549817F12F6B00169E04 /* MediaStreamConstraintsValidationClient.h in Headers */,
                                078E091617D14D1C00420AA1 /* MediaStreamEvent.h in Headers */,
+                               316DCB901E7A6C79001B5F87 /* RTCIceTransportState.h in Headers */,
                                078E093717D16B2C00420AA1 /* MediaStreamPrivate.h in Headers */,
                                078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */,
                                078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */,
                                BC5A12DF0DC0414800C9AFAD /* CSSReflectValue.cpp in Sources */,
                                BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */,
                                A80E6D060A1989CA007FB8C5 /* CSSRule.cpp in Sources */,
+                               319BDE511E7A860400BA296C /* JSRTCIceTransport.cpp in Sources */,
                                A80E6D090A1989CA007FB8C5 /* CSSRuleList.cpp in Sources */,
                                371F51A20D262FA000ECE0D5 /* CSSSegmentedFontFace.cpp in Sources */,
                                A80E734F0A199C77007FB8C5 /* CSSSelector.cpp in Sources */,
                                B51A2F4117D7D5DE0072517A /* ImageQualityController.cpp in Sources */,
                                0F3C725E1974874B00AEDD0C /* ImageSource.cpp in Sources */,
                                4B3480930EEF50D400AC1B41 /* ImageSourceCGMac.mm in Sources */,
+                               319BDE541E7A86CA00BA296C /* JSRTCIceTransportState.cpp in Sources */,
                                316FE1170E6E1DA700BF6088 /* ImplicitAnimation.cpp in Sources */,
                                BE961C5418AD338500D07DC5 /* InbandDataTextTrack.cpp in Sources */,
                                BE16C59217CFE17200852C04 /* InbandGenericTextTrack.cpp in Sources */,
                                E4DEAA1717A93DC3000E0430 /* StyleTreeResolver.cpp in Sources */,
                                E42E76DA1C7AF76C00E3614D /* StyleUpdate.cpp in Sources */,
                                BC5EB6990E81DA6300B25965 /* StyleVisualData.cpp in Sources */,
+                               316DCB8A1E7A6996001B5F87 /* RTCIceTransport.cpp in Sources */,
                                D000ED2711C1B9CD00C47726 /* SubframeLoader.cpp in Sources */,
                                1FC40FB91655CCB60040F29E /* SubimageCacheWithTimer.cpp in Sources */,
                                F55B3DD31251F12D003EF269 /* SubmitInputType.cpp in Sources */,