Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: webrtc/api/objc/RTCIceServer.mm

Issue 1616303002: Update API for Objective-C RTCConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes based on feedback Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 iceServer.password = [NSString stdStringForString:_credential]; 54 iceServer.password = [NSString stdStringForString:_credential];
55 55
56 [_urlStrings enumerateObjectsUsingBlock:^(NSString *url, 56 [_urlStrings enumerateObjectsUsingBlock:^(NSString *url,
57 NSUInteger idx, 57 NSUInteger idx,
58 BOOL *stop) { 58 BOOL *stop) {
59 iceServer.urls.push_back(url.stdString); 59 iceServer.urls.push_back(url.stdString);
60 }]; 60 }];
61 return iceServer; 61 return iceServer;
62 } 62 }
63 63
64 - (instancetype)initWithNativeServer:
65 (webrtc::PeerConnectionInterface::IceServer)nativeServer {
66 NSMutableArray *urls =
67 [NSMutableArray arrayWithCapacity:nativeServer.urls.size()];
68 for (auto const &url : nativeServer.urls) {
69 [urls addObject:[NSString stringForStdString:url]];
70 }
71 NSString *username = [NSString stringForStdString:nativeServer.username];
72 NSString *credential = [NSString stringForStdString:nativeServer.password];
73 self = [self initWithURLStrings:urls
74 username:username
75 credential:credential];
76 return self;
77 }
78
64 @end 79 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698