Clean up RTCPeerConnection IDL
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 18:15:31 +0000 (18:15 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 18:15:31 +0000 (18:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169660

Reviewed by Youenn Fablet.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTransceiver): Refactor to use RTCRtpTransceiverInit.
(WebCore::RTCPeerConnection::completeAddTransceiver):
* Modules/mediastream/RTCPeerConnection.h: Remove redundant definitions.
* Modules/mediastream/RTCPeerConnection.idl: Using 13 March 2017 Editor's Draft of
WebRTC spec. Move RTCOfferAnswerOptions out to separate IDLs. Keep RTCDataChannelInit and
RTCRtpTransceiverInit since they appear to be used only in RTCPeerConnection.
    Reorder the properties, functions, and events based on their appearance in the spec.
Legacy MediaStream calls are placed at the end. I tried to use "partial interface" in the
same file, but in the end nothing was generated, so everything is contained in one interface
block.

* Modules/mediastream/RTCEnums.h: Added. This will be an all-in-one header to hold the
enums.

Move RTCAnswerOptions, RTCOfferAnswerOptions, RTCOfferOptions, RTCRtpTransceiverDirection
out to their own IDL's.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/RTCAnswerOptions.h: Added.
* Modules/mediastream/RTCAnswerOptions.idl: Added.
* Modules/mediastream/RTCOfferAnswerOptions.h:
* Modules/mediastream/RTCOfferAnswerOptions.idl: Added.
* Modules/mediastream/RTCOfferOptions.h: Added. Remove |offerToReceiveVideo| and
|offerToReceiveAudio|, which are not used.
* Modules/mediastream/RTCOfferOptions.idl: Added.
* Modules/mediastream/RTCRtpTransceiverDirection.h: Added.
* Modules/mediastream/RTCRtpTransceiverDirection.idl: Added. Use a typedef for
RTCRtpTransceiverDirection to prevent the code generator from prefixing RTCRtpTransceiver.
* Modules/mediastream/RTCRtpTransceiver.idl: Move RTCRtpTransceiverDirection.
* WebCore.xcodeproj/project.pbxproj: Add IDLs and derived sources. Remove unused
HTMLMediaElementMediaStream.h. Reorder.

Refactor.
* Modules/mediastream/RTCRtpTransceiver.h: Use RTCRtpTransceiverDirection.
* Modules/mediastream/MediaEndpointPeerConnection.cpp:

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

19 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCAnswerOptions.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCAnswerOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCEnums.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.h
Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferOptions.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj

index a7cda48..65befbe 100644 (file)
@@ -233,6 +233,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/mediastream/NavigatorUserMedia.idl
     Modules/mediastream/OverconstrainedError.idl
     Modules/mediastream/OverconstrainedErrorEvent.idl
+    Modules/mediastream/RTCAnswerOptions.idl
     Modules/mediastream/RTCConfiguration.idl
     Modules/mediastream/RTCDTMFSender.idl
     Modules/mediastream/RTCDTMFToneChangeEvent.idl
@@ -241,10 +242,13 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/mediastream/RTCIceCandidate.idl
     Modules/mediastream/RTCIceCandidateEvent.idl
     Modules/mediastream/RTCIceServer.idl
+    Modules/mediastream/RTCOfferAnswerOptions.idl
+    Modules/mediastream/RTCOfferOptions.idl
     Modules/mediastream/RTCPeerConnection.idl
     Modules/mediastream/RTCRtpReceiver.idl
     Modules/mediastream/RTCRtpSender.idl
     Modules/mediastream/RTCRtpTransceiver.idl
+    Modules/mediastream/RTCRtpTransceiverDirection.idl
     Modules/mediastream/RTCSessionDescription.idl
     Modules/mediastream/RTCStatsReport.idl
     Modules/mediastream/RTCTrackEvent.idl
index dc9917a..c567d0c 100644 (file)
@@ -1,3 +1,47 @@
+2017-03-14  Jon Lee  <jonlee@apple.com>
+
+        Clean up RTCPeerConnection IDL
+        https://bugs.webkit.org/show_bug.cgi?id=169660
+
+        Reviewed by Youenn Fablet.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::addTransceiver): Refactor to use RTCRtpTransceiverInit.
+        (WebCore::RTCPeerConnection::completeAddTransceiver):
+        * Modules/mediastream/RTCPeerConnection.h: Remove redundant definitions.
+        * Modules/mediastream/RTCPeerConnection.idl: Using 13 March 2017 Editor's Draft of
+        WebRTC spec. Move RTCOfferAnswerOptions out to separate IDLs. Keep RTCDataChannelInit and
+        RTCRtpTransceiverInit since they appear to be used only in RTCPeerConnection.
+            Reorder the properties, functions, and events based on their appearance in the spec.
+        Legacy MediaStream calls are placed at the end. I tried to use "partial interface" in the
+        same file, but in the end nothing was generated, so everything is contained in one interface
+        block.
+
+        * Modules/mediastream/RTCEnums.h: Added. This will be an all-in-one header to hold the
+        enums.
+
+        Move RTCAnswerOptions, RTCOfferAnswerOptions, RTCOfferOptions, RTCRtpTransceiverDirection
+        out to their own IDL's.
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Modules/mediastream/RTCAnswerOptions.h: Added.
+        * Modules/mediastream/RTCAnswerOptions.idl: Added.
+        * Modules/mediastream/RTCOfferAnswerOptions.h:
+        * Modules/mediastream/RTCOfferAnswerOptions.idl: Added.
+        * Modules/mediastream/RTCOfferOptions.h: Added. Remove |offerToReceiveVideo| and
+        |offerToReceiveAudio|, which are not used.
+        * Modules/mediastream/RTCOfferOptions.idl: Added.
+        * Modules/mediastream/RTCRtpTransceiverDirection.h: Added.
+        * Modules/mediastream/RTCRtpTransceiverDirection.idl: Added. Use a typedef for
+        RTCRtpTransceiverDirection to prevent the code generator from prefixing RTCRtpTransceiver.
+        * Modules/mediastream/RTCRtpTransceiver.idl: Move RTCRtpTransceiverDirection.
+        * WebCore.xcodeproj/project.pbxproj: Add IDLs and derived sources. Remove unused
+        HTMLMediaElementMediaStream.h. Reorder.
+
+        Refactor.
+        * Modules/mediastream/RTCRtpTransceiver.h: Use RTCRtpTransceiverDirection.
+        * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+
 2017-03-15  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Initialize m_button, m_clickCount members in PlatformMouseEvent constructors
index 5339d7f..e6e1059 100644 (file)
@@ -177,6 +177,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/mediastream/NavigatorUserMedia.idl \
     $(WebCore)/Modules/mediastream/OverconstrainedError.idl \
     $(WebCore)/Modules/mediastream/OverconstrainedErrorEvent.idl \
+    $(WebCore)/Modules/mediastream/RTCAnswerOptions.idl \
     $(WebCore)/Modules/mediastream/RTCConfiguration.idl \
     $(WebCore)/Modules/mediastream/RTCDTMFSender.idl \
     $(WebCore)/Modules/mediastream/RTCDTMFToneChangeEvent.idl \
@@ -185,10 +186,13 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
     $(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \
     $(WebCore)/Modules/mediastream/RTCIceServer.idl \
+    $(WebCore)/Modules/mediastream/RTCOfferAnswerOptions.idl \
+    $(WebCore)/Modules/mediastream/RTCOfferOptions.idl \
     $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
     $(WebCore)/Modules/mediastream/RTCRtpReceiver.idl \
     $(WebCore)/Modules/mediastream/RTCRtpSender.idl \
     $(WebCore)/Modules/mediastream/RTCRtpTransceiver.idl \
+    $(WebCore)/Modules/mediastream/RTCRtpTransceiverDirection.idl \
     $(WebCore)/Modules/mediastream/RTCSessionDescription.idl \
     $(WebCore)/Modules/mediastream/RTCStatsReport.idl \
     $(WebCore)/Modules/mediastream/RTCTrackEvent.idl \
index b370544..6ae8a17 100644 (file)
 #include "MediaStreamTrack.h"
 #include "NotImplemented.h"
 #include "PeerMediaDescription.h"
+#include "RTCAnswerOptions.h"
 #include "RTCConfiguration.h"
 #include "RTCIceCandidate.h"
 #include "RTCIceCandidateEvent.h"
-#include "RTCOfferAnswerOptions.h"
+#include "RTCOfferOptions.h"
 #include "RTCPeerConnection.h"
 #include "RTCRtpTransceiver.h"
 #include "RTCTrackEvent.h"
diff --git a/Source/WebCore/Modules/mediastream/RTCAnswerOptions.h b/Source/WebCore/Modules/mediastream/RTCAnswerOptions.h
new file mode 100644 (file)
index 0000000..5d331af
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * 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
+
+#if ENABLE(WEB_RTC)
+
+#include "RTCOfferAnswerOptions.h"
+
+namespace WebCore {
+
+struct RTCAnswerOptions : public RTCOfferAnswerOptions {
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
diff --git a/Source/WebCore/Modules/mediastream/RTCAnswerOptions.idl b/Source/WebCore/Modules/mediastream/RTCAnswerOptions.idl
new file mode 100644 (file)
index 0000000..2bff7cd
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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
+] dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
+};
diff --git a/Source/WebCore/Modules/mediastream/RTCEnums.h b/Source/WebCore/Modules/mediastream/RTCEnums.h
new file mode 100644 (file)
index 0000000..e3e8d9a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * 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"
+#include "RTCRtpTransceiverDirection.h"
index f42af80..497420a 100644 (file)
@@ -34,15 +34,6 @@ struct RTCOfferAnswerOptions {
     bool voiceActivityDetection { true };
 };
 
-struct RTCOfferOptions : RTCOfferAnswerOptions {
-    int64_t offerToReceiveVideo { 0 };
-    int64_t offerToReceiveAudio { 0 };
-    bool iceRestart { false };
-};
-
-struct RTCAnswerOptions : RTCOfferAnswerOptions {
-};
-
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
diff --git a/Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.idl b/Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.idl
new file mode 100644 (file)
index 0000000..c85bc4a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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,
+    ImplementedAs=RTCOfferAnswerOptions
+] dictionary RTCOfferAnswerOptions {
+    boolean voiceActivityDetection = true;
+};
diff --git a/Source/WebCore/Modules/mediastream/RTCOfferOptions.h b/Source/WebCore/Modules/mediastream/RTCOfferOptions.h
new file mode 100644 (file)
index 0000000..b0d2cad
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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
+
+#if ENABLE(WEB_RTC)
+
+#include "RTCOfferAnswerOptions.h"
+
+namespace WebCore {
+
+struct RTCOfferOptions : RTCOfferAnswerOptions {
+    bool iceRestart { false };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
diff --git a/Source/WebCore/Modules/mediastream/RTCOfferOptions.idl b/Source/WebCore/Modules/mediastream/RTCOfferOptions.idl
new file mode 100644 (file)
index 0000000..2d9e241
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * 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
+] dictionary RTCOfferOptions : RTCOfferAnswerOptions {
+    boolean iceRestart = false;
+};
index 766b9f6..e06a934 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2012 Google Inc. All rights reserved.
  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
  * Copyright (C) 2015, 2016 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
@@ -48,7 +49,6 @@
 #include "RTCDataChannel.h"
 #include "RTCIceCandidate.h"
 #include "RTCIceCandidateEvent.h"
-#include "RTCOfferAnswerOptions.h"
 #include "RTCSessionDescription.h"
 #include "RTCTrackEvent.h"
 #include "UUID.h"
@@ -172,7 +172,7 @@ ExceptionOr<void> RTCPeerConnection::removeTrack(RTCRtpSender& sender)
     return { };
 }
 
-ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(Ref<MediaStreamTrack>&& track, const RtpTransceiverInit& init)
+ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(Ref<MediaStreamTrack>&& track, const RTCRtpTransceiverInit& init)
 {
     if (m_signalingState == SignalingState::Closed)
         return Exception { INVALID_STATE_ERR };
@@ -190,7 +190,7 @@ ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(Ref<MediaS
     return WTFMove(transceiver);
 }
 
-ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(const String& kind, const RtpTransceiverInit& init)
+ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(const String& kind, const RTCRtpTransceiverInit& init)
 {
     if (m_signalingState == SignalingState::Closed)
         return Exception { INVALID_STATE_ERR };
@@ -210,7 +210,7 @@ ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(const Stri
     return WTFMove(transceiver);
 }
 
-void RTCPeerConnection::completeAddTransceiver(RTCRtpTransceiver& transceiver, const RtpTransceiverInit& init)
+void RTCPeerConnection::completeAddTransceiver(RTCRtpTransceiver& transceiver, const RTCRtpTransceiverInit& init)
 {
     transceiver.setDirection(static_cast<RTCRtpTransceiver::Direction>(init.direction));
 
index 29f1389..04e644f 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2012 Google Inc. All rights reserved.
  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
  * 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
 #include "ActiveDOMObject.h"
 #include "EventTarget.h"
 #include "MediaStream.h"
+#include "RTCAnswerOptions.h"
 #include "RTCConfiguration.h"
 #include "RTCDataChannel.h"
-#include "RTCOfferAnswerOptions.h"
+#include "RTCEnums.h"
+#include "RTCOfferOptions.h"
 #include "RTCRtpTransceiver.h"
 
 namespace WebCore {
@@ -52,6 +55,10 @@ class RTCPeerConnectionErrorCallback;
 class RTCSessionDescription;
 class RTCStatsCallback;
 
+struct RTCRtpTransceiverInit {
+    RTCRtpTransceiverDirection direction;
+};
+
 class RTCPeerConnection final : public RefCounted<RTCPeerConnection>, public RTCRtpSenderClient, public EventTargetWithInlineData, public ActiveDOMObject {
 public:
     static Ref<RTCPeerConnection> create(ScriptExecutionContext&);
@@ -74,15 +81,8 @@ public:
     ExceptionOr<Ref<RTCRtpSender>> addTrack(Ref<MediaStreamTrack>&&, const Vector<std::reference_wrapper<MediaStream>>&);
     ExceptionOr<void> removeTrack(RTCRtpSender&);
 
-    // This enum is mirrored in RTCRtpTransceiver.h
-    enum class RtpTransceiverDirection { Sendrecv, Sendonly, Recvonly, Inactive };
-
-    struct RtpTransceiverInit {
-        RtpTransceiverDirection direction;
-    };
-
-    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(Ref<MediaStreamTrack>&&, const RtpTransceiverInit&);
-    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String& kind, const RtpTransceiverInit&);
+    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(Ref<MediaStreamTrack>&&, const RTCRtpTransceiverInit&);
+    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String& kind, const RTCRtpTransceiverInit&);
 
     void queuedCreateOffer(RTCOfferOptions&&, PeerConnection::SessionDescriptionPromise&&);
     void queuedCreateAnswer(RTCAnswerOptions&&, PeerConnection::SessionDescriptionPromise&&);
@@ -143,7 +143,7 @@ public:
 private:
     RTCPeerConnection(ScriptExecutionContext&);
 
-    void completeAddTransceiver(RTCRtpTransceiver&, const RtpTransceiverInit&);
+    void completeAddTransceiver(RTCRtpTransceiver&, const RTCRtpTransceiverInit&);
 
     RTCController& rtcController();
     void registerToController();
index 9ad5813..b599e46 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2012 Google Inc. All rights reserved.
  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
  * Copyright (C) 2015, 2016 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
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-dictionary RTCOfferAnswerOptions {
-    boolean voiceActivityDetection = true;
-};
-
-dictionary RTCOfferOptions : RTCOfferAnswerOptions {
-    boolean iceRestart = false;
-};
-
-dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
-};
-
-dictionary RTCDataChannelInit {
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection
+] dictionary RTCDataChannelInit {
     boolean ordered = true;
+    // FIXME 169644: rename to maxPacketLifeTime;
     unsigned short maxRetransmitTime;
     unsigned short maxRetransmits;
     USVString protocol = "";
     boolean negotiated = false;
     unsigned short id;
+    // FIXME 169644: missing priority
+};
+
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
+    ImplementedAs=RTCRtpTransceiverInit
+] dictionary RTCRtpTransceiverInit {
+    RTCRtpTransceiverDirection direction = "sendrecv";
 };
 
 [
@@ -56,100 +59,123 @@ dictionary RTCDataChannelInit {
     ConstructorCallWith=ScriptExecutionContext,
     EnabledAtRuntime=PeerConnection,
     ExportMacro=WEBCORE_EXPORT,
-    JSBuiltinConstructor,
+    JSBuiltinConstructor
 ] interface RTCPeerConnection : EventTarget {
+    // FIXME 169644: update Constructor to take optional RTCConfiguration
     // Private initializer
     [PrivateIdentifier, CallWith=Document, MayThrowException] void initializeWith(RTCConfiguration configuration);
 
-    // RTP Media API extensions
-    [PrivateIdentifier, PublicIdentifier] sequence<RTCRtpSender> getSenders();
-    sequence<RTCRtpReceiver> getReceivers();
-    sequence<RTCRtpTransceiver> getTransceivers();
-
-    [PrivateIdentifier, PublicIdentifier, MayThrowException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
-    [PrivateIdentifier, PublicIdentifier, MayThrowException] void removeTrack(RTCRtpSender sender);
-
-    [MayThrowException] RTCRtpTransceiver addTransceiver(MediaStreamTrack track, optional RTCRtpTransceiverInit init);
-    [MayThrowException] RTCRtpTransceiver addTransceiver(DOMString kind, optional RTCRtpTransceiverInit init);
-
-    // Legacy MediaSream-based API (implemented on top of the RTP Media API)
-    [JSBuiltin] sequence<MediaStream> getLocalStreams();
-    [PrivateIdentifier, PublicIdentifier] sequence<MediaStream> getRemoteStreams();
-    [JSBuiltin] MediaStream getStreamById(DOMString streamId);
-
-    [JSBuiltin] void addStream(MediaStream stream);
-    [JSBuiltin] void removeStream(MediaStream stream);
 
+    // 4.3.2 Interface Definition
+    // JSBuiltins provide support for legacy signatures
     [JSBuiltin] Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions offerOptions);
-    // Legacy signature: Promise<void> createOffer(RTCSessionDescriptionCallback successCallback
-    //                                       RTCPeerConnectionErrorCallback errorCallback,
-    //                                       optional Dictionary offerOptions);
-
     [JSBuiltin] Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions answerOptions);
-    // Legacy signature: Promise<void> createAnswer(RTCSessionDescriptionCallback successCallback
-    //                                        RTCPeerConnectionErrorCallback errorCallback,
-    //                                        optional Dictionary answerOptions);
 
+    // FIXME 169644: change to RTCSessionDescriptionInit
     [JSBuiltin] Promise<void> setLocalDescription(RTCSessionDescription description);
-    // Legacy signature: Promise<void> setLocalDescription(RTCSessionDescription description
-    //                                               VoidCallback successCallback,
-    //                                               RTCPeerConnectionErrorCallback errorCallback);
-
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription localDescription;
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription currentLocalDescription;
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription pendingLocalDescription;
 
+    // FIXME 169644: change to RTCSessionDescriptionInit
     [JSBuiltin] Promise<void> setRemoteDescription(RTCSessionDescription description);
-    // Legacy signature: Promise<void> setRemoteDescription(RTCSessionDescription description
-    //                                                VoidCallback successCallback,
-    //                                                RTCPeerConnectionErrorCallback errorCallback);
-
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription remoteDescription;
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription currentRemoteDescription;
+    // FIXME 169644: change to nullable
     readonly attribute RTCSessionDescription pendingRemoteDescription;
 
-    readonly attribute DOMString signalingState;
-
+    // FIXME 169644: update parameter to (RTCIceCandidateInit or RTCIceCandidate)
     [JSBuiltin] Promise<void> addIceCandidate(RTCIceCandidate candidate);
-    // Legacy signature: Promise<void> addIceCandidate(RTCIceCandidate candidate
-    //                                           VoidCallback successCallback,
-    //                                           RTCPeerConnectionErrorCallback errorCallback);
 
+    // FIXME 169644: convert to enum
+    readonly attribute DOMString signalingState;
+    // FIXME 169644: convert to enum
     readonly attribute DOMString iceGatheringState;
+    // FIXME 169644: convert to enum
     readonly attribute DOMString iceConnectionState;
 
+    // FIXME 169644: missing connectionState
+    // FIXME 169644: missing canTrickleIceCandidates
+    // FIXME 169644: missing defaultIceServers
+
     RTCConfiguration getConfiguration();
     [MayThrowException] void setConfiguration(RTCConfiguration configuration);
+    void close();
 
-    Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null);
+    attribute EventHandler onnegotiationneeded;
+    attribute EventHandler onicecandidate;
+    // FIXME 169644: missing onicecandidateerror
+    attribute EventHandler onsignalingstatechange;
+    attribute EventHandler oniceconnectionstatechange;
+    attribute EventHandler onicegatheringstatechange;
+    // FIXME 169644: missing onconnectionstatechanged
+    // FIXME 169644: missing onfingerprintfailure
 
-    // Private API used to implement the overloaded operations above. Queued functions are called by
-    // runQueuedOperation() (defined in RTCPeerConnectionInternals.js).
+    // Private API used to implement the overloaded operations above. Queued functions are called by runQueuedOperation().
+    // See RTCPeerConnectionInternals.js.
     [PrivateIdentifier] Promise<RTCSessionDescriptionInit> queuedCreateOffer(optional RTCOfferOptions offerOptions);
     [PrivateIdentifier] Promise<RTCSessionDescriptionInit> queuedCreateAnswer(optional RTCAnswerOptions answerOptions);
     [PrivateIdentifier] Promise<void> queuedSetLocalDescription(RTCSessionDescription description);
     [PrivateIdentifier] Promise<void> queuedSetRemoteDescription(RTCSessionDescription description);
     [PrivateIdentifier] Promise<void> queuedAddIceCandidate(RTCIceCandidate candidate);
 
-    [CallWith=ScriptExecutionContext, MayThrowException] RTCDataChannel createDataChannel([TreatNullAs=EmptyString] DOMString label, optional RTCDataChannelInit options);
 
-    void close();
+    // 4.3.3.1 Legacy extensions supported
+    // JSBuiltin attributes above handles support of the extensions
+    // FIXME 169646: wrap legacy calls in runtime flag
+
+
+    // 4.11 Certificate management
+    // FIXME 169644: missing generateCertificate
+
+
+    // 5.1 RTCPeerConnection extensions
+    // RTP Media API extensions
+    [PrivateIdentifier, PublicIdentifier] sequence<RTCRtpSender> getSenders();
+    sequence<RTCRtpReceiver> getReceivers();
+    sequence<RTCRtpTransceiver> getTransceivers();
+
+    [PrivateIdentifier, PublicIdentifier, MayThrowException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
+    [PrivateIdentifier, PublicIdentifier, MayThrowException] void removeTrack(RTCRtpSender sender);
+
+    // FIXME 169644: convert to (MediaStreamTrack or DOMString)
+    [MayThrowException] RTCRtpTransceiver addTransceiver(MediaStreamTrack track, optional RTCRtpTransceiverInit init);
+    [MayThrowException] RTCRtpTransceiver addTransceiver(DOMString kind, optional RTCRtpTransceiverInit init);
 
-    attribute EventHandler onnegotiationneeded;
-    attribute EventHandler onicecandidate;
-    attribute EventHandler onsignalingstatechange;
     attribute EventHandler ontrack;
-    attribute EventHandler oniceconnectionstatechange;
-    attribute EventHandler onicegatheringstatechange;
+
+
+    // 6.1 Peer-to-peer data API
+    // FIXME 169644: missing sctp
+
+    // FIXME 169644: convert to USVString
+    [CallWith=ScriptExecutionContext, MayThrowException] RTCDataChannel createDataChannel([TreatNullAs=EmptyString] DOMString label, optional RTCDataChannelInit options);
     attribute EventHandler ondatachannel;
 
-    // Legacy event handler (MediaStream-based API)
-    attribute EventHandler onaddstream;
-};
 
-// This enum is mirrored in RTCRtpTransceiver.idl
-enum RTCRtpTransceiverDirection { "sendrecv", "sendonly", "recvonly", "inactive" };
+    // 8.2 Statistics API
+    // FIXME 169644: |selector| may go away in a future version of the spec
+    Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null);
 
