session-ios/Signal/src/call/TurnServerInfo.swift
Michael Kirk 647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
2017-01-12 09:56:05 -05:00

33 lines
787 B
Swift

// Created by Michael Kirk on 12/18/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
import Foundation
struct TurnServerInfo {
let TAG = "[TurnServerInfo]"
let password: String
let username: String
let urls: [String]
init?(attributes: [String: AnyObject]) {
if let passwordAttribute = (attributes["password"] as? String) {
password = passwordAttribute
} else {
return nil
}
if let usernameAttribute = attributes["username"] as? String {
username = usernameAttribute
} else {
return nil
}
if let urlsAttribute = attributes["urls"] as? [String] {
urls = urlsAttribute
} else {
return nil
}
}
}