StunServer.swift 485 B

123456789101112131415161718192021
  1. //
  2. // SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  3. // SPDX-License-Identifier: GPL-3.0-or-later
  4. //
  5. import Foundation
  6. @objcMembers public class StunServer: NSObject {
  7. public var urls: [String]?
  8. init(dictionary: [String: Any]) {
  9. super.init()
  10. if let stunUrl = dictionary["url"] as? String {
  11. urls = [stunUrl]
  12. } else if let stunUrls = dictionary["urls"] as? [String] {
  13. urls = stunUrls
  14. }
  15. }
  16. }