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

Side by Side Diff: webrtc/sdk/android/api/org/webrtc/PeerConnection.java

Issue 2993403002: Support a user-provided string for the TLS ALPN extension.
Patch Set: Fix previous commit Created 3 years, 3 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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 public final String username; 103 public final String username;
104 public final String password; 104 public final String password;
105 public final TlsCertPolicy tlsCertPolicy; 105 public final TlsCertPolicy tlsCertPolicy;
106 106
107 // If the URIs in |urls| only contain IP addresses, this field can be used 107 // If the URIs in |urls| only contain IP addresses, this field can be used
108 // to indicate the hostname, which may be necessary for TLS (using the SNI 108 // to indicate the hostname, which may be necessary for TLS (using the SNI
109 // extension). If |urls| itself contains the hostname, this isn't 109 // extension). If |urls| itself contains the hostname, this isn't
110 // necessary. 110 // necessary.
111 public final String hostname; 111 public final String hostname;
112 112
113 // List of protocols to be used in the TLS ALPN extension.
114 public final List<String> tlsAlpnProtocols;
115
113 /** Convenience constructor for STUN servers. */ 116 /** Convenience constructor for STUN servers. */
114 public IceServer(String uri) { 117 public IceServer(String uri) {
115 this(uri, "", ""); 118 this(uri, "", "");
116 } 119 }
117 120
118 public IceServer(String uri, String username, String password) { 121 public IceServer(String uri, String username, String password) {
119 this(uri, username, password, TlsCertPolicy.TLS_CERT_POLICY_SECURE); 122 this(uri, username, password, TlsCertPolicy.TLS_CERT_POLICY_SECURE);
120 } 123 }
121 124
122 public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy) { 125 public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy) {
123 this(uri, username, password, tlsCertPolicy, ""); 126 this(uri, username, password, tlsCertPolicy, "");
124 } 127 }
125 128
126 public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy, 129 public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy,
127 String hostname) { 130 String hostname) {
131 this(uri, username, password, tlsCertPolicy, hostname, null);
132 }
133
134 public IceServer(String uri, String username, String password, TlsCertPolicy tlsCertPolicy,
135 String hostname, List<String> tlsAlpnProtocols) {
128 this.uri = uri; 136 this.uri = uri;
129 this.username = username; 137 this.username = username;
130 this.password = password; 138 this.password = password;
131 this.tlsCertPolicy = tlsCertPolicy; 139 this.tlsCertPolicy = tlsCertPolicy;
132 this.hostname = hostname; 140 this.hostname = hostname;
141 this.tlsAlpnProtocols = tlsAlpnProtocols;
133 } 142 }
134 143
135 public String toString() { 144 public String toString() {
136 return uri + " [" + username + ":" + password + "] [" + tlsCertPolicy + "] [" + hostname 145 return uri + " [" + username + ":" + password + "] [" + tlsCertPolicy + "] [" + hostname
137 + "]"; 146 + "] [" + tlsAlpnProtocols + "]";
138 } 147 }
139 } 148 }
140 149
141 /** Java version of PeerConnectionInterface.IceTransportsType */ 150 /** Java version of PeerConnectionInterface.IceTransportsType */
142 public enum IceTransportsType { NONE, RELAY, NOHOST, ALL } 151 public enum IceTransportsType { NONE, RELAY, NOHOST, ALL }
143 152
144 /** Java version of PeerConnectionInterface.BundlePolicy */ 153 /** Java version of PeerConnectionInterface.BundlePolicy */
145 public enum BundlePolicy { BALANCED, MAXBUNDLE, MAXCOMPAT } 154 public enum BundlePolicy { BALANCED, MAXBUNDLE, MAXCOMPAT }
146 155
147 /** Java version of PeerConnectionInterface.RtcpMuxPolicy */ 156 /** Java version of PeerConnectionInterface.RtcpMuxPolicy */
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 private native RtpSender nativeCreateSender(String kind, String stream_id); 440 private native RtpSender nativeCreateSender(String kind, String stream_id);
432 441
433 private native List<RtpSender> nativeGetSenders(); 442 private native List<RtpSender> nativeGetSenders();
434 443
435 private native List<RtpReceiver> nativeGetReceivers(); 444 private native List<RtpReceiver> nativeGetReceivers();
436 445
437 private native boolean nativeStartRtcEventLog(int file_descriptor, int max_siz e_bytes); 446 private native boolean nativeStartRtcEventLog(int file_descriptor, int max_siz e_bytes);
438 447
439 private native void nativeStopRtcEventLog(); 448 private native void nativeStopRtcEventLog();
440 } 449 }
OLDNEW
« no previous file with comments | « webrtc/rtc_base/ssladapter_unittest.cc ('k') | webrtc/sdk/android/src/jni/pc/java_native_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698