RTCIceCandidate.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #import <Foundation/Foundation.h>
  11. #import "RTCMacros.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. RTC_OBJC_EXPORT
  14. @interface RTC_OBJC_TYPE (RTCIceCandidate) : NSObject
  15. /**
  16. * If present, the identifier of the "media stream identification" for the media
  17. * component this candidate is associated with.
  18. */
  19. @property(nonatomic, readonly, nullable) NSString *sdpMid;
  20. /**
  21. * The index (starting at zero) of the media description this candidate is
  22. * associated with in the SDP.
  23. */
  24. @property(nonatomic, readonly) int sdpMLineIndex;
  25. /** The SDP string for this candidate. */
  26. @property(nonatomic, readonly) NSString *sdp;
  27. /** The URL of the ICE server which this candidate is gathered from. */
  28. @property(nonatomic, readonly, nullable) NSString *serverUrl;
  29. - (instancetype)init NS_UNAVAILABLE;
  30. /**
  31. * Initialize an RTCIceCandidate from SDP.
  32. */
  33. - (instancetype)initWithSdp:(NSString *)sdp
  34. sdpMLineIndex:(int)sdpMLineIndex
  35. sdpMid:(nullable NSString *)sdpMid NS_DESIGNATED_INITIALIZER;
  36. @end
  37. NS_ASSUME_NONNULL_END