blob: ed4bfc27487aa64b06a3d205270f5ac9ab2488fe [file] [log] [blame]
hjon6d49a8e2016-01-26 13:06:42 -08001/*
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@class RTCIceServer;
14
hjon6b039952016-02-25 12:32:58 -080015// TODO(hjon): Update nullability types. See http://crbug/webrtc/5592
16
hjon6d49a8e2016-01-26 13:06:42 -080017/**
18 * Represents the ice transport policy. This exposes the same states in C++,
19 * which include one more state than what exists in the W3C spec.
20 */
21typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) {
22 RTCIceTransportPolicyNone,
23 RTCIceTransportPolicyRelay,
24 RTCIceTransportPolicyNoHost,
25 RTCIceTransportPolicyAll
26};
27
28/** Represents the bundle policy. */
29typedef NS_ENUM(NSInteger, RTCBundlePolicy) {
30 RTCBundlePolicyBalanced,
31 RTCBundlePolicyMaxCompat,
32 RTCBundlePolicyMaxBundle
33};
34
35/** Represents the rtcp mux policy. */
36typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) {
37 RTCRtcpMuxPolicyNegotiate,
38 RTCRtcpMuxPolicyRequire
39};
40
41/** Represents the tcp candidate policy. */
42typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) {
43 RTCTcpCandidatePolicyEnabled,
44 RTCTcpCandidatePolicyDisabled
45};
46
tkchinab8f82f2016-01-27 17:50:11 -080047/** Represents the encryption key type. */
48typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) {
49 RTCEncryptionKeyTypeRSA,
50 RTCEncryptionKeyTypeECDSA,
51};
52
hjon6d49a8e2016-01-26 13:06:42 -080053NS_ASSUME_NONNULL_BEGIN
54
55@interface RTCConfiguration : NSObject
56
57/** An array of Ice Servers available to be used by ICE. */
hjon6b039952016-02-25 12:32:58 -080058@property(nonatomic, copy, nonnull) NSArray *iceServers;
59// @property(nonatomic, copy) NSArray<RTCIceServer *> *iceServers;
hjon6d49a8e2016-01-26 13:06:42 -080060
61/** Which candidates the ICE agent is allowed to use. The W3C calls it
62 * |iceTransportPolicy|, while in C++ it is called |type|. */
63@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy;
64
65/** The media-bundling policy to use when gathering ICE candidates. */
66@property(nonatomic, assign) RTCBundlePolicy bundlePolicy;
67
68/** The rtcp-mux policy to use when gathering ICE candidates. */
69@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy;
70@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy;
71@property(nonatomic, assign) int audioJitterBufferMaxPackets;
72@property(nonatomic, assign) int iceConnectionReceivingTimeout;
73@property(nonatomic, assign) int iceBackupCandidatePairPingInterval;
74
tkchinab8f82f2016-01-27 17:50:11 -080075/** Key type used to generate SSL identity. Default is ECDSA. */
76@property(nonatomic, assign) RTCEncryptionKeyType keyType;
hjon6d49a8e2016-01-26 13:06:42 -080077
hjon6b039952016-02-25 12:32:58 -080078- (nonnull instancetype)init NS_DESIGNATED_INITIALIZER;
hjon6d49a8e2016-01-26 13:06:42 -080079
80@end
81
82NS_ASSUME_NONNULL_END