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

Unified Diff: webrtc/api/objc/RTCConfiguration.h

Issue 1616303002: Update API for Objective-C RTCConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add some comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/objc/RTCConfiguration.h
diff --git a/webrtc/api/objc/RTCConfiguration.h b/webrtc/api/objc/RTCConfiguration.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ae023b06e25c33f52ceec266556c0f1fa62982a
--- /dev/null
+++ b/webrtc/api/objc/RTCConfiguration.h
@@ -0,0 +1,79 @@
+/*
+ * 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 <Foundation/Foundation.h>
+
+@class RTCIceServer;
+
+/**
+ * Represents the ice transport policy. This exposes the same states in C++,
+ * which include one more state than what exists in the W3C spec.
+ */
+typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) {
+ RTCIceTransportPolicyNone,
+ RTCIceTransportPolicyRelay,
+ RTCIceTransportPolicyNoHost,
+ RTCIceTransportPolicyAll
+};
+
+/** Represents the bundle policy. */
+typedef NS_ENUM(NSInteger, RTCBundlePolicy) {
+ RTCBundlePolicyBalanced,
+ RTCBundlePolicyMaxCompat,
+ RTCBundlePolicyMaxBundle
+};
+
+/** Represents the rtcp mux policy. */
+typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) {
+ RTCRtcpMuxPolicyNegotiate,
+ RTCRtcpMuxPolicyRequire
+};
+
+/** Represents the tcp candidate policy. */
+typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) {
+ RTCTcpCandidatePolicyEnabled,
+ RTCTcpCandidatePolicyDisabled
+};
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface RTCConfiguration : NSObject
+
+/** An array of Ice Servers available to be used by ICE. */
+@property(nonatomic, readonly, nullable) NSArray<RTCIceServer *> *iceServers;
tkchin_webrtc 2016/01/22 21:17:04 nullable or returns empty array?
hjon_webrtc 2016/01/22 21:35:22 Done.
+
+/** Which candidates the ICE agent is allowed to use. */
+@property(nonatomic, readonly) RTCIceTransportPolicy iceTransportPolicy;
+
+/** The media-bundling policy to use when gathering ICE candidates. */
+@property(nonatomic, readonly) RTCBundlePolicy bundlePolicy;
+
+/** The rtcp-mux policy to use when gathering ICE candidates. */
+@property(nonatomic, readonly) RTCRtcpMuxPolicy rtcpMuxPolicy;
+@property(nonatomic, readonly) RTCTcpCandidatePolicy tcpCandidatePolicy;
+@property(nonatomic, readonly) int audioJitterBufferMaxPackets;
+@property(nonatomic, readonly) int iceConnectionReceivingTimeout;
+@property(nonatomic, readonly) int iceBackupCandidatePairPingInterval;
+
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)initWithIceServers:
+ (nullable NSArray<RTCIceServer *> *)iceServers
+ iceTransportPolicy:(RTCIceTransportPolicy)iceTransportPolicy
+ bundlePolicy:(RTCBundlePolicy)bundlePolicy
+ rtcpMuxPolicy:(RTCRtcpMuxPolicy)rtcpMuxPolicy
+ tcpCandidatePolicy:(RTCTcpCandidatePolicy)tcpCandidatePolicy
+ audioJitterBufferMaxPackets:(int)audioJitterBufferMaxPackets
+ iceConnectionReceivingTimeout:(int)iceConnectionReceivingTimeout
+iceBackupCandidatePairPingInterval:(int)iceBackupCandidatePairPingInterval;
+
+@end
+
+NS_ASSUME_NONNULL_END

Powered by Google App Engine
This is Rietveld 408576698