Replace PeerConnection::Action with cricket::ContentAction

PeerConnection had an Action enum as a holdover from the
WebRtcSession merge with the same members as
cricket::ContentAction. Since ContentAction is used in more places
outside of PeerConnection, this change removes the Action enum and
replaces its use with cricket::ContentAction.

Bug: webrtc:8587
Change-Id: I3e825fe285dbaf6b3f128eccde0f38864171af13
Reviewed-on: https://webrtc-review.googlesource.com/27321
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21063}
This commit is contained in:
Steve Anton
2017-12-04 16:24:52 -08:00
committed by Commit Bot
parent 6ebf111480
commit 2039306d66
2 changed files with 41 additions and 45 deletions

View File

@ -550,14 +550,6 @@ class PeerConnection : public PeerConnectionInterface,
cricket::ChannelManager* channel_manager() const;
MetricsObserverInterface* metrics_observer() const;
// Indicates the type of SessionDescription in a call to SetLocalDescription
// and SetRemoteDescription.
enum Action {
kOffer,
kPrAnswer,
kAnswer,
};
enum class SessionError {
kNone, // No error.
kContent, // Error in BaseChannel SetLocalContent/SetRemoteContent.
@ -615,8 +607,8 @@ class PeerConnection : public PeerConnectionInterface,
// Updates the error state, signaling if necessary.
void SetSessionError(SessionError error, const std::string& error_desc);
RTCError UpdateSessionState(Action action, cricket::ContentSource source);
Action GetAction(const std::string& type);
RTCError UpdateSessionState(cricket::ContentAction action,
cricket::ContentSource source);
// Push the media parts of the local or remote session description
// down to all of the channels.
RTCError PushdownMediaDescription(cricket::ContentAction action,
@ -703,12 +695,12 @@ class PeerConnection : public PeerConnectionInterface,
cricket::ContentSource source);
// Check if a call to SetLocalDescription is acceptable with |action|.
bool ExpectSetLocalDescription(Action action);
bool ExpectSetLocalDescription(cricket::ContentAction action);
// Check if a call to SetRemoteDescription is acceptable with |action|.
bool ExpectSetRemoteDescription(Action action);
bool ExpectSetRemoteDescription(cricket::ContentAction action);
// Verifies a=setup attribute as per RFC 5763.
bool ValidateDtlsSetupAttribute(const cricket::SessionDescription* desc,
Action action);
cricket::ContentAction action);
// Returns true if we are ready to push down the remote candidate.
// |remote_desc| is the new remote description, or NULL if the current remote