-dictionary RTCRtpTransceiverInit {
-    RTCRtpTransceiverDirection direction = "sendrecv";
+
+    // 9.6 Identity Provider API
+    // FIXME 169644: missing IdP
+
+
+    // Legacy MediaStream API
+    // FIXME 169646: wrap this in runtime flag
+    [JSBuiltin] sequence<MediaStream> getLocalStreams();
+    [PrivateIdentifier, PublicIdentifier] sequence<MediaStream> getRemoteStreams();
+    [JSBuiltin] MediaStream getStreamById(DOMString streamId);
+
+    [JSBuiltin] void addStream(MediaStream stream);
+    [JSBuiltin] void removeStream(MediaStream stream);
+
+    // Legacy event handler (MediaStream-based API)
+    attribute EventHandler onaddstream;
 };
index e000cb2..94f5c69 100644 (file)
@@ -32,6 +32,7 @@
 
 #if ENABLE(WEB_RTC)
 
+#include "RTCEnums.h"
 #include "RTCIceTransport.h"
 #include "RTCRtpReceiver.h"
 #include "RTCRtpSender.h"
@@ -45,7 +46,7 @@ namespace WebCore {
 class RTCRtpTransceiver : public RefCounted<RTCRtpTransceiver>, public ScriptWrappable {
 public:
     // This enum is mirrored in RTCPeerConnection.h
-    enum class Direction { Sendrecv, Sendonly, Recvonly, Inactive };
+    using Direction = RTCRtpTransceiverDirection;
 
     static Ref<RTCRtpTransceiver> create(Ref<RTCRtpSender>&& sender, Ref<RTCRtpReceiver>&& receiver) { return adoptRef(*new RTCRtpTransceiver(WTFMove(sender), WTFMove(receiver))); }
     virtual ~RTCRtpTransceiver() { }
index 68cf1ea..f9502ba 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 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
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+typedef RTCRtpTransceiverDirection RtpTransceiverDirection;
+
 [
     Conditional=WEB_RTC,
-    EnabledAtRuntime=PeerConnection,
+    EnabledAtRuntime=PeerConnection
 ] interface RTCRtpTransceiver {
     readonly attribute DOMString? mid;
     readonly attribute RTCRtpSender sender;
     readonly attribute RTCRtpReceiver receiver;
     readonly attribute boolean stopped;
-    readonly attribute RTCRtpTransceiverDirection direction;
+    readonly attribute RtpTransceiverDirection direction;
 
-    void setDirection(RTCRtpTransceiverDirection direction);
+    void setDirection(RtpTransceiverDirection direction);
     void stop();
 };
-
-// This enum is mirrored in RTCPeerConnection.idl
-enum RTCRtpTransceiverDirection { "sendrecv", "sendonly", "recvonly", "inactive" };
diff --git a/Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h b/Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h
new file mode 100644 (file)
index 0000000..7c0d67d
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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
+
+#if ENABLE(WEB_RTC)
+
+namespace WebCore {
+
+enum class RTCRtpTransceiverDirection {
+    Sendrecv,
+    Sendonly,
+    Recvonly,
+    Inactive
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.idl b/Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.idl
new file mode 100644 (file)
index 0000000..ad60379
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * 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 RTCRtpTransceiverDirection {
+    "sendrecv",
+    "sendonly",
+    "recvonly",
+    "inactive"
+};
index 51acb3c..7a628cf 100644 (file)
                076F0D0E12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */; };
                077664FC183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */; };
                077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */; };
-               0779BF0E18453168000B6AE7 /* HTMLMediaElementMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 0779BF0B18453168000B6AE7 /* HTMLMediaElementMediaStream.h */; };
                077AF14018F4AE400001ED61 /* SerializedPlatformRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                077AF14318F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */; };
                077AF14418F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */; };
                316BDC0B1E76344E00DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC0A1E76343600DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm */; };
                316BDC0C1E7634CF00DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC081E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp */; };
                316BDC0D1E7634D200DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDC091E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               316DCB1F1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB191E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp */; };
