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