Alex Drake | 43faee0 | 2019-08-12 16:27:34 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | package org.webrtc; |
| 12 | |
| 13 | /** |
| 14 | * Representation of a change in selected ICE candidate pair. |
| 15 | * {@code CandidatePairChangeEvent} in the C++ API. |
| 16 | */ |
| 17 | public final class CandidatePairChangeEvent { |
| 18 | public final IceCandidate local; |
| 19 | public final IceCandidate remote; |
| 20 | public final int lastDataReceivedMs; |
| 21 | public final String reason; |
| 22 | |
Jonas Oreland | 93a9d19 | 2020-08-20 12:25:04 +0200 | [diff] [blame^] | 23 | /** |
| 24 | * An estimate from the ICE stack on how long it was disconnected before |
| 25 | * changing to the new candidate pair in this event. |
| 26 | * The first time an candidate pair is signaled the value will be 0. |
| 27 | */ |
| 28 | public final int estimatedDisconnectedTimeMs; |
| 29 | |
Alex Drake | 43faee0 | 2019-08-12 16:27:34 -0700 | [diff] [blame] | 30 | @CalledByNative |
Jonas Oreland | 93a9d19 | 2020-08-20 12:25:04 +0200 | [diff] [blame^] | 31 | CandidatePairChangeEvent(IceCandidate local, IceCandidate remote, int lastDataReceivedMs, |
| 32 | String reason, int estimatedDisconnectedTimeMs) { |
Alex Drake | 43faee0 | 2019-08-12 16:27:34 -0700 | [diff] [blame] | 33 | this.local = local; |
| 34 | this.remote = remote; |
| 35 | this.lastDataReceivedMs = lastDataReceivedMs; |
| 36 | this.reason = reason; |
Jonas Oreland | 93a9d19 | 2020-08-20 12:25:04 +0200 | [diff] [blame^] | 37 | this.estimatedDisconnectedTimeMs = estimatedDisconnectedTimeMs; |
Alex Drake | 43faee0 | 2019-08-12 16:27:34 -0700 | [diff] [blame] | 38 | } |
| 39 | } |