discord-jadx/app/src/main/java/org/webrtc/NetworkChangeDetector.java

99 lines
2.6 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package org.webrtc;
import androidx.annotation.Nullable;
import java.util.List;
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public interface NetworkChangeDetector {
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public enum ConnectionType {
CONNECTION_UNKNOWN,
CONNECTION_ETHERNET,
CONNECTION_WIFI,
CONNECTION_5G,
CONNECTION_4G,
CONNECTION_3G,
CONNECTION_2G,
CONNECTION_UNKNOWN_CELLULAR,
CONNECTION_BLUETOOTH,
CONNECTION_VPN,
CONNECTION_NONE
}
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public static class IPAddress {
public final byte[] address;
public IPAddress(byte[] bArr) {
this.address = bArr;
}
@CalledByNative("IPAddress")
private byte[] getAddress() {
return this.address;
}
}
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public static class NetworkInformation {
public final long handle;
public final IPAddress[] ipAddresses;
public final String name;
public final ConnectionType type;
public final ConnectionType underlyingTypeForVpn;
public NetworkInformation(String str, ConnectionType connectionType, ConnectionType connectionType2, long j, IPAddress[] iPAddressArr) {
this.name = str;
this.type = connectionType;
this.underlyingTypeForVpn = connectionType2;
this.handle = j;
this.ipAddresses = iPAddressArr;
}
@CalledByNative("NetworkInformation")
private ConnectionType getConnectionType() {
return this.type;
}
@CalledByNative("NetworkInformation")
private long getHandle() {
return this.handle;
}
@CalledByNative("NetworkInformation")
private IPAddress[] getIpAddresses() {
return this.ipAddresses;
}
@CalledByNative("NetworkInformation")
private String getName() {
return this.name;
}
@CalledByNative("NetworkInformation")
private ConnectionType getUnderlyingConnectionTypeForVpn() {
return this.underlyingTypeForVpn;
}
}
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public interface Observer {
void onConnectionTypeChanged(ConnectionType connectionType);
void onNetworkConnect(NetworkInformation networkInformation);
void onNetworkDisconnect(long j);
void onNetworkPreference(List<ConnectionType> list, int i);
}
void destroy();
@Nullable
List<NetworkInformation> getActiveNetworkList();
ConnectionType getCurrentConnectionType();
boolean supportNetworkCallback();
}