Flatten RTC enum naming
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 06:10:34 +0000 (06:10 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Mar 2017 06:10:34 +0000 (06:10 +0000)
commit6360fd7059e8be8f5d7188b6630b2a0588894f43
treee69e9d52dc758a1b99a9c724805e65b9cd9f8f8a
parenta1ac8a06b2f8939d15f2dab940f00b4bf4c5bcd8
Flatten RTC enum naming
https://bugs.webkit.org/show_bug.cgi?id=169664

Reviewed by Youenn Fablet.

Use consistent names of RTC enums throughout WebCore. This means surfacing
ICE enums out of PeerConnectionState. Keep the old names around for other
ports.

Add RTCIceConnectionState, RTCIceGatheringState, and RTCSignalingState enums.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/RTCIceConnectionState.h: Added. The enum is defined in
PeerConnectionStates.h, so just include that file.
* Modules/mediastream/RTCIceConnectionState.idl: Added.
* Modules/mediastream/RTCIceGatheringState.h: Added.
* Modules/mediastream/RTCIceGatheringState.idl: Added.
* Modules/mediastream/RTCSignalingState.h: Added.
* Modules/mediastream/RTCSignalingState.idl: Added.
* WebCore.xcodeproj/project.pbxproj:

* platform/mediastream/PeerConnectionStates.h: Move the existing enums into
WebCore, but keep aliases to the old names within the PeerConnectionStates
namespace.

Refactor to use the new enum names.
* Modules/mediastream/MediaEndpointPeerConnection.cpp: Refactor.
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/PeerConnectionBackend.cpp:
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCConfiguration.h:
* Modules/mediastream/RTCConfiguration.idl: Add FIXMEs for bringing this up
to spec.
* Modules/mediastream/RTCIceTransport.h:
* Modules/mediastream/RTCPeerConnection.cpp: Refactor the three functions
below to using the enum instead of returning strings. This allows remove of
the internal* versions of these functions.
(WebCore::RTCPeerConnection::signalingState): Deleted.
(WebCore::RTCPeerConnection::iceGatheringState): Deleted.
(WebCore::RTCPeerConnection::iceConnectionState): Deleted.
* Modules/mediastream/RTCPeerConnection.h: Replace internalSignalingState,
internalIceGatheringState, and internalIceConnectionState.
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
* platform/mediastream/MediaEndpoint.h:
* platform/mediastream/MediaEndpointConfiguration.cpp:
* platform/mediastream/MediaEndpointConfiguration.h:
* platform/mock/MockMediaEndpoint.cpp:
* platform/mock/MockMediaEndpoint.h:
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::processIceTransportStateChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCConfiguration.h
Source/WebCore/Modules/mediastream/RTCConfiguration.idl
Source/WebCore/Modules/mediastream/RTCIceConnectionState.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceConnectionState.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceGatheringState.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceGatheringState.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCIceTransport.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCSignalingState.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCSignalingState.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/MediaEndpoint.h
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h
Source/WebCore/platform/mediastream/PeerConnectionStates.h
Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp
Source/WebCore/platform/mock/MockMediaEndpoint.cpp
Source/WebCore/platform/mock/MockMediaEndpoint.h