Clean up RTCSdpType, RTC enums and headers
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Mar 2017 07:50:04 +0000 (07:50 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Mar 2017 07:50:04 +0000 (07:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169741

Reviewed by Youenn Fablet.

Convert to RTCSdpType.
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/MediaEndpointSessionDescription.cpp:
* Modules/mediastream/MediaEndpointSessionDescription.h:
* Modules/mediastream/PeerConnectionBackend.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

Convert SDP argument to lvalue.
* Modules/mediastream/RTCSessionDescription.cpp:
* Modules/mediastream/RTCSessionDescription.h:
* Modules/mediastream/RTCSessionDescription.idl:

Keep RTC enum IDLs above platform. Move the C++ enum headers into platform.
* Modules/mediastream/RTCEnums.h: Removed.
* Modules/mediastream/RTCIceConnectionState.h: Removed.
* Modules/mediastream/RTCIceGatheringState.h: Removed.
* Modules/mediastream/RTCIceTransportState.h: Removed.
* Modules/mediastream/RTCSignalingState.h: Removed.
* platform/mediastream/PeerConnectionStates.h: Remove from .xcodeproj. Move enums to separate headers.
* platform/mediastream/RTCBundlePolicy.h:
* platform/mediastream/RTCIceConnectionState.h:
* platform/mediastream/RTCIceGatheringState.h:
* platform/mediastream/RTCIceTransportPolicy.h:
* platform/mediastream/RTCIceTransportState.h:
* platform/mediastream/RTCRtpTransceiverDirection.h: Renamed from Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h.
* platform/mediastream/RTCSdpType.h:
* platform/mediastream/RTCSignalingState.h:

Move RtpTransceiverDirection out to a separate IDL.
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCRtpTransceiver.cpp:
* Modules/mediastream/RTCRtpTransceiver.h:
* WebCore.xcodeproj/project.pbxproj:

Replace RTCEnums include with specific headers per enum.
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCConfiguration.h:
* Modules/mediastream/RTCIceTransport.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::completeAddTransceiver): Remove unneeded static_cast.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpTransceiver.h:
* platform/mediastream/MediaEndpoint.h:
* platform/mediastream/MediaEndpointConfiguration.h:
* platform/mock/MockMediaEndpoint.h:

Clean up license.
* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

Modernize header to use #pragma once.
* platform/mediastream/RTCDTMFSenderHandler.h:
* platform/mediastream/RTCDTMFSenderHandlerClient.h:
* platform/mediastream/RTCIceCandidateDescriptor.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mediastream/RTCSessionDescriptionDescriptor.h:
* platform/mediastream/RTCSessionDescriptionRequest.h:
* platform/mediastream/RTCVoidRequest.h:
* platform/mock/RTCNotifiersMock.h:

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

47 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h
Source/WebCore/Modules/mediastream/MediaEndpointSessionDescription.cpp
Source/WebCore/Modules/mediastream/MediaEndpointSessionDescription.h
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCConfiguration.h
Source/WebCore/Modules/mediastream/RTCEnums.h [deleted file]
Source/WebCore/Modules/mediastream/RTCIceConnectionState.h [deleted file]
Source/WebCore/Modules/mediastream/RTCIceGatheringState.h [deleted file]
Source/WebCore/Modules/mediastream/RTCIceTransport.h
Source/WebCore/Modules/mediastream/RTCIceTransportState.h [deleted file]
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.cpp
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h
Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp
Source/WebCore/Modules/mediastream/RTCSessionDescription.h
Source/WebCore/Modules/mediastream/RTCSessionDescription.idl
Source/WebCore/Modules/mediastream/RTCSignalingState.h [deleted file]
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/MediaEndpoint.h
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h
Source/WebCore/platform/mediastream/PeerConnectionStates.h
Source/WebCore/platform/mediastream/RTCBundlePolicy.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCDTMFSenderHandler.h
Source/WebCore/platform/mediastream/RTCDTMFSenderHandlerClient.h
Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h
Source/WebCore/platform/mediastream/RTCIceConnectionState.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCIceGatheringState.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCIceTransportPolicy.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCIceTransportState.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h
Source/WebCore/platform/mediastream/RTCRtpTransceiverDirection.h [moved from Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h with 100% similarity]
Source/WebCore/platform/mediastream/RTCSdpType.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h
Source/WebCore/platform/mediastream/RTCSessionDescriptionRequest.h
Source/WebCore/platform/mediastream/RTCSignalingState.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCVoidRequest.h
Source/WebCore/platform/mock/MockMediaEndpoint.h
Source/WebCore/platform/mock/RTCNotifiersMock.h

index 6053c68..ae71b28 100644 (file)
@@ -1,3 +1,72 @@
+2017-03-21  Jon Lee  <jonlee@apple.com>
+
+        Clean up RTCSdpType, RTC enums and headers
+        https://bugs.webkit.org/show_bug.cgi?id=169741
+
+        Reviewed by Youenn Fablet.
+
+        Convert to RTCSdpType.
+        * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+        * Modules/mediastream/MediaEndpointPeerConnection.h:
+        * Modules/mediastream/MediaEndpointSessionDescription.cpp:
+        * Modules/mediastream/MediaEndpointSessionDescription.h:
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+
+        Convert SDP argument to lvalue.
+        * Modules/mediastream/RTCSessionDescription.cpp:
+        * Modules/mediastream/RTCSessionDescription.h:
+        * Modules/mediastream/RTCSessionDescription.idl:
+
+        Keep RTC enum IDLs above platform. Move the C++ enum headers into platform.
+        * Modules/mediastream/RTCEnums.h: Removed.
+        * Modules/mediastream/RTCIceConnectionState.h: Removed.
+        * Modules/mediastream/RTCIceGatheringState.h: Removed.
+        * Modules/mediastream/RTCIceTransportState.h: Removed.
+        * Modules/mediastream/RTCSignalingState.h: Removed.
+        * platform/mediastream/PeerConnectionStates.h: Remove from .xcodeproj. Move enums to separate headers.
+        * platform/mediastream/RTCBundlePolicy.h:
+        * platform/mediastream/RTCIceConnectionState.h:
+        * platform/mediastream/RTCIceGatheringState.h:
+        * platform/mediastream/RTCIceTransportPolicy.h:
+        * platform/mediastream/RTCIceTransportState.h:
+        * platform/mediastream/RTCRtpTransceiverDirection.h: Renamed from Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h.
+        * platform/mediastream/RTCSdpType.h:
+        * platform/mediastream/RTCSignalingState.h:
+
+        Move RtpTransceiverDirection out to a separate IDL.
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/mediastream/RTCRtpTransceiver.cpp:
+        * Modules/mediastream/RTCRtpTransceiver.h:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        Replace RTCEnums include with specific headers per enum.
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCConfiguration.h:
+        * Modules/mediastream/RTCIceTransport.h:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::completeAddTransceiver): Remove unneeded static_cast.
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCRtpTransceiver.h:
+        * platform/mediastream/MediaEndpoint.h:
+        * platform/mediastream/MediaEndpointConfiguration.h:
+        * platform/mock/MockMediaEndpoint.h:
+
+        Clean up license.
+        * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
+
+        Modernize header to use #pragma once.
+        * platform/mediastream/RTCDTMFSenderHandler.h:
+        * platform/mediastream/RTCDTMFSenderHandlerClient.h:
+        * platform/mediastream/RTCIceCandidateDescriptor.h:
+        * platform/mediastream/RTCPeerConnectionHandlerClient.h:
+        * platform/mediastream/RTCSessionDescriptionDescriptor.h:
+        * platform/mediastream/RTCSessionDescriptionRequest.h:
+        * platform/mediastream/RTCVoidRequest.h:
+        * platform/mock/RTCNotifiersMock.h:
+
 2017-03-20  Jon Lee  <jonlee@apple.com>
 
         Add iceCandidatePoolSize to RTCConfiguration