+               316DCB201E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB1A1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h */; };
+               316DCB211E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB1B1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.cpp */; };
+               316DCB221E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB1C1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.h */; };
+               316DCB311E78FB6C001B5F87 /* JSRTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB2D1E78F496001B5F87 /* JSRTCAnswerOptions.cpp */; };
+               316DCB321E78FB70001B5F87 /* JSRTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */; };
                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 */; };
                076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivateAVFoundation.h; sourceTree = "<group>"; };
                077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSQuickTimePluginReplacement.cpp; sourceTree = "<group>"; };
                077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSQuickTimePluginReplacement.h; sourceTree = "<group>"; };
-               0779BF0B18453168000B6AE7 /* HTMLMediaElementMediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementMediaStream.h; sourceTree = "<group>"; };
-               0779BF0C18453168000B6AE7 /* HTMLMediaElementMediaStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMediaElementMediaStream.idl; sourceTree = "<group>"; };
                077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentation.h; sourceTree = "<group>"; };
                077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentationMac.h; sourceTree = "<group>"; };
                077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformRepresentationMac.mm; sourceTree = "<group>"; };
                316BDC081E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPipelineColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
                316BDC091E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPipelineColorAttachmentDescriptor.h; sourceTree = "<group>"; };
                316BDC0A1E76343600DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPipelineColorAttachmentDescriptorMetal.mm; sourceTree = "<group>"; };
+               316DCB121E78BE43001B5F87 /* RTCOfferAnswerOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCOfferAnswerOptions.idl; sourceTree = "<group>"; };
+               316DCB161E78C330001B5F87 /* RTCRtpTransceiverDirection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCRtpTransceiverDirection.h; sourceTree = "<group>"; };
+               316DCB171E78C330001B5F87 /* RTCRtpTransceiverDirection.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RTCRtpTransceiverDirection.idl; sourceTree = "<group>"; };
+               316DCB181E78C453001B5F87 /* RTCEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCEnums.h; sourceTree = "<group>"; };
+               316DCB191E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCOfferAnswerOptions.cpp; sourceTree = "<group>"; };
+               316DCB1A1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCOfferAnswerOptions.h; sourceTree = "<group>"; };
+               316DCB1B1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCRtpTransceiverDirection.cpp; sourceTree = "<group>"; };
+               316DCB1C1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCRtpTransceiverDirection.h; sourceTree = "<group>"; };
+               316DCB281E78F395001B5F87 /* RTCOfferOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCOfferOptions.h; sourceTree = "<group>"; };
+               316DCB291E78F395001B5F87 /* RTCOfferOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RTCOfferOptions.idl; sourceTree = "<group>"; };
+               316DCB2B1E78F3A9001B5F87 /* RTCAnswerOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCAnswerOptions.h; sourceTree = "<group>"; };
+               316DCB2C1E78F3A9001B5F87 /* RTCAnswerOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RTCAnswerOptions.idl; sourceTree = "<group>"; };
+               316DCB2D1E78F496001B5F87 /* JSRTCAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCAnswerOptions.cpp; sourceTree = "<group>"; };
+               316DCB2E1E78F496001B5F87 /* JSRTCAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCAnswerOptions.h; sourceTree = "<group>"; };
+               316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCOfferOptions.cpp; sourceTree = "<group>"; };
+               316DCB301E78F496001B5F87 /* JSRTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCOfferOptions.h; 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>"; };
                                073794EE19EE364200E5A045 /* DOMURLMediaStream.idl */,
                                93A806111E03B51C008A1F26 /* DoubleRange.h */,
                                93A806121E03B51C008A1F26 /* DoubleRange.idl */,
