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

Side by Side Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2984863002: Adding Android binding for RTCConfiguration::max_ipv6_networks. (Closed)
Patch Set: Rebase Created 3 years, 4 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
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 GetFieldID(jni, j_rtc_config_class, "pruneTurnPorts", "Z"); 1530 GetFieldID(jni, j_rtc_config_class, "pruneTurnPorts", "Z");
1531 1531
1532 jfieldID j_ice_check_min_interval_id = GetFieldID( 1532 jfieldID j_ice_check_min_interval_id = GetFieldID(
1533 jni, j_rtc_config_class, "iceCheckMinInterval", "Ljava/lang/Integer;"); 1533 jni, j_rtc_config_class, "iceCheckMinInterval", "Ljava/lang/Integer;");
1534 jclass j_integer_class = jni->FindClass("java/lang/Integer"); 1534 jclass j_integer_class = jni->FindClass("java/lang/Integer");
1535 jmethodID int_value_id = GetMethodID(jni, j_integer_class, "intValue", "()I"); 1535 jmethodID int_value_id = GetMethodID(jni, j_integer_class, "intValue", "()I");
1536 1536
1537 jfieldID j_disable_ipv6_on_wifi_id = 1537 jfieldID j_disable_ipv6_on_wifi_id =
1538 GetFieldID(jni, j_rtc_config_class, "disableIPv6OnWifi", "Z"); 1538 GetFieldID(jni, j_rtc_config_class, "disableIPv6OnWifi", "Z");
1539 1539
1540 jfieldID j_max_ipv6_networks_id =
1541 GetFieldID(jni, j_rtc_config_class, "maxIPv6Networks", "I");
1542
1540 jfieldID j_ice_regather_interval_range_id = 1543 jfieldID j_ice_regather_interval_range_id =
1541 GetFieldID(jni, j_rtc_config_class, "iceRegatherIntervalRange", 1544 GetFieldID(jni, j_rtc_config_class, "iceRegatherIntervalRange",
1542 "Lorg/webrtc/PeerConnection$IntervalRange;"); 1545 "Lorg/webrtc/PeerConnection$IntervalRange;");
1543 jclass j_interval_range_class = 1546 jclass j_interval_range_class =
1544 jni->FindClass("org/webrtc/PeerConnection$IntervalRange"); 1547 jni->FindClass("org/webrtc/PeerConnection$IntervalRange");
1545 jmethodID get_min_id = 1548 jmethodID get_min_id =
1546 GetMethodID(jni, j_interval_range_class, "getMin", "()I"); 1549 GetMethodID(jni, j_interval_range_class, "getMin", "()I");
1547 jmethodID get_max_id = 1550 jmethodID get_max_id =
1548 GetMethodID(jni, j_interval_range_class, "getMax", "()I"); 1551 GetMethodID(jni, j_interval_range_class, "getMax", "()I");
1549 1552
(...skipping 28 matching lines...) Expand all
1578 jobject j_ice_check_min_interval = 1581 jobject j_ice_check_min_interval =
1579 GetNullableObjectField(jni, j_rtc_config, j_ice_check_min_interval_id); 1582 GetNullableObjectField(jni, j_rtc_config, j_ice_check_min_interval_id);
1580 if (!IsNull(jni, j_ice_check_min_interval)) { 1583 if (!IsNull(jni, j_ice_check_min_interval)) {
1581 int ice_check_min_interval_value = 1584 int ice_check_min_interval_value =
1582 jni->CallIntMethod(j_ice_check_min_interval, int_value_id); 1585 jni->CallIntMethod(j_ice_check_min_interval, int_value_id);
1583 rtc_config->ice_check_min_interval = 1586 rtc_config->ice_check_min_interval =
1584 rtc::Optional<int>(ice_check_min_interval_value); 1587 rtc::Optional<int>(ice_check_min_interval_value);
1585 } 1588 }
1586 rtc_config->disable_ipv6_on_wifi = 1589 rtc_config->disable_ipv6_on_wifi =
1587 GetBooleanField(jni, j_rtc_config, j_disable_ipv6_on_wifi_id); 1590 GetBooleanField(jni, j_rtc_config, j_disable_ipv6_on_wifi_id);
1591 rtc_config->max_ipv6_networks =
1592 GetIntField(jni, j_rtc_config, j_max_ipv6_networks_id);
1588 jobject j_ice_regather_interval_range = GetNullableObjectField( 1593 jobject j_ice_regather_interval_range = GetNullableObjectField(
1589 jni, j_rtc_config, j_ice_regather_interval_range_id); 1594 jni, j_rtc_config, j_ice_regather_interval_range_id);
1590 if (!IsNull(jni, j_ice_regather_interval_range)) { 1595 if (!IsNull(jni, j_ice_regather_interval_range)) {
1591 int min = jni->CallIntMethod(j_ice_regather_interval_range, get_min_id); 1596 int min = jni->CallIntMethod(j_ice_regather_interval_range, get_min_id);
1592 int max = jni->CallIntMethod(j_ice_regather_interval_range, get_max_id); 1597 int max = jni->CallIntMethod(j_ice_regather_interval_range, get_max_id);
1593 rtc_config->ice_regather_interval_range.emplace(min, max); 1598 rtc_config->ice_regather_interval_range.emplace(min, max);
1594 } 1599 }
1595 } 1600 }
1596 1601
1597 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( 1602 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) 2358 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
2354 ->inter_tone_gap(); 2359 ->inter_tone_gap();
2355 } 2360 }
2356 2361
2357 JOW(void, DtmfSender_free) 2362 JOW(void, DtmfSender_free)
2358 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { 2363 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) {
2359 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); 2364 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release();
2360 } 2365 }
2361 2366
2362 } // namespace webrtc_jni 2367 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698