blob: 144c8d3bd5ebe041b2309809d684e73db7abf5c3 [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
15/**
16 * Represents the ice transport policy. This exposes the same states in C++,
17 * which include one more state than what exists in the W3C spec.
18 */
19typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) {
20 RTCIceTransportPolicyNone,
21 RTCIceTransportPolicyRelay,
22 RTCIceTransportPolicyNoHost,
23 RTCIceTransportPolicyAll
24};
25
26/** Represents the bundle policy. */
27typedef NS_ENUM(NSInteger, RTCBundlePolicy) {
28 RTCBundlePolicyBalanced,
29 RTCBundlePolicyMaxCompat,
30 RTCBundlePolicyMaxBundle
31};
32
33/** Represents the rtcp mux policy. */
34typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) {
35 RTCRtcpMuxPolicyNegotiate,
36 RTCRtcpMuxPolicyRequire
37};
38
39/** Represents the tcp candidate policy. */
40typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) {
41 RTCTcpCandidatePolicyEnabled,
42 RTCTcpCandidatePolicyDisabled
43};
44
tkchinab8f82f2016-01-27 17:50:11 -080045/** Represents the encryption key type. */
46typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) {
47 RTCEncryptionKeyTypeRSA,
48 RTCEncryptionKeyTypeECDSA,
49};
50
hjon6d49a8e2016-01-26 13:06:42 -080051NS_ASSUME_NONNULL_BEGIN
52
53@interface RTCConfiguration : NSObject
54
55/** An array of Ice Servers available to be used by ICE. */
Jon Hjelle32e0c012016-03-08 16:04:46 -080056@property(nonatomic, copy) NSArray<RTCIceServer *> *iceServers;
hjon6d49a8e2016-01-26 13:06:42 -080057
58/** Which candidates the ICE agent is allowed to use. The W3C calls it
59 * |iceTransportPolicy|, while in C++ it is called |type|. */
60@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy;
61
62/** The media-bundling policy to use when gathering ICE candidates. */
63@property(nonatomic, assign) RTCBundlePolicy bundlePolicy;
64
65/** The rtcp-mux policy to use when gathering ICE candidates. */
66@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy;
67@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy;
68@property(nonatomic, assign) int audioJitterBufferMaxPackets;
69@property(nonatomic, assign) int iceConnectionReceivingTimeout;
70@property(nonatomic, assign) int iceBackupCandidatePairPingInterval;
71
tkchinab8f82f2016-01-27 17:50:11 -080072/** Key type used to generate SSL identity. Default is ECDSA. */
73@property(nonatomic, assign) RTCEncryptionKeyType keyType;
hjon6d49a8e2016-01-26 13:06:42 -080074
Jon Hjelle32e0c012016-03-08 16:04:46 -080075- (instancetype)init NS_DESIGNATED_INITIALIZER;
hjon6d49a8e2016-01-26 13:06:42 -080076
77@end
78
79NS_ASSUME_NONNULL_END