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

Reviewed by Youenn Fablet.

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

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

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

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCAnswerOptions.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCAnswerOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCEnums.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.h
Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferOptions.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCOfferOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.h
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCRtpTransceiverDirection.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj