blob: 94e3497aea2462102a13a89f48a13bac0397b13d [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
hjon6b039952016-02-25 12:32:58 -080014// TODO(hjon): Update nullability types. See http://crbug/webrtc/5592
hjonaa32c3e2015-12-13 19:58:11 -080015
16@interface RTCIceServer : NSObject
17
18/** URI(s) for this server represented as NSStrings. */
hjon6b039952016-02-25 12:32:58 -080019@property(nonatomic, copy, readonly, nonnull) NSArray *urlStrings;
20// @property(nonatomic, copy, readonly) NSArray<NSString *> *urlStrings;
hjonaa32c3e2015-12-13 19:58:11 -080021
22/** Username to use if this RTCIceServer object is a TURN server. */
23@property(nonatomic, copy, readonly, nullable) NSString *username;
24
25/** Credential to use if this RTCIceServer object is a TURN server. */
26@property(nonatomic, copy, readonly, nullable) NSString *credential;
27
hjon6b039952016-02-25 12:32:58 -080028- (nonnull instancetype)init NS_UNAVAILABLE;
hjonaa32c3e2015-12-13 19:58:11 -080029
30/** Convenience initializer for a server with no authentication (e.g. STUN). */
hjon6b039952016-02-25 12:32:58 -080031- (nonnull instancetype)initWithURLStrings:(nonnull NSArray *)urlStrings;
32// - (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 */
hjon6b039952016-02-25 12:32:58 -080038- (nonnull instancetype)initWithURLStrings:(nonnull NSArray *)urlStrings
39// - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
40 username:(nullable NSString *)username
41 credential:(nullable NSString *)credential
hjonaa32c3e2015-12-13 19:58:11 -080042 NS_DESIGNATED_INITIALIZER;
43
44@end
45
46NS_ASSUME_NONNULL_END