Index: webrtc/api/objc/RTCPeerConnection.h |
diff --git a/webrtc/api/objc/RTCPeerConnection.h b/webrtc/api/objc/RTCPeerConnection.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2bc9ec2639170a727e205ddc7c9b841451e99b63 |
--- /dev/null |
+++ b/webrtc/api/objc/RTCPeerConnection.h |
@@ -0,0 +1,81 @@ |
+/* |
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#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.
|
+ |
+@class RTCConfiguration; |
+@class RTCDataChannelConfiguration; |
+@class RTCMediaConstraints; |
+@class RTCMediaStreamTrack; |
+@class RTCPeerConnectionFactory; |
+@class RTCSessionDescription; |
+@class RTCStatsReport; |
+ |
+/** Represents the stats output level. */ |
+typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { |
+ RTCStatsOutputLevelStandard, |
+ RTCStatsOutputLevelDebug, |
+}; |
+ |
+NS_ASSUME_NONNULL_BEGIN |
+ |
+@interface RTCPeerConnection : NSObject |
+ |
+@property(nonatomic, weak) id<RTCPeerConnectionDelegate> delegate; |
+@property(nonatomic, readonly) NSArray *localStreams; |
+@property(nonatomic, readonly, nullable) |
+ RTCSessionDescription *localDescription; |
+@property(nonatomic, readonly, nullable) |
+ RTCSessionDescription *remoteDescription; |
+@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
|
+@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState; |
+@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState; |
+ |
+- (instancetype)init NS_UNAVAILABLE; |
+ |
+- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
+ 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.
|
+ constraints:(RTCMediaConstraints *)constraints |
+ delegate:(id<RTCPeerConnectionDelegate>)delegate |
+ NS_DESIGNATED_INITIALIZER; |
+ |
+- (void)close; |
+ |
+- (void)addIceCandidate:(RTCIceCandidate *)candidate; |
+ |
+- (void)addStream:(RTCMediaStream *)stream; |
+- (void)removeStream:(RTCMediaStream *)stream; |
+ |
+- (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.
|
+ configuration:(RTCDataChannelConfiguration *)configuration; |
+ |
+- (void)createOfferWithConstraints:(RTCMediaConstraints *)constraints |
tkchin_webrtc
2016/02/01 10:00:01
offerWithConstraints:completionHandler:
answerWith
hjon_webrtc
2016/02/04 00:58:37
Done.
|
+ completionHandler:(void (^) |
+ (RTCSessionDescription *sessionDescription, NSError *error))completionHandler; |
+ |
+- (void)createAnswerWithConstraints:(RTCMediaConstraints *)constraints |
+ completionHandler:(void (^) |
+ (RTCSessionDescription *sessionDescription, NSError *error))completionHandler; |
+ |
+- (void)setLocalDescription:(RTCSessionDescription *)sdp |
+ completionHandler:(void (^)(NSError *error))completionHandler; |
+ |
+- (void)setRemoteDescription:(RTCSessionDescription *)sdp |
+ completionHandler:(void (^)(NSError *error))completionHandler; |
+ |
+- (void)getStatsForMediaStreamTrack: |
+ (nullable RTCMediaStreamTrack *)mediaStreamTrack |
+ statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel |
+ completionHandler: |
+ (void (^)(NSArray<RTCStatsReport *> *stats))completionHandler; |
+ |
+@end |
+ |
+NS_ASSUME_NONNULL_END |