index 7465779..8168eed 100644 (file)
@@ -345,7 +345,7 @@ void MediaEndpointPeerConnection::setLocalDescriptionTask(RefPtr<RTCSessionDescr
     MediaEndpointSessionDescription* localDescription = internalLocalDescription();
     unsigned previousNumberOfMediaDescriptions = localDescription ? localDescription->configuration()->mediaDescriptions().size() : 0;
     bool hasNewMediaDescriptions = mediaDescriptions.size() > previousNumberOfMediaDescriptions;
-    bool isInitiator = newDescription->type() == RTCSessionDescription::SdpType::Offer;
+    bool isInitiator = newDescription->type() == RTCSdpType::Offer;
 
     if (hasNewMediaDescriptions) {
         MediaEndpoint::UpdateResult result = m_mediaEndpoint->updateReceiveConfiguration(newDescription->configuration(), isInitiator);
@@ -392,12 +392,12 @@ void MediaEndpointPeerConnection::setLocalDescriptionTask(RefPtr<RTCSessionDescr
 
     // Update state and local descriptions according to setLocal/RemoteDescription processing model
     switch (newDescription->type()) {
-    case RTCSessionDescription::SdpType::Offer:
+    case RTCSdpType::Offer:
         m_pendingLocalDescription = WTFMove(newDescription);
         newSignalingState = RTCSignalingState::HaveLocalOffer;
         break;
 
-    case RTCSessionDescription::SdpType::Answer:
+    case RTCSdpType::Answer:
         m_currentLocalDescription = WTFMove(newDescription);
         m_currentRemoteDescription = m_pendingRemoteDescription;
         m_pendingLocalDescription = nullptr;
@@ -405,12 +405,12 @@ void MediaEndpointPeerConnection::setLocalDescriptionTask(RefPtr<RTCSessionDescr
         newSignalingState = RTCSignalingState::Stable;
         break;
 
-    case RTCSessionDescription::SdpType::Rollback:
+    case RTCSdpType::Rollback:
         m_pendingLocalDescription = nullptr;
         newSignalingState = RTCSignalingState::Stable;
         break;
 
-    case RTCSessionDescription::SdpType::Pranswer:
+    case RTCSdpType::Pranswer:
         m_pendingLocalDescription = WTFMove(newDescription);
         newSignalingState = RTCSignalingState::HaveLocalPranswer;
         break;
@@ -464,7 +464,7 @@ void MediaEndpointPeerConnection::setRemoteDescriptionTask(RefPtr<RTCSessionDesc
         mediaDescription.payloads = m_mediaEndpoint->filterPayloads(mediaDescription.payloads, mediaDescription.type == "audio" ? m_defaultAudioPayloads : m_defaultVideoPayloads);
     }
 
-    bool isInitiator = newDescription->type() == RTCSessionDescription::SdpType::Answer;
+    bool isInitiator = newDescription->type() == RTCSdpType::Answer;
     const RtpTransceiverVector& transceivers = m_peerConnection.getTransceivers();
 
     RealtimeMediaSourceMap sendSourceMap;
@@ -556,12 +556,12 @@ void MediaEndpointPeerConnection::setRemoteDescriptionTask(RefPtr<RTCSessionDesc
 
     // Update state and local descriptions according to setLocal/RemoteDescription processing model
     switch (newDescription->type()) {
-    case RTCSessionDescription::SdpType::Offer:
+    case RTCSdpType::Offer:
         m_pendingRemoteDescription = WTFMove(newDescription);
         newSignalingState = RTCSignalingState::HaveRemoteOffer;
         break;
 
-    case RTCSessionDescription::SdpType::Answer:
+    case RTCSdpType::Answer:
         m_currentRemoteDescription = WTFMove(newDescription);
         m_currentLocalDescription = m_pendingLocalDescription;
         m_pendingRemoteDescription = nullptr;
@@ -569,12 +569,12 @@ void MediaEndpointPeerConnection::setRemoteDescriptionTask(RefPtr<RTCSessionDesc
         newSignalingState = RTCSignalingState::Stable;
         break;
 
-    case RTCSessionDescription::SdpType::Rollback:
+    case RTCSdpType::Rollback:
         m_pendingRemoteDescription = nullptr;
         newSignalingState = RTCSignalingState::Stable;
         break;
 
-    case RTCSessionDescription::SdpType::Pranswer:
+    case RTCSdpType::Pranswer:
         m_pendingRemoteDescription = WTFMove(newDescription);
         newSignalingState = RTCSignalingState::HaveRemotePranswer;
         break;
index 302e5cf..ce7ec3e 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "MediaEndpoint.h"
 #include "PeerConnectionBackend.h"
-#include "RTCEnums.h"
 #include "RTCSessionDescription.h"
 #include <wtf/Function.h>
 
@@ -88,8 +87,8 @@ private:
 
     void replaceTrackTask(RTCRtpSender&, const String& mid, Ref<MediaStreamTrack>&&, DOMPromise<void>&);
 
-    bool localDescriptionTypeValidForState(RTCSessionDescription::SdpType) const;
-    bool remoteDescriptionTypeValidForState(RTCSessionDescription::SdpType) const;
+    bool localDescriptionTypeValidForState(RTCSdpType) const;
+    bool remoteDescriptionTypeValidForState(RTCSdpType) const;
 
     MediaEndpointSessionDescription* internalLocalDescription() const;
     MediaEndpointSessionDescription* internalRemoteDescription() const;
index ac5b2f0..dfff8cf 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
@@ -51,7 +52,7 @@ STRING_FUNCTION(pranswer)
 STRING_FUNCTION(answer)
 STRING_FUNCTION(rollback)
 
-Ref<MediaEndpointSessionDescription> MediaEndpointSessionDescription::create(RTCSessionDescription::SdpType type, RefPtr<MediaEndpointSessionConfiguration>&& configuration)
+Ref<MediaEndpointSessionDescription> MediaEndpointSessionDescription::create(RTCSdpType type, RefPtr<MediaEndpointSessionConfiguration>&& configuration)
 {
     return adoptRef(*new MediaEndpointSessionDescription(type, WTFMove(configuration), nullptr));
 }
@@ -86,19 +87,20 @@ RefPtr<RTCSessionDescription> MediaEndpointSessionDescription::toRTCSessionDescr
         return m_rtcDescription;
     }
 
-    return RTCSessionDescription::create(m_type, sdpString);
+    return RTCSessionDescription::create(m_type, WTFMove(sdpString));
 }
 
+// FIXME: unify with LibWebRTCMediaEndpoint sessionDescriptionType().
 const String& MediaEndpointSessionDescription::typeString() const
 {
     switch (m_type) {
-    case RTCSessionDescription::SdpType::Offer:
+    case RTCSdpType::Offer:
         return offerString();
-    case RTCSessionDescription::SdpType::Pranswer:
+    case RTCSdpType::Pranswer:
         return pranswerString();
-    case RTCSessionDescription::SdpType::Answer:
+    case RTCSdpType::Answer:
         return answerString();
-    case RTCSessionDescription::SdpType::Rollback:
+    case RTCSdpType::Rollback:
         return rollbackString();
     }
 
index 60316ce..abd3e5b 100644 (file)
@@ -45,26 +45,26 @@ class DOMError;
 
 class MediaEndpointSessionDescription : public RefCounted<MediaEndpointSessionDescription> {
 public:
-    static Ref<MediaEndpointSessionDescription> create(RTCSessionDescription::SdpType, RefPtr<MediaEndpointSessionConfiguration>&&);
+    static Ref<MediaEndpointSessionDescription> create(RTCSdpType, RefPtr<MediaEndpointSessionConfiguration>&&);
     static ExceptionOr<Ref<MediaEndpointSessionDescription>> create(RefPtr<RTCSessionDescription>&&, const SDPProcessor&);
     virtual ~MediaEndpointSessionDescription() { } // FIXME: Why is this virtual? There are no other virtual functions in this class.
 
     RefPtr<RTCSessionDescription> toRTCSessionDescription(const SDPProcessor&) const;
 
-    RTCSessionDescription::SdpType type() const { return m_type; }
+    RTCSdpType type() const { return m_type; }
     const String& typeString() const;
     MediaEndpointSessionConfiguration* configuration() const { return m_configuration.get(); }
 
     bool isLaterThan(MediaEndpointSessionDescription* other) const;
 
 private:
-    MediaEndpointSessionDescription(RTCSessionDescription::SdpType type, RefPtr<MediaEndpointSessionConfiguration>&& configuration, RefPtr<RTCSessionDescription>&& rtcDescription)
+    MediaEndpointSessionDescription(RTCSdpType type, RefPtr<MediaEndpointSessionConfiguration>&& configuration, RefPtr<RTCSessionDescription>&& rtcDescription)
         : m_type(type)
         , m_configuration(configuration)
         , m_rtcDescription(WTFMove(rtcDescription))
     { }
 
-    RTCSessionDescription::SdpType m_type;
+    RTCSdpType m_type;
     RefPtr<MediaEndpointSessionConfiguration> m_configuration;
 
     RefPtr<RTCSessionDescription> m_rtcDescription;
index 4e25f8f..bebc6de 100644 (file)
@@ -60,7 +60,7 @@ void PeerConnectionBackend::createOfferSucceeded(String&& sdp)
         return;
 
     ASSERT(m_offerAnswerPromise);
-    m_offerAnswerPromise->resolve(RTCSessionDescription::create(RTCSessionDescription::SdpType::Offer, WTFMove(sdp)));
+    m_offerAnswerPromise->resolve(RTCSessionDescription::create(RTCSdpType::Offer, WTFMove(sdp)));
     m_offerAnswerPromise = std::nullopt;
 }
 
@@ -93,7 +93,7 @@ void PeerConnectionBackend::createAnswerSucceeded(String&& sdp)
         return;
 
     ASSERT(m_offerAnswerPromise);
-    m_offerAnswerPromise->resolve(RTCSessionDescription::create(RTCSessionDescription::SdpType::Answer, WTFMove(sdp)));
+    m_offerAnswerPromise->resolve(RTCSessionDescription::create(RTCSdpType::Answer, WTFMove(sdp)));
     m_offerAnswerPromise = std::nullopt;
 }
 
@@ -109,17 +109,17 @@ void PeerConnectionBackend::createAnswerFailed(Exception&& exception)
     m_offerAnswerPromise = std::nullopt;
 }
 
-static inline bool isLocalDescriptionTypeValidForState(RTCSessionDescription::SdpType type, RTCSignalingState state)
+static inline bool isLocalDescriptionTypeValidForState(RTCSdpType type, RTCSignalingState state)
 {
     switch (state) {
     case RTCSignalingState::Stable:
-        return type == RTCSessionDescription::SdpType::Offer;
+        return type == RTCSdpType::Offer;
     case RTCSignalingState::HaveLocalOffer:
-        return type == RTCSessionDescription::SdpType::Offer;
+        return type == RTCSdpType::Offer;
     case RTCSignalingState::HaveRemoteOffer:
-        return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer;
+        return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;
     case RTCSignalingState::HaveLocalPranswer:
-        return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer;
+        return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;
     default:
         return false;
     };
@@ -167,17 +167,17 @@ void PeerConnectionBackend::setLocalDescriptionFailed(Exception&& exception)
     m_setDescriptionPromise = std::nullopt;
 }
 
-static inline bool isRemoteDescriptionTypeValidForState(RTCSessionDescription::SdpType type, RTCSignalingState state)
+static inline bool isRemoteDescriptionTypeValidForState(RTCSdpType type, RTCSignalingState state)
 {
     switch (state) {
     case RTCSignalingState::Stable:
-        return type == RTCSessionDescription::SdpType::Offer;
+        return type == RTCSdpType::Offer;
     case RTCSignalingState::HaveLocalOffer:
-        return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer;
+        return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;
     case RTCSignalingState::HaveRemoteOffer:
-        return type == RTCSessionDescription::SdpType::Offer;
+        return type == RTCSdpType::Offer;
     case RTCSignalingState::HaveRemotePranswer:
-        return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer;
+        return type == RTCSdpType::Answer || type == RTCSdpType::Pranswer;
     default:
         return false;
     };
index f273092..eb343ab 100644 (file)
@@ -34,7 +34,7 @@
 #if ENABLE(WEB_RTC)
 
 #include "JSDOMPromise.h"
-#include "RTCEnums.h"
+#include "RTCSignalingState.h"
 
 namespace WebCore {
 
index 8552eec..19033c8 100644 (file)
@@ -33,8 +33,9 @@
 
 #if ENABLE(WEB_RTC)
 
-#include "RTCEnums.h"
+#include "RTCBundlePolicy.h"
 #include "RTCIceServer.h"
+#include "RTCIceTransportPolicy.h"
 
 namespace WebCore {
 
diff --git a/Source/WebCore/Modules/mediastream/RTCEnums.h b/Source/WebCore/Modules/mediastream/RTCEnums.h
deleted file mode 100644 (file)
index e3e8d9a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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"
diff --git a/Source/WebCore/Modules/mediastream/RTCIceConnectionState.h b/Source/WebCore/Modules/mediastream/RTCIceConnectionState.h
deleted file mode 100644 (file)
index d782702..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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/RTCIceGatheringState.h b/Source/WebCore/Modules/mediastream/RTCIceGatheringState.h
deleted file mode 100644 (file)
index d782702..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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"
index 81b080a..6139f47 100644 (file)
@@ -33,7 +33,8 @@
 
 #if ENABLE(WEB_RTC)
 
-#include "RTCEnums.h"
+#include "RTCIceGatheringState.h"
+#include "RTCIceTransportState.h"
 #include "ScriptWrappable.h"
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
diff --git a/Source/WebCore/Modules/mediastream/RTCIceTransportState.h b/Source/WebCore/Modules/mediastream/RTCIceTransportState.h
deleted file mode 100644 (file)
index d782702..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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"
index 6d69ac1..74091ad 100644 (file)
@@ -211,7 +211,7 @@ ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(const Stri
 
 void RTCPeerConnection::completeAddTransceiver(RTCRtpTransceiver& transceiver, const RTCRtpTransceiverInit& init)
 {
-    transceiver.setDirection(static_cast<RTCRtpTransceiver::Direction>(init.direction));
+    transceiver.setDirection(init.direction);
 
     m_transceiverSet->append(transceiver);
     m_backend->markAsNeedingNegotiation();
index 3780f38..eb1f6d8 100644 (file)
 #include "MediaStream.h"
 #include "RTCConfiguration.h"
 #include "RTCDataChannel.h"
-#include "RTCEnums.h"
+#include "RTCIceConnectionState.h"
+#include "RTCIceGatheringState.h"
 #include "RTCRtpTransceiver.h"
+#include "RTCSignalingState.h"
 
 namespace WebCore {
 
index 7b48b2f..0acada2 100644 (file)
@@ -31,6 +31,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+typedef RTCRtpTransceiverDirection RtpTransceiverDirection;
+
 [
     Conditional=WEB_RTC,
     EnabledAtRuntime=PeerConnection
@@ -50,7 +52,7 @@
     EnabledAtRuntime=PeerConnection,
     ImplementedAs=RTCRtpTransceiverInit
 ] dictionary RTCRtpTransceiverInit {
-    RTCRtpTransceiverDirection direction = "sendrecv";
+    RtpTransceiverDirection direction = "sendrecv";
     // FIXME 169662: missing streams
     // FIXME 169662: missing sendEncodings
 };
index 733db7b..9029afc 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
@@ -56,7 +57,7 @@ String RTCRtpTransceiver::getNextMid()
 }
 
 RTCRtpTransceiver::RTCRtpTransceiver(Ref<RTCRtpSender>&& sender, Ref<RTCRtpReceiver>&& receiver)
-    : m_direction(Direction::Sendrecv)
+    : m_direction(RTCRtpTransceiverDirection::Sendrecv)
     , m_sender(WTFMove(sender))
     , m_receiver(WTFMove(receiver))
     , m_iceTransport(RTCIceTransport::create())
@@ -66,10 +67,14 @@ RTCRtpTransceiver::RTCRtpTransceiver(Ref<RTCRtpSender>&& sender, Ref<RTCRtpRecei
 const String& RTCRtpTransceiver::directionString() const
 {
     switch (m_direction) {
-    case Direction::Sendrecv: return sendrecvString();
-    case Direction::Sendonly: return sendonlyString();
-    case Direction::Recvonly: return recvonlyString();
-    case Direction::Inactive: return inactiveString();
+    case RTCRtpTransceiverDirection::Sendrecv:
+        return sendrecvString();
+    case RTCRtpTransceiverDirection::Sendonly:
+        return sendonlyString();
+    case RTCRtpTransceiverDirection::Recvonly:
+        return recvonlyString();
+    case RTCRtpTransceiverDirection::Inactive:
+        return inactiveString();
     }
 
     ASSERT_NOT_REACHED();
@@ -78,23 +83,23 @@ const String& RTCRtpTransceiver::directionString() const
 
 bool RTCRtpTransceiver::hasSendingDirection() const
 {
-    return m_direction == Direction::Sendrecv || m_direction == Direction::Sendonly;
+    return m_direction == RTCRtpTransceiverDirection::Sendrecv || m_direction == RTCRtpTransceiverDirection::Sendonly;
 }
 
 void RTCRtpTransceiver::enableSendingDirection()
 {
-    if (m_direction == Direction::Recvonly)
-        m_direction = Direction::Sendrecv;
-    else if (m_direction == Direction::Inactive)
-        m_direction = Direction::Sendonly;
+    if (m_direction == RTCRtpTransceiverDirection::Recvonly)
+        m_direction = RTCRtpTransceiverDirection::Sendrecv;
+    else if (m_direction == RTCRtpTransceiverDirection::Inactive)
+        m_direction = RTCRtpTransceiverDirection::Sendonly;
 }
 
 void RTCRtpTransceiver::disableSendingDirection()
 {
-    if (m_direction == Direction::Sendrecv)
-        m_direction = Direction::Recvonly;
-    else if (m_direction == Direction::Sendonly)
-        m_direction = Direction::Inactive;
+    if (m_direction == RTCRtpTransceiverDirection::Sendrecv)
+        m_direction = RTCRtpTransceiverDirection::Recvonly;
+    else if (m_direction == RTCRtpTransceiverDirection::Sendonly)
+        m_direction = RTCRtpTransceiverDirection::Inactive;
 }
 
 void RtpTransceiverSet::append(Ref<RTCRtpTransceiver>&& transceiver)
index 94f5c69..0b5fa6d 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
 
 #if ENABLE(WEB_RTC)
 
-#include "RTCEnums.h"
 #include "RTCIceTransport.h"
 #include "RTCRtpReceiver.h"
 #include "RTCRtpSender.h"
+#include "RTCRtpTransceiverDirection.h"
 #include "ScriptWrappable.h"
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -45,9 +46,6 @@ namespace WebCore {
 
 class RTCRtpTransceiver : public RefCounted<RTCRtpTransceiver>, public ScriptWrappable {
 public:
-    // This enum is mirrored in RTCPeerConnection.h
-    using Direction = RTCRtpTransceiverDirection;
-
     static Ref<RTCRtpTransceiver> create(Ref<RTCRtpSender>&& sender, Ref<RTCRtpReceiver>&& receiver) { return adoptRef(*new RTCRtpTransceiver(WTFMove(sender), WTFMove(receiver))); }
     virtual ~RTCRtpTransceiver() { }
 
@@ -56,8 +54,8 @@ public:
     void disableSendingDirection();
 
     const String& directionString() const;
-    Direction direction() const { return m_direction; }
-    void setDirection(Direction direction) { m_direction = direction; }
+    RTCRtpTransceiverDirection direction() const { return m_direction; }
+    void setDirection(RTCRtpTransceiverDirection direction) { m_direction = direction; }
 
     const String& provisionalMid() const { return m_provisionalMid; }
     void setProvisionalMid(const String& provisionalMid) { m_provisionalMid = provisionalMid; }
@@ -84,7 +82,7 @@ private:
     String m_provisionalMid;
     String m_mid;
 
-    Direction m_direction;
+    RTCRtpTransceiverDirection m_direction;
 
     Ref<RTCRtpSender> m_sender;
     Ref<RTCRtpReceiver> m_receiver;
index 4dab063..dd4fff4 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
 
 namespace WebCore {
 
-inline RTCSessionDescription::RTCSessionDescription(SdpType type, const String& sdp)
+inline RTCSessionDescription::RTCSessionDescription(RTCSdpType type, String&& sdp)
     : m_type(type)
-    , m_sdp(sdp)
+    , m_sdp(WTFMove(sdp))
 {
 }
 
-Ref<RTCSessionDescription> RTCSessionDescription::create(const Init& dictionary)
+Ref<RTCSessionDescription> RTCSessionDescription::create(Init&& dictionary)
 {
-    return create(dictionary.type, dictionary.sdp);
+    return create(dictionary.type, WTFMove(dictionary.sdp));
 }
 
-Ref<RTCSessionDescription> RTCSessionDescription::create(SdpType type, const String& sdp)
+Ref<RTCSessionDescription> RTCSessionDescription::create(RTCSdpType type, String&& sdp)
 {
-    return adoptRef(*new RTCSessionDescription(type, sdp));
+    return adoptRef(*new RTCSessionDescription(type, WTFMove(sdp)));
 }
 
 } // namespace WebCore
index df3fc6b..41d4537 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
 #if ENABLE(WEB_RTC)
 
 #include "ExceptionOr.h"
+#include "RTCSdpType.h"
 #include "ScriptWrappable.h"
 
 namespace WebCore {
 
 class RTCSessionDescription : public RefCounted<RTCSessionDescription>, public ScriptWrappable {
 public:
-    enum class SdpType { Offer, Pranswer, Answer, Rollback };
 
     struct Init {
-        SdpType type;
+        RTCSdpType type;
         String sdp;
     };
-    static Ref<RTCSessionDescription> create(const Init&);
-    static Ref<RTCSessionDescription> create(SdpType, const String& sdp);
+    static Ref<RTCSessionDescription> create(Init&&);
+    static Ref<RTCSessionDescription> create(RTCSdpType, String&& sdp);
 
-    SdpType type() const { return m_type; }
+    RTCSdpType type() const { return m_type; }
 
     const String& sdp() const { return m_sdp; }
     void setSdp(const String& sdp) { m_sdp = sdp; }
 
 private:
-    explicit RTCSessionDescription(SdpType, const String& sdp);
+    RTCSessionDescription(RTCSdpType, String&& sdp);
 
-    SdpType m_type;
+    RTCSdpType m_type;
     String m_sdp;
 };
 
index 27c6571..7dec946 100644 (file)
 
 [
     Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
+    ImplementedAs=RTCSdpType
+] enum RTCSdpType {
+    "offer",
+    "pranswer",
+    "answer",
+    "rollback"
+};
+
+[
+    Conditional=WEB_RTC,
     Constructor(RTCSessionDescriptionInit descriptionInitDict),
     EnabledAtRuntime=PeerConnection,
     ImplementationLacksVTable,
@@ -43,8 +54,6 @@
     serializer = {type, sdp};
 };
 
-enum RTCSdpType { "offer", "pranswer", "answer", "rollback" };
-
 dictionary RTCSessionDescriptionInit {
     required RTCSdpType type;
     DOMString sdp = "";
diff --git a/Source/WebCore/Modules/mediastream/RTCSignalingState.h b/Source/WebCore/Modules/mediastream/RTCSignalingState.h
deleted file mode 100644 (file)
index d782702..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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"
index 7cc3502..14b9244 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.
+ * 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
index cd74f67..d43b8b7 100644 (file)
@@ -38,7 +38,6 @@
 #include "PlatformStrategies.h"
 #include "RTCDataChannel.h"
 #include "RTCDataChannelEvent.h"
-#include "RTCEnums.h"
 #include "RTCPeerConnection.h"
 #include "RTCSessionDescription.h"
 #include "RTCStatsReport.h"
@@ -66,29 +65,30 @@ LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint(LibWebRTCPeerConnectionBackend& p
     ASSERT(m_backend);
 }
 
-static inline const char* sessionDescriptionType(RTCSessionDescription::SdpType sdpType)
+// FIXME: unify with MediaEndpointSessionDescription::typeString()
+static inline const char* sessionDescriptionType(RTCSdpType sdpType)
 {
     switch (sdpType) {
-    case RTCSessionDescription::SdpType::Offer:
+    case RTCSdpType::Offer:
         return "offer";
-    case RTCSessionDescription::SdpType::Pranswer:
+    case RTCSdpType::Pranswer:
         return "pranswer";
-    case RTCSessionDescription::SdpType::Answer:
+    case RTCSdpType::Answer:
         return "answer";
-    case RTCSessionDescription::SdpType::Rollback:
+    case RTCSdpType::Rollback:
         return "rollback";
     }
 }
 
-static inline RTCSessionDescription::SdpType fromSessionDescriptionType(const webrtc::SessionDescriptionInterface& description)
+static inline RTCSdpType fromSessionDescriptionType(const webrtc::SessionDescriptionInterface& description)
 {
     auto type = description.type();
     if (type == webrtc::SessionDescriptionInterface::kOffer)
-        return RTCSessionDescription::SdpType::Offer;
+        return RTCSdpType::Offer;
     if (type == webrtc::SessionDescriptionInterface::kAnswer)
-        return RTCSessionDescription::SdpType::Answer;
+        return RTCSdpType::Answer;
     ASSERT(type == webrtc::SessionDescriptionInterface::kPrAnswer);
-    return RTCSessionDescription::SdpType::Pranswer;
+    return RTCSdpType::Pranswer;
 }
 
 static inline RefPtr<RTCSessionDescription> fromSessionDescription(const webrtc::SessionDescriptionInterface* description)
index 4355924..2baa35d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.
+ * 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
index 2598639..85426cc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.
+ * 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
index b43dfa1..a689ed6 100644 (file)
                312C0C41146DC6CC0016C911 /* Notification.h in Headers */ = {isa = PBXBuildFile; fileRef = 333F704F0FB49CA2008E12A6 /* Notification.h */; settings = {ATTRIBUTES = (Private, ); }; };
                31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
                31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
+               313591061E7DDC7300F30630 /* RTCIceConnectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591001E7DDC6000F30630 /* RTCIceConnectionState.h */; };
+               313591071E7DDC7300F30630 /* RTCIceGatheringState.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591011E7DDC6000F30630 /* RTCIceGatheringState.h */; };
+               313591081E7DDC7300F30630 /* RTCIceTransportPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591021E7DDC6000F30630 /* RTCIceTransportPolicy.h */; };
+               313591091E7DDC7300F30630 /* RTCIceTransportState.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591031E7DDC6000F30630 /* RTCIceTransportState.h */; };
+               3135910A1E7DDC7300F30630 /* RTCSdpType.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591041E7DDC6000F30630 /* RTCSdpType.h */; };
+               3135910B1E7DDC7300F30630 /* RTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591051E7DDC6000F30630 /* RTCSignalingState.h */; };
                3140379B124BEA7F00AF40E4 /* WebCoreMotionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */; };
                3140379C124BEA7F00AF40E4 /* WebCoreMotionManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31403798124BEA7F00AF40E4 /* WebCoreMotionManager.mm */; };
                3140379D124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403799124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h */; };
                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 */; };
-               316DCB371E790E1B001B5F87 /* RTCIceGatheringState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */; };
-               316DCB3D1E790E2C001B5F87 /* RTCIceConnectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */; };
-               316DCB431E790E3C001B5F87 /* RTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB401E790E3C001B5F87 /* RTCSignalingState.h */; };
                316DCB4B1E7910A6001B5F87 /* JSRTCIceConnectionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB451E7910A6001B5F87 /* JSRTCIceConnectionState.cpp */; };
                316DCB4C1E7910A6001B5F87 /* JSRTCIceConnectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB461E7910A6001B5F87 /* JSRTCIceConnectionState.h */; };
                316DCB4D1E7910A6001B5F87 /* JSRTCIceGatheringState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB471E7910A6001B5F87 /* JSRTCIceGatheringState.cpp */; };
                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 */; };
                31DF63571AF187DD0078FD91 /* NSColorSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DF63561AF187DD0078FD91 /* NSColorSPI.h */; };
                31EAF97E121435A400E7C1BF /* DeviceMotionClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EAF97C121435A400E7C1BF /* DeviceMotionClientIOS.h */; };
                31EAF97F121435A400E7C1BF /* DeviceMotionClientIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EAF97D121435A400E7C1BF /* DeviceMotionClientIOS.mm */; };
