2016-01-26 13:06:42 -08:00
|
|
|
/*
|
|
|
|
|
* 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>
|
|
|
|
|
|
2016-04-27 01:54:20 -07:00
|
|
|
#import <WebRTC/RTCMacros.h>
|
2016-04-19 10:04:41 -07:00
|
|
|
|
2016-01-26 13:06:42 -08:00
|
|
|
@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
|
|
|
|
|
};
|
|
|
|
|
|
2016-06-03 16:31:32 -07:00
|
|
|
/** Represents the candidate network policy. */
|
|
|
|
|
typedef NS_ENUM(NSInteger, RTCCandidateNetworkPolicy) {
|
|
|
|
|
RTCCandidateNetworkPolicyAll,
|
|
|
|
|
RTCCandidateNetworkPolicyLowCost
|
|
|
|
|
};
|
|
|
|
|
|
2016-05-11 10:10:39 -07:00
|
|
|
/** Represents the continual gathering policy. */
|
|
|
|
|
typedef NS_ENUM(NSInteger, RTCContinualGatheringPolicy) {
|
|
|
|
|
RTCContinualGatheringPolicyGatherOnce,
|
|
|
|
|
RTCContinualGatheringPolicyGatherContinually
|
|
|
|
|
};
|
|
|
|
|
|
2016-01-27 17:50:11 -08:00
|
|
|
/** Represents the encryption key type. */
|
|
|
|
|
typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) {
|
|
|
|
|
RTCEncryptionKeyTypeRSA,
|
|
|
|
|
RTCEncryptionKeyTypeECDSA,
|
|
|
|
|
};
|
|
|
|
|
|
2016-01-26 13:06:42 -08:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
2016-04-19 10:04:41 -07:00
|
|
|
RTC_EXPORT
|
2016-01-26 13:06:42 -08:00
|
|
|
@interface RTCConfiguration : NSObject
|
|
|
|
|
|
|
|
|
|
/** An array of Ice Servers available to be used by ICE. */
|
2016-03-08 16:04:46 -08:00
|
|
|
@property(nonatomic, copy) NSArray<RTCIceServer *> *iceServers;
|
2016-01-26 13:06:42 -08:00
|
|
|
|
|
|
|
|
/** Which candidates the ICE agent is allowed to use. The W3C calls it
|
|
|
|
|
* |iceTransportPolicy|, while in C++ it is called |type|. */
|
|
|
|
|
@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy;
|
|
|
|
|
|
|
|
|
|
/** The media-bundling policy to use when gathering ICE candidates. */
|
|
|
|
|
@property(nonatomic, assign) RTCBundlePolicy bundlePolicy;
|
|
|
|
|
|
|
|
|
|
/** The rtcp-mux policy to use when gathering ICE candidates. */
|
|
|
|
|
@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy;
|
|
|
|
|
@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy;
|
2016-06-03 16:31:32 -07:00
|
|
|
@property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy;
|
2016-05-11 10:10:39 -07:00
|
|
|
@property(nonatomic, assign)
|
|
|
|
|
RTCContinualGatheringPolicy continualGatheringPolicy;
|
2016-01-26 13:06:42 -08:00
|
|
|
@property(nonatomic, assign) int audioJitterBufferMaxPackets;
|
|
|
|
|
@property(nonatomic, assign) int iceConnectionReceivingTimeout;
|
|
|
|
|
@property(nonatomic, assign) int iceBackupCandidatePairPingInterval;
|
|
|
|
|
|
2016-01-27 17:50:11 -08:00
|
|
|
/** Key type used to generate SSL identity. Default is ECDSA. */
|
|
|
|
|
@property(nonatomic, assign) RTCEncryptionKeyType keyType;
|
2016-01-26 13:06:42 -08:00
|
|
|
|
2016-05-18 16:20:14 -07:00
|
|
|
/** ICE candidate pool size as defined in JSEP. Default is 0. */
|
|
|
|
|
@property(nonatomic, assign) int iceCandidatePoolSize;
|
|
|
|
|
|
2016-07-01 11:11:13 -07:00
|
|
|
/** If set to true, this means the ICE transport should presume TURN-to-TURN
|
|
|
|
|
* candidate pairs will succeed, even before a binding response is received.
|
|
|
|
|
*/
|
|
|
|
|
@property(nonatomic, assign) bool presumeWritableWhenFullyRelayed;
|
|
|
|
|
|
2016-03-08 16:04:46 -08:00
|
|
|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
2016-01-26 13:06:42 -08:00
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|