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

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

Issue 1640993002: Update API for Objective-C RTCPeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix some style issues 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 "RTCPeerConnectionDelegate.h"
tkchin_webrtc 2016/02/01 10:00:01 Declare delegate in this class.
hjon_webrtc 2016/02/04 00:58:37 Done.
12
13 @class RTCConfiguration;
14 @class RTCDataChannelConfiguration;
15 @class RTCMediaConstraints;
16 @class RTCMediaStreamTrack;
17 @class RTCPeerConnectionFactory;
18 @class RTCSessionDescription;
19 @class RTCStatsReport;
20
21 /** Represents the stats output level. */
22 typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) {
23 RTCStatsOutputLevelStandard,
24 RTCStatsOutputLevelDebug,
25 };
26
27 NS_ASSUME_NONNULL_BEGIN
28
29 @interface RTCPeerConnection : NSObject
30
31 @property(nonatomic, weak) id<RTCPeerConnectionDelegate> delegate;
32 @property(nonatomic, readonly) NSArray *localStreams;
33 @property(nonatomic, readonly, nullable)
34 RTCSessionDescription *localDescription;
35 @property(nonatomic, readonly, nullable)
36 RTCSessionDescription *remoteDescription;
37 @property(nonatomic, readonly) RTCSignalingState signalingState;
tkchin_webrtc 2016/02/01 10:00:01 missing enums defs?
hjon_webrtc 2016/02/04 00:58:37 They were in RTCPeerConnectionDelegate.h, but I've
38 @property(nonatomic, readonly) RTCIceConnectionState iceConnectionState;
39 @property(nonatomic, readonly) RTCIceGatheringState iceGatheringState;
40
41 - (instancetype)init NS_UNAVAILABLE;
42
43 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
44 configuration:(nullable RTCConfiguration *)configuration
tkchin_webrtc 2016/02/01 10:00:01 doco what happens if nil configuration passed in.
hjon_webrtc 2016/02/04 00:58:37 I thought a nil configuration was acceptable, but
tkchin_webrtc 2016/02/05 16:15:15 Make it req'd or provide delegating ctor.
45 constraints:(RTCMediaConstraints *)constraints
46 delegate:(id<RTCPeerConnectionDelegate>)delegate
47 NS_DESIGNATED_INITIALIZER;
48
49 - (void)close;
50
51 - (void)addIceCandidate:(RTCIceCandidate *)candidate;
52
53 - (void)addStream:(RTCMediaStream *)stream;
54 - (void)removeStream:(RTCMediaStream *)stream;
55
56 - (RTCDataChannel *)createDataChannelWithLabel:(NSString *)label
tkchin_webrtc 2016/02/01 10:00:01 objC naming -> dataChannelWithLabel:config: create
hjon_webrtc 2016/02/04 00:58:37 Done.
57 configuration:(RTCDataChannelConfiguration *)configuration;
58
59 - (void)createOfferWithConstraints:(RTCMediaConstraints *)constraints
tkchin_webrtc 2016/02/01 10:00:01 offerWithConstraints:completionHandler: answerWith
hjon_webrtc 2016/02/04 00:58:37 Done.
60 completionHandler:(void (^)
61 (RTCSessionDescription *sessionDescription, NSError *error))completionHandler;
62
63 - (void)createAnswerWithConstraints:(RTCMediaConstraints *)constraints
64 completionHandler:(void (^)
65 (RTCSessionDescription *sessionDescription, NSError *error))completionHandler;
66
67 - (void)setLocalDescription:(RTCSessionDescription *)sdp
68 completionHandler:(void (^)(NSError *error))completionHandler;
69
70 - (void)setRemoteDescription:(RTCSessionDescription *)sdp
71 completionHandler:(void (^)(NSError *error))completionHandler;
72
73 - (void)getStatsForMediaStreamTrack:
74 (nullable RTCMediaStreamTrack *)mediaStreamTrack
75 statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel
76 completionHandler:
77 (void (^)(NSArray<RTCStatsReport *> *stats))completionHandler;
78
79 @end
80
81 NS_ASSUME_NONNULL_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698