+               31EB54DF1E7DC74400C1623B /* RTCRtpTransceiverDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EB54DD1E7DC74400C1623B /* RTCRtpTransceiverDirection.h */; };
                31EC1E2814FF60EE00C94662 /* JSNotificationPermissionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31EC1E2614FF60EE00C94662 /* JSNotificationPermissionCallback.cpp */; };
                31EC1E2914FF60EE00C94662 /* JSNotificationPermissionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EC1E2714FF60EE00C94662 /* JSNotificationPermissionCallback.h */; };
                31FB1A57120A5D0600DC02A0 /* DeviceMotionClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A4F120A5D0600DC02A0 /* DeviceMotionClient.h */; };
                415080371E3F00B00051D75D /* LibWebRTCAudioModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 415080351E3F00AA0051D75D /* LibWebRTCAudioModule.h */; };
                4150F9F112B6E0E70008C860 /* SliderThumbElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */; };
                4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */; };
-               415670471DBE1533009AC3BB /* PeerConnectionStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 415670461DBE1524009AC3BB /* PeerConnectionStates.h */; };
                415747471E3869A400E914D8 /* LibWebRTCMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 415747431E38699E00E914D8 /* LibWebRTCMacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
                415747481E3869A700E914D8 /* LibWebRTCProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 415747441E38699E00E914D8 /* LibWebRTCProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4157AF8012F1FB0400A8C6F5 /* MediaControlsApple.h in Headers */ = {isa = PBXBuildFile; fileRef = 4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */; };
                3128CA6A147331630074C72A /* NotificationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationController.h; sourceTree = "<group>"; };
                31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
                31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
+               313591001E7DDC6000F30630 /* RTCIceConnectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceConnectionState.h; sourceTree = "<group>"; };
+               313591011E7DDC6000F30630 /* RTCIceGatheringState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceGatheringState.h; sourceTree = "<group>"; };
+               313591021E7DDC6000F30630 /* RTCIceTransportPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceTransportPolicy.h; sourceTree = "<group>"; };
+               313591031E7DDC6000F30630 /* RTCIceTransportState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceTransportState.h; sourceTree = "<group>"; };
+               313591041E7DDC6000F30630 /* RTCSdpType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSdpType.h; sourceTree = "<group>"; };
+               313591051E7DDC6000F30630 /* RTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSignalingState.h; sourceTree = "<group>"; };
+               3135910C1E7DDCB600F30630 /* RTCBundlePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCBundlePolicy.h; sourceTree = "<group>"; };
                31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreMotionManager.h; sourceTree = "<group>"; };
                31403798124BEA7F00AF40E4 /* WebCoreMotionManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreMotionManager.mm; sourceTree = "<group>"; };
                31403799124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationClientIOS.h; 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>"; };
                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>"; };
-               316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceGatheringState.h; sourceTree = "<group>"; };
                316DCB351E790E1B001B5F87 /* RTCIceGatheringState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceGatheringState.idl; sourceTree = "<group>"; };
-               316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceConnectionState.h; sourceTree = "<group>"; };
                316DCB3B1E790E2C001B5F87 /* RTCIceConnectionState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceConnectionState.idl; sourceTree = "<group>"; };
-               316DCB401E790E3C001B5F87 /* RTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSignalingState.h; sourceTree = "<group>"; };
                316DCB411E790E3C001B5F87 /* RTCSignalingState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCSignalingState.idl; sourceTree = "<group>"; };
                316DCB451E7910A6001B5F87 /* JSRTCIceConnectionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceConnectionState.cpp; sourceTree = "<group>"; };
                316DCB461E7910A6001B5F87 /* JSRTCIceConnectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceConnectionState.h; 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>"; };
                31E8D8BB160BC94C004CE8F5 /* RenderSnapshottedPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSnapshottedPlugIn.h; sourceTree = "<group>"; };
                31EAF97C121435A400E7C1BF /* DeviceMotionClientIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMotionClientIOS.h; sourceTree = "<group>"; };
                31EAF97D121435A400E7C1BF /* DeviceMotionClientIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceMotionClientIOS.mm; sourceTree = "<group>"; };
+               31EB54DD1E7DC74400C1623B /* RTCRtpTransceiverDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpTransceiverDirection.h; sourceTree = "<group>"; };
                31EC1D5014FEFD0800C94662 /* NotificationPermissionCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NotificationPermissionCallback.idl; sourceTree = "<group>"; };
                31EC1DAC14FF26EA00C94662 /* NotificationPermissionCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationPermissionCallback.h; sourceTree = "<group>"; };
                31EC1E2614FF60EE00C94662 /* JSNotificationPermissionCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotificationPermissionCallback.cpp; sourceTree = "<group>"; };
                415080351E3F00AA0051D75D /* LibWebRTCAudioModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCAudioModule.h; path = libwebrtc/LibWebRTCAudioModule.h; sourceTree = "<group>"; };
                4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderThumbElement.h; sourceTree = "<group>"; };
                4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SliderThumbElement.cpp; sourceTree = "<group>"; };
-               415670461DBE1524009AC3BB /* PeerConnectionStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeerConnectionStates.h; sourceTree = "<group>"; };
                415747431E38699E00E914D8 /* LibWebRTCMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCMacros.h; path = libwebrtc/LibWebRTCMacros.h; sourceTree = "<group>"; };
                415747441E38699E00E914D8 /* LibWebRTCProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCProvider.h; path = libwebrtc/LibWebRTCProvider.h; sourceTree = "<group>"; };
                4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlsApple.h; sourceTree = "<group>"; };
                                07221B6C17CEC32700848E51 /* RTCDTMFToneChangeEvent.cpp */,
                                07221B6D17CEC32700848E51 /* RTCDTMFToneChangeEvent.h */,
                                07221B6E17CEC32700848E51 /* RTCDTMFToneChangeEvent.idl */,
