Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | #import <WebRTC/RTCMacros.h> |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 14 | |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 15 | NS_ASSUME_NONNULL_BEGIN |
| 16 | |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 17 | RTC_EXPORT |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 18 | @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 | */ |
tkchin | 121ac12 | 2016-03-21 09:08:40 -0700 | [diff] [blame] | 30 | @property(nonatomic, readonly) int sdpMLineIndex; |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 31 | |
| 32 | /** The SDP string for this candidate. */ |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 33 | @property(nonatomic, readonly) NSString *sdp; |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 34 | |
zhihuang | d7e771d | 2017-02-16 11:29:39 -0800 | [diff] [blame] | 35 | /** The URL of the ICE server which this candidate is gathered from. */ |
| 36 | @property(nonatomic, readonly, nullable) NSString *serverUrl; |
| 37 | |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 38 | - (instancetype)init NS_UNAVAILABLE; |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 39 | |
| 40 | /** |
| 41 | * Initialize an RTCIceCandidate from SDP. |
| 42 | */ |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 43 | - (instancetype)initWithSdp:(NSString *)sdp |
tkchin | 121ac12 | 2016-03-21 09:08:40 -0700 | [diff] [blame] | 44 | sdpMLineIndex:(int)sdpMLineIndex |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 45 | sdpMid:(nullable NSString *)sdpMid NS_DESIGNATED_INITIALIZER; |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 46 | |
| 47 | @end |
| 48 | |
| 49 | NS_ASSUME_NONNULL_END |