blob: be4e0d7b6e89da90cbbbc38faa53826bd3bc59b6 [file] [log] [blame]
hjonaa32c3e2015-12-13 19:58:11 -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
13NS_ASSUME_NONNULL_BEGIN
14
15@interface RTCIceServer : NSObject
16
17/** URI(s) for this server represented as NSStrings. */
18@property(nonatomic, copy, readonly) NSArray<NSString *> *urlStrings;
19
20/** Username to use if this RTCIceServer object is a TURN server. */
21@property(nonatomic, copy, readonly, nullable) NSString *username;
22
23/** Credential to use if this RTCIceServer object is a TURN server. */
24@property(nonatomic, copy, readonly, nullable) NSString *credential;
25
26- (instancetype)init NS_UNAVAILABLE;
27
28/** Convenience initializer for a server with no authentication (e.g. STUN). */
29- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings;
30
31/**
32 * Initialize an RTCIceServer with its associated URLs, optional username,
33 * optional credential, and credentialType.
34 */
35- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
36 username:(nullable NSString *)username
37 credential:(nullable NSString *)credential
38 NS_DESIGNATED_INITIALIZER;
39
40@end
41
42NS_ASSUME_NONNULL_END