-                               316DCB181E78C453001B5F87 /* RTCEnums.h */,
                                07221B7117CEC32700848E51 /* RTCIceCandidate.cpp */,
                                07221B7217CEC32700848E51 /* RTCIceCandidate.h */,
                                07221B7317CEC32700848E51 /* RTCIceCandidate.idl */,
                                07221B7417CEC32700848E51 /* RTCIceCandidateEvent.cpp */,
                                07221B7517CEC32700848E51 /* RTCIceCandidateEvent.h */,
                                07221B7617CEC32700848E51 /* RTCIceCandidateEvent.idl */,
-                               316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */,
                                316DCB3B1E790E2C001B5F87 /* RTCIceConnectionState.idl */,
-                               316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */,
                                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 */,
                                5E5E2B101CFC3E4B000C0D85 /* RTCRtpTransceiver.cpp */,
                                5E5E2B111CFC3E4B000C0D85 /* RTCRtpTransceiver.h */,
                                5E5E2B121CFC3E4B000C0D85 /* RTCRtpTransceiver.idl */,
-                               316DCB161E78C330001B5F87 /* RTCRtpTransceiverDirection.h */,
                                316DCB171E78C330001B5F87 /* RTCRtpTransceiverDirection.idl */,
                                07221B7A17CEC32700848E51 /* RTCSessionDescription.cpp */,
                                07221B7B17CEC32700848E51 /* RTCSessionDescription.h */,
                                07221B7C17CEC32700848E51 /* RTCSessionDescription.idl */,
