blob: fe9076c38d68b9f3ccd49080968192604c2a103d [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
tkchin8b577ed2016-04-19 10:04:41 -070013#import "webrtc/base/objc/RTCMacros.h"
14
hjonaa32c3e2015-12-13 19:58:11 -080015NS_ASSUME_NONNULL_BEGIN
16
tkchin8b577ed2016-04-19 10:04:41 -070017RTC_EXPORT
hjonaa32c3e2015-12-13 19:58:11 -080018@interface RTCIceServer : NSObject
19
20/** URI(s) for this server represented as NSStrings. */
Jon Hjelle32e0c012016-03-08 16:04:46 -080021@property(nonatomic, readonly) NSArray<NSString *> *urlStrings;
hjonaa32c3e2015-12-13 19:58:11 -080022
23/** Username to use if this RTCIceServer object is a TURN server. */
hjona2f77982016-03-04 07:09:09 -080024@property(nonatomic, readonly, nullable) NSString *username;
hjonaa32c3e2015-12-13 19:58:11 -080025
26/** Credential to use if this RTCIceServer object is a TURN server. */
hjona2f77982016-03-04 07:09:09 -080027@property(nonatomic, readonly, nullable) NSString *credential;
hjonaa32c3e2015-12-13 19:58:11 -080028
hjon6b039952016-02-25 12:32:58 -080029- (nonnull instancetype)init NS_UNAVAILABLE;
hjonaa32c3e2015-12-13 19:58:11 -080030
31/** Convenience initializer for a server with no authentication (e.g. STUN). */
Jon Hjelle32e0c012016-03-08 16:04:46 -080032- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings;
hjonaa32c3e2015-12-13 19:58:11 -080033
34/**
35 * Initialize an RTCIceServer with its associated URLs, optional username,
36 * optional credential, and credentialType.
37 */
Jon Hjelle32e0c012016-03-08 16:04:46 -080038- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
39 username:(nullable NSString *)username
40 credential:(nullable NSString *)credential
hjonaa32c3e2015-12-13 19:58:11 -080041 NS_DESIGNATED_INITIALIZER;
42
43@end
44
45NS_ASSUME_NONNULL_END