-                               0779BF0B18453168000B6AE7 /* HTMLMediaElementMediaStream.h */,
-                               0779BF0C18453168000B6AE7 /* HTMLMediaElementMediaStream.idl */,
                                93A806131E03B51C008A1F26 /* LongRange.h */,
                                93A806141E03B51C008A1F26 /* LongRange.idl */,
                                07221B4A17CEC32700848E51 /* MediaConstraintsImpl.cpp */,
                                072A703F1D6E8F6200DF0AFC /* OverconstrainedErrorEvent.idl */,
                                41E408381DCB747900EFCE19 /* PeerConnectionBackend.cpp */,
                                5E2C434D1BCEE2E50001E2BC /* PeerConnectionBackend.h */,
+                               316DCB2B1E78F3A9001B5F87 /* RTCAnswerOptions.h */,
+                               316DCB2C1E78F3A9001B5F87 /* RTCAnswerOptions.idl */,
                                07AB996518DA3C010018771E /* RTCConfiguration.h */,
                                07AB996618DA3C010018771E /* RTCConfiguration.idl */,
                                418205481E53EAAD00D62207 /* RTCController.cpp */,
                                07221B6C17CEC32700848E51 /* RTCDTMFToneChangeEvent.cpp */,
                                07221B6D17CEC32700848E51 /* RTCDTMFToneChangeEvent.h */,
                                07221B6E17CEC32700848E51 /* RTCDTMFToneChangeEvent.idl */,
