Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webrtc/api/objc/RTCPeerConnection+Private.h

Issue 1640993002: Update API for Objective-C RTCPeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update against master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #import "RTCPeerConnection.h"
12
13 #include "talk/app/webrtc/peerconnectioninterface.h"
14
15 NS_ASSUME_NONNULL_BEGIN
16
17 /**
18 * These objects are created by RTCPeerConnectionFactory to wrap an
19 * id<RTCPeerConnectionDelegate> and call methods on that interface.
20 */
21 namespace webrtc {
22
23 class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
24
25 public:
26 PeerConnectionDelegateAdapter(RTCPeerConnection *peerConnection);
27 virtual ~PeerConnectionDelegateAdapter();
28
29 void OnSignalingChange(
30 PeerConnectionInterface::SignalingState new_state) override;
31
32 void OnAddStream(MediaStreamInterface *stream) override;
33
34 void OnRemoveStream(MediaStreamInterface *stream) override;
35
36 void OnDataChannel(DataChannelInterface *data_channel) override;
37
38 void OnRenegotiationNeeded() override;
39
40 void OnIceConnectionChange(
41 PeerConnectionInterface::IceConnectionState new_state) override;
42
43 void OnIceGatheringChange(
44 PeerConnectionInterface::IceGatheringState new_state) override;
45
46 void OnIceCandidate(const IceCandidateInterface *candidate) override;
47
48 private:
49 __weak RTCPeerConnection *peer_connection_;
50 };
51
52 } // namespace webrtc
53
54
55 @interface RTCPeerConnection ()
56
57 /** The native PeerConnectionInterface created during construction. */
58 @property(nonatomic, readonly)
59 rtc::scoped_refptr<webrtc::PeerConnectionInterface> nativePeerConnection;
60
61 + (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
62 (RTCSignalingState)state;
63
64 + (RTCSignalingState)signalingStateForNativeState:
65 (webrtc::PeerConnectionInterface::SignalingState)nativeState;
66
67 + (NSString *)stringForSignalingState:(RTCSignalingState)state;
68
69 + (webrtc::PeerConnectionInterface::IceConnectionState)
70 nativeIceConnectionStateForState:(RTCIceConnectionState)state;
71
72 + (RTCIceConnectionState)iceConnectionStateForNativeState:
73 (webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
74
75 + (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state;
76
77 + (webrtc::PeerConnectionInterface::IceGatheringState)
78 nativeIceGatheringStateForState:(RTCIceGatheringState)state;
79
80 + (RTCIceGatheringState)iceGatheringStateForNativeState:
81 (webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
82
83 + (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state;
84
85 + (webrtc::PeerConnectionInterface::StatsOutputLevel)
86 nativeStatsOutputLevelForLevel:(RTCStatsOutputLevel)level;
87
88 @end
89
90 NS_ASSUME_NONNULL_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698