-                               316DCB401E790E3C001B5F87 /* RTCSignalingState.h */,
                                316DCB411E790E3C001B5F87 /* RTCSignalingState.idl */,
                                07221B8417CEC32700848E51 /* RTCStatsReport.h */,
                                07221B8517CEC32700848E51 /* RTCStatsReport.idl */,
                                07221B9D17CF0AD400848E51 /* MediaStreamPrivate.h */,
                                07FFDE66181AED420072D409 /* MediaStreamTrackPrivate.cpp */,
                                07FFDE67181AED420072D409 /* MediaStreamTrackPrivate.h */,
-                               415670461DBE1524009AC3BB /* PeerConnectionStates.h */,
                                5EBB89381C77BDA400C65D41 /* PeerMediaDescription.h */,
                                4A4F656B1AA997F100E38CDD /* RealtimeMediaSource.cpp */,
                                4A4F656C1AA997F100E38CDD /* RealtimeMediaSource.h */,
                                4A4F656F1AA997F100E38CDD /* RealtimeMediaSourceSettings.h */,
                                2EC41DE21C0410A300D294FE /* RealtimeMediaSourceSupportedConstraints.cpp */,
                                07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */,
+                               3135910C1E7DDCB600F30630 /* RTCBundlePolicy.h */,
                                07221BA217CF0AD400848E51 /* RTCDataChannelHandler.h */,
                                07221BA317CF0AD400848E51 /* RTCDataChannelHandlerClient.h */,
                                07221BA417CF0AD400848E51 /* RTCDTMFSenderHandler.h */,
                                07221BA517CF0AD400848E51 /* RTCDTMFSenderHandlerClient.h */,
                                07221BA617CF0AD400848E51 /* RTCIceCandidateDescriptor.cpp */,
                                07221BA717CF0AD400848E51 /* RTCIceCandidateDescriptor.h */,
+                               313591001E7DDC6000F30630 /* RTCIceConnectionState.h */,
+                               313591011E7DDC6000F30630 /* RTCIceGatheringState.h */,
+                               313591021E7DDC6000F30630 /* RTCIceTransportPolicy.h */,
+                               313591031E7DDC6000F30630 /* RTCIceTransportState.h */,
                                07221BAA17CF0AD400848E51 /* RTCPeerConnectionHandlerClient.h */,
+                               31EB54DD1E7DC74400C1623B /* RTCRtpTransceiverDirection.h */,
+                               313591041E7DDC6000F30630 /* RTCSdpType.h */,
                                07221BAB17CF0AD400848E51 /* RTCSessionDescriptionDescriptor.cpp */,
                                07221BAC17CF0AD400848E51 /* RTCSessionDescriptionDescriptor.h */,
                                07221BAD17CF0AD400848E51 /* RTCSessionDescriptionRequest.h */,
+                               313591051E7DDC6000F30630 /* RTCSignalingState.h */,
                                07221BB017CF0AD400848E51 /* RTCVoidRequest.h */,
                                5EA3D6E51C85A9C300300BBB /* SDPProcessorScriptResource.cpp */,
                                5EA3D6E61C85A9C300300BBB /* SDPProcessorScriptResource.h */,
                                2D8287F716E4A0380086BD00 /* HitTestLocation.h in Headers */,
                                930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */,
                                9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */,