+                               316DCB181E78C453001B5F87 /* RTCEnums.h */,
                                07221B7117CEC32700848E51 /* RTCIceCandidate.cpp */,
                                07221B7217CEC32700848E51 /* RTCIceCandidate.h */,
                                07221B7317CEC32700848E51 /* RTCIceCandidate.idl */,
                                07AB996818DA3C010018771E /* RTCIceServer.idl */,
                                5E6653091DA437BF00FDD84C /* RTCIceTransport.h */,
                                073794DC19EE2C5200E5A045 /* RTCOfferAnswerOptions.h */,
+                               316DCB121E78BE43001B5F87 /* RTCOfferAnswerOptions.idl */,
+                               316DCB281E78F395001B5F87 /* RTCOfferOptions.h */,
+                               316DCB291E78F395001B5F87 /* RTCOfferOptions.idl */,
                                07221B7717CEC32700848E51 /* RTCPeerConnection.cpp */,
                                07221B7817CEC32700848E51 /* RTCPeerConnection.h */,
                                07221B7917CEC32700848E51 /* RTCPeerConnection.idl */,
                                5E5E2B101CFC3E4B000C0D85 /* RTCRtpTransceiver.cpp */,
                                5E5E2B111CFC3E4B000C0D85 /* RTCRtpTransceiver.h */,
                                5E5E2B121CFC3E4B000C0D85 /* RTCRtpTransceiver.idl */,
+                               316DCB161E78C330001B5F87 /* RTCRtpTransceiverDirection.h */,
+                               316DCB171E78C330001B5F87 /* RTCRtpTransceiverDirection.idl */,
                                07221B7A17CEC32700848E51 /* RTCSessionDescription.cpp */,
                                07221B7B17CEC32700848E51 /* RTCSessionDescription.h */,
                                07221B7C17CEC32700848E51 /* RTCSessionDescription.idl */,
                                0704A40A1D6DFC690086DCDB /* JSOverconstrainedError.h */,
                                0704A4131D6F39FB0086DCDB /* JSOverconstrainedErrorEvent.cpp */,
                                0704A4141D6F39FB0086DCDB /* JSOverconstrainedErrorEvent.h */,
+                               316DCB2D1E78F496001B5F87 /* JSRTCAnswerOptions.cpp */,
+                               316DCB2E1E78F496001B5F87 /* JSRTCAnswerOptions.h */,
                                073794E319EE2FF200E5A045 /* JSRTCConfiguration.cpp */,
                                073794E419EE2FF200E5A045 /* JSRTCConfiguration.h */,
                                07969D9117D14151007FF842 /* JSRTCDataChannel.cpp */,
                                07969D9E17D14151007FF842 /* JSRTCIceCandidateEvent.h */,
                                073794E919EE341E00E5A045 /* JSRTCIceServer.cpp */,
                                073794EA19EE341E00E5A045 /* JSRTCIceServer.h */,
