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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/objc/RTCConfiguration+Private.h ('k') | webrtc/api/objc/RTCIceServer+Private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/objc/RTCIceServer.mm
diff --git a/webrtc/api/objc/RTCIceServer.mm b/webrtc/api/objc/RTCIceServer.mm
index 7a898e06d5b3e931f86b0468a1c02ca136f5be30..057c69603b0cfb1f5e9c559bb9467c8bec1c7fe2 100644
--- a/webrtc/api/objc/RTCIceServer.mm
+++ b/webrtc/api/objc/RTCIceServer.mm
@@ -61,4 +61,19 @@
return iceServer;
}
+- (instancetype)initWithNativeServer:
+ (webrtc::PeerConnectionInterface::IceServer)nativeServer {
+ NSMutableArray *urls =
+ [NSMutableArray arrayWithCapacity:nativeServer.urls.size()];
+ for (auto const &url : nativeServer.urls) {
+ [urls addObject:[NSString stringForStdString:url]];
+ }
+ NSString *username = [NSString stringForStdString:nativeServer.username];
+ NSString *credential = [NSString stringForStdString:nativeServer.password];
+ self = [self initWithURLStrings:urls
+ username:username
+ credential:credential];
+ return self;
+}
+
@end
« no previous file with comments | « webrtc/api/objc/RTCConfiguration+Private.h ('k') | webrtc/api/objc/RTCIceServer+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698