+                               313591071E7DDC7300F30630 /* RTCIceGatheringState.h in Headers */,
                                57E664FC1E73703300765536 /* CommonCryptoDERUtilities.h in Headers */,
                                BC3BC29C0E91AB0F00835588 /* HostWindow.h in Headers */,
                                FD31609912B026F700C1A359 /* HRTFDatabase.h in Headers */,
                                A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */,
                                A8CFF7A60A156978000A4234 /* HTMLFontElement.h in Headers */,
                                977B386F122883E900B81FF8 /* HTMLFormattingElementList.h in Headers */,
+                               3135910A1E7DDC7300F30630 /* RTCSdpType.h in Headers */,
                                A81369CE097374F600D74463 /* HTMLFormControlElement.h in Headers */,
                                E14F1C4514B5DAC600EA9009 /* HTMLFormControlElementWithState.h in Headers */,
                                A8DF3FCE097FA0FC0052981B /* HTMLFormControlsCollection.h in Headers */,
                                5185FCA71BB4C4E80012898F /* IDBRecordIdentifier.h in Headers */,
                                5185FCA91BB4C4E80012898F /* IDBRequest.h in Headers */,
                                514129991C6976900059E714 /* IDBRequestCompletionEvent.h in Headers */,
-                               316DCB3D1E790E2C001B5F87 /* RTCIceConnectionState.h in Headers */,
                                510A58FA1BACC7F200C19282 /* IDBRequestData.h in Headers */,
                                5145B10A1BC48E2E00E86219 /* IDBResourceIdentifier.h in Headers */,
                                51D7236D1BB6174900478CA3 /* IDBResultData.h in Headers */,
                                9001788112E0370700648462 /* JSOESStandardDerivatives.h in Headers */,
                                6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */,
                                3146FE7518442370001A937C /* JSOESTextureFloatLinear.h in Headers */,
+                               313591061E7DDC7300F30630 /* RTCIceConnectionState.h in Headers */,
                                A31C4E5416E02B40002F7957 /* JSOESTextureHalfFloat.h in Headers */,
                                31078CCA1880AACE008099DC /* JSOESTextureHalfFloatLinear.h in Headers */,
                                77A17AA712F28B2A004E02F6 /* JSOESVertexArrayObject.h in Headers */,
                                65DF320009D1CC60000BE325 /* JSProcessingInstruction.h in Headers */,
                                E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */,
                                077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */,
-                               316DCB371E790E1B001B5F87 /* RTCIceGatheringState.h in Headers */,
                                B658FFA21522EF3A00DD5595 /* JSRadioNodeList.h in Headers */,
                                65DF320209D1CC60000BE325 /* JSRange.h in Headers */,
                                6C4C96DF1AD4483500363F64 /* JSReadableByteStreamController.h in Headers */,
                                B2FA3D7F0AB75A6F000E5AC4 /* JSSVGFEFuncGElement.h in Headers */,
                                B2FA3D810AB75A6F000E5AC4 /* JSSVGFEFuncRElement.h in Headers */,
                                B2FA3D830AB75A6F000E5AC4 /* JSSVGFEGaussianBlurElement.h in Headers */,
+                               31EB54DF1E7DC74400C1623B /* RTCRtpTransceiverDirection.h in Headers */,
                                B2FA3D850AB75A6F000E5AC4 /* JSSVGFEImageElement.h in Headers */,
                                B2FA3D870AB75A6F000E5AC4 /* JSSVGFEMergeElement.h in Headers */,
                                B2FA3D890AB75A6F000E5AC4 /* JSSVGFEMergeNodeElement.h in Headers */,
                                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 */,
                                1A8A64681D19FDFF00D0E00F /* PaymentRequestValidator.h in Headers */,
                                B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
                                5E2C43511BCEE2F60001E2BC /* PeerConnectionBackend.h in Headers */,
-                               415670471DBE1533009AC3BB /* PeerConnectionStates.h in Headers */,
                                5EBB89391C77C39900C65D41 /* PeerMediaDescription.h in Headers */,
                                8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
                                E3FA38641D71812D00AA5950 /* PendingScriptClient.h in Headers */,
                                436708D512D9CA4B00044234 /* RenderSVGResourceFilterPrimitive.h in Headers */,
                                436708D712D9CA4B00044234 /* RenderSVGResourceGradient.h in Headers */,
                                436708D912D9CA4B00044234 /* RenderSVGResourceLinearGradient.h in Headers */,
-                               316DCB431E790E3C001B5F87 /* RTCSignalingState.h in Headers */,
                                436708DB12D9CA4B00044234 /* RenderSVGResourceMarker.h in Headers */,
                                436708DD12D9CA4B00044234 /* RenderSVGResourceMasker.h in Headers */,
                                436708DF12D9CA4B00044234 /* RenderSVGResourcePattern.h in Headers */,
                                E4AFD0100DAF335500F5F55C /* SVGSMILElement.h in Headers */,
                                0880F70E1282B46D00948505 /* SVGStaticListPropertyTearOff.h in Headers */,
                                0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */,
+                               313591081E7DDC7300F30630 /* RTCIceTransportPolicy.h in Headers */,
                                B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
                                B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
                                7C39C3771DDBE17000FEFB29 /* SVGStringListValues.h in Headers */,
                                2D4F96F71A1ECC240098BF88 /* TextIndicatorWindow.h in Headers */,
                                F55B3DDA1251F12D003EF269 /* TextInputType.h in Headers */,
                                CECADFCE1537791D00E37068 /* TextInsertionBaseCommand.h in Headers */,
+                               3135910B1E7DDC7300F30630 /* RTCSignalingState.h in Headers */,
                                93309E1C099E64920056E581 /* TextIterator.h in Headers */,
                                9392146918A6D791000EE688 /* TextIteratorBehavior.h in Headers */,
                                BCEF45E90E687767001C1287 /* TextMetrics.h in Headers */,
                                4A5A2ADC161E7E00005889DD /* WebSocketExtensionParser.h in Headers */,
                                97AABD2414FA09D5007457AE /* WebSocketExtensionProcessor.h in Headers */,
                                97AABD2514FA09D5007457AE /* WebSocketFrame.h in Headers */,
+                               313591091E7DDC7300F30630 /* RTCIceTransportState.h in Headers */,
                                97AABD2714FA09D5007457AE /* WebSocketHandshake.h in Headers */,
                                1F8756B21E22C3350042C40D /* WebSQLiteDatabaseTrackerClient.h in Headers */,
                                31DEA4561B39F4D900F77178 /* WebSystemBackdropLayer.h in Headers */,