+                               316DCB191E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp */,
+                               316DCB1A1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h */,
+                               316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */,
+                               316DCB301E78F496001B5F87 /* JSRTCOfferOptions.h */,
                                07969D9F17D14151007FF842 /* JSRTCPeerConnection.cpp */,
                                07969DA017D14151007FF842 /* JSRTCPeerConnection.h */,
                                5E2C436D1BCF0D690001E2BC /* JSRTCRtpReceiver.cpp */,
                                5E2C43701BCF0D690001E2BC /* JSRTCRtpSender.h */,
                                5E2C436D1BCF0D690001E2BD /* JSRTCRtpTransceiver.cpp */,
                                5E2C436E1BCF0D690001E2BD /* JSRTCRtpTransceiver.h */,
+                               316DCB1B1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.cpp */,
+                               316DCB1C1E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.h */,
                                07969DA117D14151007FF842 /* JSRTCSessionDescription.cpp */,
                                07969DA217D14151007FF842 /* JSRTCSessionDescription.h */,
                                07969DA717D14151007FF842 /* JSRTCStatsReport.cpp */,
                                E44613A50CD6331000FADA75 /* HTMLMediaElement.h in Headers */,
                                CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */,
                                C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */,
-                               0779BF0E18453168000B6AE7 /* HTMLMediaElementMediaStream.h in Headers */,
                                A8EA79F40A1916DF00A8EF5F /* HTMLMenuElement.h in Headers */,
                                2BE8E2C712A589EC00FAD550 /* HTMLMetaCharsetParser.h in Headers */,
                                A871DC240A15205700B12A68 /* HTMLMetaElement.h in Headers */,
                                5185FC8F1BB4C4E80012898F /* IDBGetResult.h in Headers */,
                                5185FC911BB4C4E80012898F /* IDBIndex.h in Headers */,
                                51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */,
+                               316DCB201E78CA55001B5F87 /* JSRTCOfferAnswerOptions.h in Headers */,
                                51E269371DD3BD9B006B6A58 /* IDBIterateCursorData.h in Headers */,
                                5185FC951BB4C4E80012898F /* IDBKey.h in Headers */,
                                5185FC971BB4C4E80012898F /* IDBKeyData.h in Headers */,
                                FDA15EA212B03EE1003A583A /* JSChannelMergerNode.h in Headers */,
                                FDA15EA412B03EE1003A583A /* JSChannelSplitterNode.h in Headers */,
                                65DF31F409D1CC60000BE325 /* JSCharacterData.h in Headers */,
+                               316DCB221E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.h in Headers */,
                                BCC065880F3CE2A700CD2D87 /* JSClientRect.h in Headers */,
                                BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */,
                                836D03321DA8A14200FFD96B /* JSClipboardEvent.h in Headers */,
                                946D374D1D6D08A60077084F /* CSSParserTokenRange.cpp in Sources */,
                                9418278E1D8CAF9200492764 /* CSSPendingSubstitutionValue.cpp in Sources */,
                                977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */,
+                               316DCB1F1E78CA55001B5F87 /* JSRTCOfferAnswerOptions.cpp in Sources */,
                                A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
                                A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
                                78D02BC5154A18DF00B62D05 /* CSSPropertyAnimation.cpp in Sources */,
                                515BE1911D54F5FB00DD7C68 /* GamepadProvider.cpp in Sources */,
                                1432E8490C51493F00B1500F /* GCController.cpp in Sources */,
                                4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */,
+                               316DCB211E78CA55001B5F87 /* JSRTCRtpTransceiverDirection.cpp in Sources */,
                                830030F51B7D33B500ED3AAC /* GenericCachedHTMLCollection.cpp in Sources */,
                                0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */,
                                CD4BE52A1CE136EF009D87DA /* GenericTaskQueue.cpp in Sources */,
                                E51A81DF17298D7700BFCA61 /* JSPerformance.cpp in Sources */,
                                CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */,
                                CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */,
+                               316DCB311E78FB6C001B5F87 /* JSRTCAnswerOptions.cpp in Sources */,
                                A58C59D01E382EAC0047859C /* JSPerformanceMark.cpp in Sources */,
                                A58C59D21E382EB00047859C /* JSPerformanceMeasure.cpp in Sources */,
                                8A9A587011E84C36008ACFD1 /* JSPerformanceNavigation.cpp in Sources */,
                                A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
                                E18772F1126E2629003DD586 /* Language.cpp in Sources */,
                                2917B5611473496C0052C9D0 /* LayerFlushScheduler.cpp in Sources */,
+                               316DCB321E78FB70001B5F87 /* JSRTCOfferOptions.cpp in Sources */,
                                2917B566147349950052C9D0 /* LayerFlushSchedulerMac.cpp in Sources */,
                                7AA3A69F194B59B6001CBD24 /* LayerPool.cpp in Sources */,
                                0F36E7371BD1837A002DB891 /* LayoutPoint.cpp in Sources */,