Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 <Foundation/Foundation.h> | |
| 12 | |
| 13 #import "webrtc/api/objc/RTCPeerConnection.h" | |
| 14 | |
| 15 @class RTCDataChannel; | |
| 16 @class RTCIceCandidate; | |
| 17 @class RTCMediaStream; | |
| 18 @class RTCPeerConnection; | |
| 19 | |
| 20 /** Represents the signaling state of the peer connection. */ | |
| 21 typedef NS_ENUM(NSInteger, RTCSignalingState) { | |
| 22 RTCSignalingStateStable, | |
| 23 RTCSignalingStateHaveLocalOffer, | |
| 24 RTCSignalingStateHaveLocalPrAnswer, | |
| 25 RTCSignalingStateHaveRemoteOffer, | |
| 26 RTCSignalingStateHaveRemotePrAnswer, | |
| 27 RTCSignalingStateClosed, | |
| 28 }; | |
| 29 | |
| 30 /** Represents the ice connection state of the peer connection. */ | |
| 31 typedef NS_ENUM(NSInteger, RTCIceConnectionState) { | |
| 32 RTCIceConnectionStateNew, | |
| 33 RTCIceConnectionStateChecking, | |
| 34 RTCIceConnectionStateConnected, | |
| 35 RTCIceConnectionStateCompleted, | |
| 36 RTCIceConnectionStateFailed, | |
| 37 RTCIceConnectionStateDisconnected, | |
| 38 RTCIceConnectionStateClosed, | |
| 39 RTCIceConnectionStateMax, | |
| 40 }; | |
| 41 | |
| 42 /** Represents the ice gathering state of the peer connection. */ | |
| 43 typedef NS_ENUM(NSInteger, RTCIceGatheringState) { | |
| 44 RTCIceGatheringStateNew, | |
| 45 RTCIceGatheringStateGathering, | |
| 46 RTCIceGatheringStateComplete, | |
| 47 }; | |
| 48 | |
| 49 NS_ASSUME_NONNULL_BEGIN | |
| 50 | |
| 51 @protocol RTCPeerConnectionDelegate<NSObject> | |
|
tkchin_webrtc
2016/02/01 10:00:02
space after protocol name
Delegate <NSObject>
hjon_webrtc
2016/02/04 00:58:38
Done.
| |
| 52 | |
| 53 /** Triggered when the SignalingState changed. */ | |
|
tkchin_webrtc
2016/02/01 10:00:02
nit: Triggered is a weird word. Called when the Si
hjon_webrtc
2016/02/04 00:58:38
Done.
| |
| 54 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 55 signalingStateChanged:(RTCSignalingState)stateChanged; | |
|
tkchin_webrtc
2016/02/01 10:00:02
minimum 4 spaces from left (break the : alignment)
hjon_webrtc
2016/02/04 00:58:38
Done.
| |
| 56 | |
| 57 /** Triggered when media is received on a new stream from remote peer. */ | |
| 58 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 59 addedStream:(RTCMediaStream *)stream; | |
| 60 | |
| 61 /** Triggered when a remote peer closes a stream. */ | |
| 62 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 63 removedStream:(RTCMediaStream *)stream; | |
| 64 | |
| 65 /** Triggered when renegotiation is needed, for example ICE has restarted. */ | |
| 66 - (void)peerConnectionNeedsRenegotiation:(RTCPeerConnection *)peerConnection; | |
| 67 | |
| 68 /** Called any time the IceConnectionState changes. */ | |
| 69 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 70 iceConnectionStateChanged:(RTCIceConnectionState)newState; | |
| 71 | |
| 72 /** Called any time the IceGatheringState changes. */ | |
| 73 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 74 iceGatheringStateChanged:(RTCIceGatheringState)newState; | |
| 75 | |
| 76 /** New ice candidate has been found. */ | |
| 77 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 78 receivedIceCandidate:(RTCIceCandidate *)candidate; | |
|
tkchin_webrtc
2016/02/01 10:00:02
ditto
hjon_webrtc
2016/02/04 00:58:38
Done.
| |
| 79 | |
| 80 /** New data channel has been opened. */ | |
| 81 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 82 didOpenDataChannel:(RTCDataChannel *)dataChannel; | |
| 83 | |
| 84 @end | |
| 85 | |
| 86 NS_ASSUME_NONNULL_END | |
| OLD | NEW |