blob: fb5064e5185ac57a8512520638f598ad0f0a3fb2 [file] [log] [blame]
Jon Hjelle29d5e572016-01-06 11:49: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
tkchin9eeb6242016-04-27 01:54:20 -070013#import <WebRTC/RTCMacros.h>
tkchin8b577ed2016-04-19 10:04:41 -070014
Jon Hjelle29d5e572016-01-06 11:49:11 -080015NS_ASSUME_NONNULL_BEGIN
16
tkchin8b577ed2016-04-19 10:04:41 -070017RTC_EXPORT
Jon Hjelle29d5e572016-01-06 11:49:11 -080018@interface RTCIceCandidate : NSObject
19
20/**
21 * If present, the identifier of the "media stream identification" for the media
22 * component this candidate is associated with.
23 */
24@property(nonatomic, readonly, nullable) NSString *sdpMid;
25
26/**
27 * The index (starting at zero) of the media description this candidate is
28 * associated with in the SDP.
29 */
tkchin121ac122016-03-21 09:08:40 -070030@property(nonatomic, readonly) int sdpMLineIndex;
Jon Hjelle29d5e572016-01-06 11:49:11 -080031
32/** The SDP string for this candidate. */
Jon Hjelle32e0c012016-03-08 16:04:46 -080033@property(nonatomic, readonly) NSString *sdp;
Jon Hjelle29d5e572016-01-06 11:49:11 -080034
zhihuangd7e771d2017-02-16 11:29:39 -080035/** The URL of the ICE server which this candidate is gathered from. */
36@property(nonatomic, readonly, nullable) NSString *serverUrl;
37
Jon Hjelle32e0c012016-03-08 16:04:46 -080038- (instancetype)init NS_UNAVAILABLE;
Jon Hjelle29d5e572016-01-06 11:49:11 -080039
40/**
41 * Initialize an RTCIceCandidate from SDP.
42 */
Jon Hjelle32e0c012016-03-08 16:04:46 -080043- (instancetype)initWithSdp:(NSString *)sdp
tkchin121ac122016-03-21 09:08:40 -070044 sdpMLineIndex:(int)sdpMLineIndex
Yves Gerey665174f2018-06-19 15:03:05 +020045 sdpMid:(nullable NSString *)sdpMid NS_DESIGNATED_INITIALIZER;
Jon Hjelle29d5e572016-01-06 11:49:11 -080046
47@end
48
49NS_ASSUME_NONNULL_END