index 1a4356f..6dfe552 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "MediaEndpointConfiguration.h"
 #include "PeerConnectionBackend.h"
+#include "RTCIceTransportState.h"
 #include "RealtimeMediaSource.h"
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
index 85d8d38..c99cb38 100644 (file)
@@ -33,7 +33,8 @@
 
 #if ENABLE(WEB_RTC)
 
-#include "RTCEnums.h"
+#include "RTCBundlePolicy.h"
+#include "RTCIceTransportPolicy.h"
 #include "URL.h"
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
index aae53dc..ca286cc 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// FIXME: Remove once older code is upgraded
 #pragma once
 
 #if ENABLE(WEB_RTC)
 
-namespace WebCore {
-
-enum class RTCSignalingState {
-    Stable,
-    HaveLocalOffer,
-    HaveRemoteOffer,
-    HaveLocalPranswer,
-    HaveRemotePranswer,
-    Closed
-};
-
-enum class RTCIceConnectionState {
-    New,
-    Checking,
-    Connected,
-    Completed,
-    Failed,
-    Disconnected,
-    Closed
-};
-
-enum class RTCIceGatheringState {
-    New,
-    Gathering,
-    Complete
-};
-
-enum class RTCIceTransportState {
-    New,
-    Checking,
-    Connected,
-    Completed,
-    Failed,
-    Disconnected,
-    Closed
-};
-
-enum class RTCIceTransportPolicy {
-    Relay,
-    All
-};
-
-enum class RTCBundlePolicy {
-    Balanced,
-    MaxCompat,
-    MaxBundle
-};
+#include "RTCBundlePolicy.h"
+#include "RTCIceConnectionState.h"
+#include "RTCIceGatheringState.h"
+#include "RTCIceTransportPolicy.h"
+#include "RTCIceTransportState.h"
+#include "RTCSignalingState.h"
 
+namespace WebCore {
 
-// FIXME: Remove once older code is upgraded
 namespace PeerConnectionStates {
 
-using SignalingState = RTCSignalingState;
+using BundlePolicy = RTCBundlePolicy;
 using IceConnectionState = RTCIceConnectionState;
 using IceGatheringState = RTCIceGatheringState;
-using IceTransportState = RTCIceTransportState;
 using IceTransportPolicy = RTCIceTransportPolicy;
-using BundlePolicy = RTCBundlePolicy;
+using IceTransportState = RTCIceTransportState;
+using SignalingState = RTCSignalingState;
 
 }
 
diff --git a/Source/WebCore/platform/mediastream/RTCBundlePolicy.h b/Source/WebCore/platform/mediastream/RTCBundlePolicy.h
new file mode 100644 (file)
index 0000000..28e1e55
--- /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)
+
+namespace WebCore {
+
+enum class RTCBundlePolicy {
+    Balanced,
+    MaxCompat,
+    MaxBundle
+};
+
+}; // namespace WebCore
+
+#endif
index 1733cf2..236f455 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
@@ -23,8 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCDTMFSenderHandler_h
-#define RTCDTMFSenderHandler_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -49,5 +49,3 @@ public:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCDTMFSenderHandler_h
index 32f18e5..09bb363 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
@@ -23,8 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCDTMFSenderHandlerClient_h
-#define RTCDTMFSenderHandlerClient_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -40,5 +40,3 @@ public:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCDTMFSenderHandlerClient_h
index 64cf7ac..f732288 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
@@ -28,8 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCIceCandidateDescriptor_h
-#define RTCIceCandidateDescriptor_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -59,5 +59,3 @@ private:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCIceCandidateDescriptor_h
diff --git a/Source/WebCore/platform/mediastream/RTCIceConnectionState.h b/Source/WebCore/platform/mediastream/RTCIceConnectionState.h
new file mode 100644 (file)
index 0000000..63eab4e
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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 RTCIceConnectionState {
+    New,
+    Checking,
+    Connected,
+    Completed,
+    Failed,
+    Disconnected,
+    Closed
+};
+
+}; // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/mediastream/RTCIceGatheringState.h b/Source/WebCore/platform/mediastream/RTCIceGatheringState.h
new file mode 100644 (file)
index 0000000..8cceb1e
--- /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)
+
+namespace WebCore {
+
+enum class RTCIceGatheringState {
+    New,
+    Gathering,
+    Complete
+};
+
+}; // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/mediastream/RTCIceTransportPolicy.h b/Source/WebCore/platform/mediastream/RTCIceTransportPolicy.h
new file mode 100644 (file)
index 0000000..319b29e
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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 RTCIceTransportPolicy {
+    Relay,
+    All
+};
+
+}; // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/mediastream/RTCIceTransportState.h b/Source/WebCore/platform/mediastream/RTCIceTransportState.h
new file mode 100644 (file)
index 0000000..f78ef79
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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 RTCIceTransportState {
+    New,
+    Checking,
+    Connected,
+    Completed,
+    Failed,
+    Disconnected,
+    Closed
+};
+
+}; // namespace WebCore
+
+#endif
index 16b763b..50df1a4 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google 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
@@ -28,8 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCPeerConnectionHandlerClient_h
-#define RTCPeerConnectionHandlerClient_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -83,5 +83,3 @@ public:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCPeerConnectionHandlerClient_h
diff --git a/Source/WebCore/platform/mediastream/RTCSdpType.h b/Source/WebCore/platform/mediastream/RTCSdpType.h
new file mode 100644 (file)
index 0000000..6a98d98
--- /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)
+
+namespace WebCore {
+
+enum class RTCSdpType {
+    Offer,
+    Pranswer,
+    Answer,
+    Rollback
+};
+
+}; // namespace WebCore
+
+#endif
index 95d845e..eabdf84 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
@@ -28,8 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCSessionDescriptionDescriptor_h
-#define RTCSessionDescriptionDescriptor_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -60,5 +60,3 @@ private:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCSessionDescriptionDescriptor_h
index 107f4ba..6ae0e32 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
@@ -28,8 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCSessionDescriptionRequest_h
-#define RTCSessionDescriptionRequest_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -67,5 +67,3 @@ private:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCSessionDescriptionRequest_h
diff --git a/Source/WebCore/platform/mediastream/RTCSignalingState.h b/Source/WebCore/platform/mediastream/RTCSignalingState.h
new file mode 100644 (file)
index 0000000..240a189
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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 RTCSignalingState {
+    Stable,
+    HaveLocalOffer,
+    HaveRemoteOffer,
+    HaveLocalPranswer,
+    HaveRemotePranswer,
+    Closed
+};
+
+}; // namespace WebCore
+
+#endif
index 470e4c0..a6f3d09 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
@@ -28,8 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCVoidRequest_h
-#define RTCVoidRequest_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -52,5 +52,3 @@ protected:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCVoidRequest_h
index 1137305..7f6664f 100644 (file)
@@ -34,7 +34,7 @@
 #if ENABLE(WEB_RTC)
 
 #include "MediaEndpoint.h"
-#include "RTCEnums.h"
+#include "RTCIceTransportState.h"
 #include "Timer.h"
 
 namespace WebCore {
index f3351d9..c39e95a 100644 (file)
@@ -1,5 +1,6 @@
 /*
- *  Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ * 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
@@ -23,8 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTCNotifiersMock_h
-#define RTCNotifiersMock_h
+#pragma once
 
 #if ENABLE(WEB_RTC)
 
@@ -112,5 +112,3 @@ private:
 } // namespace WebCore
 
 #endif // ENABLE(WEB_RTC)
-
-#endif // RTCNotifiersMock_h