家家有田 v1.2.8版本的 MD5 值为:62f44aac901441b9b72af508fbe86bf2
以下内容为反编译后的 DownloadConfig.java 源代码,内容仅作参考
package com.zjh.download.core;
import com.tencent.smtt.sdk.TbsVideoCacheTask;
import com.zjh.download.core.DefaultDownloadQueue;
import com.zjh.download.helper.Api;
import com.zjh.download.helper.DefaultHttpClientFactory;
import com.zjh.download.helper.HttpClientFactory;
import com.zjh.download.helper.RequestKt;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.ResponseBody;
import retrofit2.Response;
@Metadata(d1 = {"\u0000T\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b%\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001Bk\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\u0014\b\u0002\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\b0\u0007\u0012\b\b\u0002\u0010\t\u001a\u00020\n\u0012\b\b\u0002\u0010\u000b\u001a\u00020\f\u0012\b\b\u0002\u0010\r\u001a\u00020\u000e\u0012\b\b\u0002\u0010\u000f\u001a\u00020\u0010\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u0013\u001a\u00020\b¢\u0006\u0002\u0010\u0014J3\u0010;\u001a\b\u0012\u0004\u0012\u00020=0<2\u0006\u0010>\u001a\u00020\b2\u0012\u0010?\u001a\u000e\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\b0\u0007H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010@R\u000e\u0010\u0015\u001a\u00020\u0016X\u0082\u0004¢\u0006\u0002\n\u0000R\u001a\u0010\u0013\u001a\u00020\bX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0017\u0010\u0018\"\u0004\b\u0019\u0010\u001aR&\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\b0\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001b\u0010\u001c\"\u0004\b\u001d\u0010\u001eR\u001a\u0010\t\u001a\u00020\nX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001f\u0010 \"\u0004\b!\u0010\"R\u001a\u0010\u0011\u001a\u00020\u0012X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b#\u0010$\"\u0004\b%\u0010&R\u001a\u0010\u0004\u001a\u00020\u0005X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b'\u0010(\"\u0004\b)\u0010*R\u001a\u0010\r\u001a\u00020\u000eX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b+\u0010,\"\u0004\b-\u0010.R\u001a\u0010\u000b\u001a\u00020\fX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b/\u00100\"\u0004\b1\u00102R\u001a\u0010\u0002\u001a\u00020\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b3\u00104\"\u0004\b5\u00106R\u001a\u0010\u000f\u001a\u00020\u0010X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b7\u00108\"\u0004\b9\u0010:\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006A"}, d2 = {"Lcom/zjh/download/core/DownloadConfig;", "", "taskManager", "Lcom/zjh/download/core/TaskManager;", "queue", "Lcom/zjh/download/core/DownloadQueue;", "customHeader", "", "", "dispatcher", "Lcom/zjh/download/core/DownloadDispatcher;", "rangeSize", "", "rangeCurrency", "", "validator", "Lcom/zjh/download/core/FileValidator;", "httpClientFactory", "Lcom/zjh/download/helper/HttpClientFactory;", "baseUrl", "(Lcom/zjh/download/core/TaskManager;Lcom/zjh/download/core/DownloadQueue;Ljava/util/Map;Lcom/zjh/download/core/DownloadDispatcher;JILcom/zjh/download/core/FileValidator;Lcom/zjh/download/helper/HttpClientFactory;Ljava/lang/String;)V", "api", "Lcom/zjh/download/helper/Api;", "getBaseUrl", "()Ljava/lang/String;", "setBaseUrl", "(Ljava/lang/String;)V", "getCustomHeader", "()Ljava/util/Map;", "setCustomHeader", "(Ljava/util/Map;)V", "getDispatcher", "()Lcom/zjh/download/core/DownloadDispatcher;", "setDispatcher", "(Lcom/zjh/download/core/DownloadDispatcher;)V", "getHttpClientFactory", "()Lcom/zjh/download/helper/HttpClientFactory;", "setHttpClientFactory", "(Lcom/zjh/download/helper/HttpClientFactory;)V", "getQueue", "()Lcom/zjh/download/core/DownloadQueue;", "setQueue", "(Lcom/zjh/download/core/DownloadQueue;)V", "getRangeCurrency", "()I", "setRangeCurrency", "(I)V", "getRangeSize", "()J", "setRangeSize", "(J)V", "getTaskManager", "()Lcom/zjh/download/core/TaskManager;", "setTaskManager", "(Lcom/zjh/download/core/TaskManager;)V", "getValidator", "()Lcom/zjh/download/core/FileValidator;", "setValidator", "(Lcom/zjh/download/core/FileValidator;)V", "request", "Lretrofit2/Response;", "Lokhttp3/ResponseBody;", "url", TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_HEADER, "(Ljava/lang/String;Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "download_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class DownloadConfig {
private final Api api;
private String baseUrl;
private Map<String, String> customHeader;
private DownloadDispatcher dispatcher;
private HttpClientFactory httpClientFactory;
private DownloadQueue queue;
private int rangeCurrency;
private long rangeSize;
private TaskManager taskManager;
private FileValidator validator;
public DownloadConfig() {
this(null, null, null, null, 0L, 0, null, null, null, 511, null);
}
public DownloadConfig(TaskManager taskManager, DownloadQueue queue, Map<String, String> customHeader, DownloadDispatcher dispatcher, long j, int i, FileValidator validator, HttpClientFactory httpClientFactory, String baseUrl) {
Intrinsics.checkNotNullParameter(taskManager, "taskManager");
Intrinsics.checkNotNullParameter(queue, "queue");
Intrinsics.checkNotNullParameter(customHeader, "customHeader");
Intrinsics.checkNotNullParameter(dispatcher, "dispatcher");
Intrinsics.checkNotNullParameter(validator, "validator");
Intrinsics.checkNotNullParameter(httpClientFactory, "httpClientFactory");
Intrinsics.checkNotNullParameter(baseUrl, "baseUrl");
this.taskManager = taskManager;
this.queue = queue;
this.customHeader = customHeader;
this.dispatcher = dispatcher;
this.rangeSize = j;
this.rangeCurrency = i;
this.validator = validator;
this.httpClientFactory = httpClientFactory;
this.baseUrl = baseUrl;
this.api = RequestKt.apiCreator(httpClientFactory.create(), this.baseUrl);
}
public DownloadConfig(TaskManager taskManager, DownloadQueue downloadQueue, Map map, DownloadDispatcher downloadDispatcher, long j, int i, FileValidator fileValidator, HttpClientFactory httpClientFactory, String str, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? DefaultTaskManager.INSTANCE : taskManager, (i2 & 2) != 0 ? DefaultDownloadQueue.Companion.get$default(DefaultDownloadQueue.Companion, 0, 1, null) : downloadQueue, (i2 & 4) != 0 ? MapsKt.emptyMap() : map, (i2 & 8) != 0 ? DefaultDownloadDispatcher.INSTANCE : downloadDispatcher, (i2 & 16) != 0 ? 5242880L : j, (i2 & 32) != 0 ? 5 : i, (i2 & 64) != 0 ? DefaultFileValidator.INSTANCE : fileValidator, (i2 & 128) != 0 ? DefaultHttpClientFactory.INSTANCE : httpClientFactory, (i2 & 256) != 0 ? "http://www.example.com" : str);
}
public final TaskManager getTaskManager() {
return this.taskManager;
}
public final void setTaskManager(TaskManager taskManager) {
Intrinsics.checkNotNullParameter(taskManager, "<set-?>");
this.taskManager = taskManager;
}
public final DownloadQueue getQueue() {
return this.queue;
}
public final void setQueue(DownloadQueue downloadQueue) {
Intrinsics.checkNotNullParameter(downloadQueue, "<set-?>");
this.queue = downloadQueue;
}
public final Map<String, String> getCustomHeader() {
return this.customHeader;
}
public final void setCustomHeader(Map<String, String> map) {
Intrinsics.checkNotNullParameter(map, "<set-?>");
this.customHeader = map;
}
public final DownloadDispatcher getDispatcher() {
return this.dispatcher;
}
public final void setDispatcher(DownloadDispatcher downloadDispatcher) {
Intrinsics.checkNotNullParameter(downloadDispatcher, "<set-?>");
this.dispatcher = downloadDispatcher;
}
public final long getRangeSize() {
return this.rangeSize;
}
public final void setRangeSize(long j) {
this.rangeSize = j;
}
public final int getRangeCurrency() {
return this.rangeCurrency;
}
public final void setRangeCurrency(int i) {
this.rangeCurrency = i;
}
public final FileValidator getValidator() {
return this.validator;
}
public final void setValidator(FileValidator fileValidator) {
Intrinsics.checkNotNullParameter(fileValidator, "<set-?>");
this.validator = fileValidator;
}
public final HttpClientFactory getHttpClientFactory() {
return this.httpClientFactory;
}
public final void setHttpClientFactory(HttpClientFactory httpClientFactory) {
Intrinsics.checkNotNullParameter(httpClientFactory, "<set-?>");
this.httpClientFactory = httpClientFactory;
}
public final String getBaseUrl() {
return this.baseUrl;
}
public final void setBaseUrl(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.baseUrl = str;
}
public final Object request(String str, Map<String, String> map, Continuation<? super Response<ResponseBody>> continuation) {
LinkedHashMap linkedHashMap = new LinkedHashMap();
linkedHashMap.putAll(getCustomHeader());
linkedHashMap.putAll(map);
return this.api.get(str, linkedHashMap, continuation);
}
}