| 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 |
| 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 |
| 30 | @CalledByNative |
| 31 | CandidatePairChangeEvent(IceCandidate local, IceCandidate remote, int lastDataReceivedMs, |
| 32 | String reason, int estimatedDisconnectedTimeMs) { |
| 33 | this.local = local; |
| 34 | this.remote = remote; |
| 35 | this.lastDataReceivedMs = lastDataReceivedMs; |
| 36 | this.reason = reason; |
| 37 | this.estimatedDisconnectedTimeMs = estimatedDisconnectedTimeMs; |
| 38 | } |
| 39 | } |
| 40 |