hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 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 <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 | */ |
| 19 | typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) { |
| 20 | RTCIceTransportPolicyNone, |
| 21 | RTCIceTransportPolicyRelay, |
| 22 | RTCIceTransportPolicyNoHost, |
| 23 | RTCIceTransportPolicyAll |
| 24 | }; |
| 25 | |
| 26 | /** Represents the bundle policy. */ |
| 27 | typedef NS_ENUM(NSInteger, RTCBundlePolicy) { |
| 28 | RTCBundlePolicyBalanced, |
| 29 | RTCBundlePolicyMaxCompat, |
| 30 | RTCBundlePolicyMaxBundle |
| 31 | }; |
| 32 | |
| 33 | /** Represents the rtcp mux policy. */ |
| 34 | typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { |
| 35 | RTCRtcpMuxPolicyNegotiate, |
| 36 | RTCRtcpMuxPolicyRequire |
| 37 | }; |
| 38 | |
| 39 | /** Represents the tcp candidate policy. */ |
| 40 | typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) { |
| 41 | RTCTcpCandidatePolicyEnabled, |
| 42 | RTCTcpCandidatePolicyDisabled |
| 43 | }; |
| 44 | |
tkchin | ab8f82f | 2016-01-27 17:50:11 -0800 | [diff] [blame] | 45 | /** Represents the encryption key type. */ |
| 46 | typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) { |
| 47 | RTCEncryptionKeyTypeRSA, |
| 48 | RTCEncryptionKeyTypeECDSA, |
| 49 | }; |
| 50 | |
hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 51 | NS_ASSUME_NONNULL_BEGIN |
| 52 | |
| 53 | @interface RTCConfiguration : NSObject |
| 54 | |
| 55 | /** An array of Ice Servers available to be used by ICE. */ |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 56 | @property(nonatomic, copy) NSArray<RTCIceServer *> *iceServers; |
hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 57 | |
| 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 | |
tkchin | ab8f82f | 2016-01-27 17:50:11 -0800 | [diff] [blame] | 72 | /** Key type used to generate SSL identity. Default is ECDSA. */ |
| 73 | @property(nonatomic, assign) RTCEncryptionKeyType keyType; |
hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 74 | |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 75 | - (instancetype)init NS_DESIGNATED_INITIALIZER; |
hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 76 | |
| 77 | @end |
| 78 | |
| 79 | NS_ASSUME_NONNULL_END |