jimu-decompiled/sources/com/liulishuo/filedownloader/message/SmallMessageSnapshot.java
2025-05-13 19:24:51 +02:00

342 lines
11 KiB
Java

package com.liulishuo.filedownloader.message;
import android.os.Parcel;
import com.liulishuo.filedownloader.message.MessageSnapshot;
/* loaded from: classes.dex */
public abstract class SmallMessageSnapshot extends MessageSnapshot {
public static class CompletedFlowDirectlySnapshot extends CompletedSnapshot implements IFlowDirectly {
CompletedFlowDirectlySnapshot(int i, boolean z, int i2) {
super(i, z, i2);
}
CompletedFlowDirectlySnapshot(Parcel parcel) {
super(parcel);
}
}
public static class PausedSnapshot extends PendingMessageSnapshot {
PausedSnapshot(int i, int i2, int i3) {
super(i, i2, i3);
}
@Override // com.liulishuo.filedownloader.message.SmallMessageSnapshot.PendingMessageSnapshot, com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) -2;
}
}
public static class PendingMessageSnapshot extends SmallMessageSnapshot {
private final int sofarBytes;
private final int totalBytes;
PendingMessageSnapshot(PendingMessageSnapshot pendingMessageSnapshot) {
this(pendingMessageSnapshot.getId(), pendingMessageSnapshot.getSmallSofarBytes(), pendingMessageSnapshot.getSmallTotalBytes());
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallSofarBytes() {
return this.sofarBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallTotalBytes() {
return this.totalBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) 1;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.sofarBytes);
parcel.writeInt(this.totalBytes);
}
PendingMessageSnapshot(int i, int i2, int i3) {
super(i);
this.sofarBytes = i2;
this.totalBytes = i3;
}
PendingMessageSnapshot(Parcel parcel) {
super(parcel);
this.sofarBytes = parcel.readInt();
this.totalBytes = parcel.readInt();
}
}
public static class WarnFlowDirectlySnapshot extends WarnMessageSnapshot implements IFlowDirectly {
WarnFlowDirectlySnapshot(int i, int i2, int i3) {
super(i, i2, i3);
}
WarnFlowDirectlySnapshot(Parcel parcel) {
super(parcel);
}
}
public static class WarnMessageSnapshot extends PendingMessageSnapshot implements MessageSnapshot.IWarnMessageSnapshot {
WarnMessageSnapshot(int i, int i2, int i3) {
super(i, i2, i3);
}
@Override // com.liulishuo.filedownloader.message.SmallMessageSnapshot.PendingMessageSnapshot, com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) -4;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot.IWarnMessageSnapshot
public MessageSnapshot turnToPending() {
return new PendingMessageSnapshot(this);
}
WarnMessageSnapshot(Parcel parcel) {
super(parcel);
}
}
SmallMessageSnapshot(int i) {
super(i);
this.isLargeFile = false;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public long getLargeSofarBytes() {
return getSmallSofarBytes();
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public long getLargeTotalBytes() {
return getSmallTotalBytes();
}
public static class ProgressMessageSnapshot extends SmallMessageSnapshot {
private final int sofarBytes;
ProgressMessageSnapshot(int i, int i2) {
super(i);
this.sofarBytes = i2;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallSofarBytes() {
return this.sofarBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) 3;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.sofarBytes);
}
ProgressMessageSnapshot(Parcel parcel) {
super(parcel);
this.sofarBytes = parcel.readInt();
}
}
public static class RetryMessageSnapshot extends ErrorMessageSnapshot {
private final int retryingTimes;
RetryMessageSnapshot(int i, int i2, Throwable th, int i3) {
super(i, i2, th);
this.retryingTimes = i3;
}
@Override // com.liulishuo.filedownloader.message.SmallMessageSnapshot.ErrorMessageSnapshot, com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getRetryingTimes() {
return this.retryingTimes;
}
@Override // com.liulishuo.filedownloader.message.SmallMessageSnapshot.ErrorMessageSnapshot, com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) 5;
}
@Override // com.liulishuo.filedownloader.message.SmallMessageSnapshot.ErrorMessageSnapshot, com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.retryingTimes);
}
RetryMessageSnapshot(Parcel parcel) {
super(parcel);
this.retryingTimes = parcel.readInt();
}
}
public static class CompletedSnapshot extends SmallMessageSnapshot {
private final boolean reusedDownloadedFile;
private final int totalBytes;
CompletedSnapshot(int i, boolean z, int i2) {
super(i);
this.reusedDownloadedFile = z;
this.totalBytes = i2;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallTotalBytes() {
return this.totalBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) -3;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public boolean isReusedDownloadedFile() {
return this.reusedDownloadedFile;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeByte(this.reusedDownloadedFile ? (byte) 1 : (byte) 0);
parcel.writeInt(this.totalBytes);
}
CompletedSnapshot(Parcel parcel) {
super(parcel);
this.reusedDownloadedFile = parcel.readByte() != 0;
this.totalBytes = parcel.readInt();
}
}
public static class ErrorMessageSnapshot extends SmallMessageSnapshot {
private final int sofarBytes;
private final Throwable throwable;
ErrorMessageSnapshot(int i, int i2, Throwable th) {
super(i);
this.sofarBytes = i2;
this.throwable = th;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallSofarBytes() {
return this.sofarBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) -1;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public Throwable getThrowable() {
return this.throwable;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.sofarBytes);
parcel.writeSerializable(this.throwable);
}
ErrorMessageSnapshot(Parcel parcel) {
super(parcel);
this.sofarBytes = parcel.readInt();
this.throwable = (Throwable) parcel.readSerializable();
}
}
SmallMessageSnapshot(Parcel parcel) {
super(parcel);
}
public static class ConnectedMessageSnapshot extends SmallMessageSnapshot {
private final String etag;
private final String fileName;
private final boolean resuming;
private final int totalBytes;
ConnectedMessageSnapshot(int i, boolean z, int i2, String str, String str2) {
super(i);
this.resuming = z;
this.totalBytes = i2;
this.etag = str;
this.fileName = str2;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public String getEtag() {
return this.etag;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public String getFileName() {
return this.fileName;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public int getSmallTotalBytes() {
return this.totalBytes;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public byte getStatus() {
return (byte) 2;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot
public boolean isResuming() {
return this.resuming;
}
@Override // com.liulishuo.filedownloader.message.MessageSnapshot, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeByte(this.resuming ? (byte) 1 : (byte) 0);
parcel.writeInt(this.totalBytes);
parcel.writeString(this.etag);
parcel.writeString(this.fileName);
}
ConnectedMessageSnapshot(Parcel parcel) {
super(parcel);
this.resuming = parcel.readByte() != 0;
this.totalBytes = parcel.readInt();
this.etag = parcel.readString();
this.fileName = parcel.readString();
}
}
}