kotlin
Module Contents
alltypes
Module Contents
com.liulishuo.okdownload.DownloadListener
com.liulishuo.okdownload.DownloadTask
Module Contents
suspend fun DownloadTask.await(block: () -> Unit = {}): DownloadResult
fun DownloadTask.enqueue(onTaskStart: onTaskStart? = null, onConnectTrialStart: onConnectTrialStart? = null, onConnectTrialEnd: onConnectTrialEnd? = null, onDownloadFromBeginning: onDownloadFromBeginning? = null, onDownloadFromBreakpoint: onDownloadFromBreakpoint? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onFetchStart: onFetchStart? = null, onFetchProgress: onFetchProgress? = null, onFetchEnd: onFetchEnd? = null, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.enqueue1(taskStart: onTaskStartWithModel? = null, retry: onRetry? = null, connected: onConnected? = null, progress: onProgress? = null, taskEnd: onTaskEndWithModel): Unit
fun DownloadTask.enqueue2(onTaskStart: onTaskStart = {}, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.enqueue3(onStarted: onStarted? = null, onConnected: onConnected? = null, onProgress: onProgress? = null, onCompleted: onCompleted? = null, onCanceled: onCanceled? = null, onWarn: onWarn? = null, onRetry: onRetry? = null, onError: onError? = null, onTerminal: () -> Unit = {}): Unit
fun DownloadTask.enqueue4(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReady: onInfoReady? = null, onProgressBlock: onProgressBlock? = null, onProgressWithoutTotalLength: onProgressWithoutTotalLength? = null, onBlockEnd: onBlockEnd? = null, onTaskEndWithListener4Model: onTaskEndWithListener4Model): Unit
fun DownloadTask.enqueue4WithSpeed(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReadyWithSpeed: onInfoReadyWithSpeed? = null, onProgressBlockWithSpeed: onProgressBlockWithSpeed? = null, onProgressWithSpeed: onProgressWithSpeed? = null, onBlockEndWithSpeed: onBlockEndWithSpeed? = null, onTaskEndWithSpeed: onTaskEndWithSpeed): Unit
fun DownloadTask.execute(onTaskStart: onTaskStart? = null, onConnectTrialStart: onConnectTrialStart? = null, onConnectTrialEnd: onConnectTrialEnd? = null, onDownloadFromBeginning: onDownloadFromBeginning? = null, onDownloadFromBreakpoint: onDownloadFromBreakpoint? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onFetchStart: onFetchStart? = null, onFetchProgress: onFetchProgress? = null, onFetchEnd: onFetchEnd? = null, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.execute1(taskStart: onTaskStartWithModel? = null, retry: onRetry? = null, connected: onConnected? = null, progress: onProgress? = null, taskEnd: onTaskEndWithModel): Unit
fun DownloadTask.execute2(onTaskStart: onTaskStart = {}, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.execute3(onStarted: onStarted? = null, onConnected: onConnected? = null, onProgress: onProgress? = null, onCompleted: onCompleted? = null, onCanceled: onCanceled? = null, onWarn: onWarn? = null, onRetry: onRetry? = null, onError: onError? = null, onTerminal: () -> Unit = {}): Unit
fun DownloadTask.execute4(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReady: onInfoReady? = null, onProgressBlock: onProgressBlock? = null, onProgressWithoutTotalLength: onProgressWithoutTotalLength? = null, onBlockEnd: onBlockEnd? = null, onTaskEndWithListener4Model: onTaskEndWithListener4Model): Unit
fun DownloadTask.execute4WithSpeed(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReadyWithSpeed: onInfoReadyWithSpeed? = null, onProgressBlockWithSpeed: onProgressBlockWithSpeed? = null, onProgressWithSpeed: onProgressWithSpeed? = null, onBlockEndWithSpeed: onBlockEndWithSpeed? = null, onTaskEndWithSpeed: onTaskEndWithSpeed): Unit
fun DownloadTask.spChannel(): Channel<DownloadProgress>
data class DownloadProgress
data class DownloadResult
typealias onBlockEnd = (task: DownloadTask, blockIndex: Int, info: BlockInfo) -> Unit
typealias onBlockEndWithSpeed = (task: DownloadTask, blockIndex: Int, info: BlockInfo, blockSpeed: SpeedCalculator) -> Unit
typealias onCanceled = taskCallback
typealias onCompleted = taskCallback
typealias onConnected = (task: DownloadTask, blockCount: Int, currentOffset: Long, totalLength: Long) -> Unit
typealias onConnectEnd = (task: DownloadTask, blockIndex: Int, responseCode: Int, responseHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectStart = (task: DownloadTask, blockIndex: Int, requestHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectTrialEnd = (task: DownloadTask, responseCode: Int, responseHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectTrialStart = (task: DownloadTask, requestHeaderFields: Map<String, List<String>>) -> Unit
typealias onDownloadFromBeginning = (task: DownloadTask, info: BreakpointInfo, cause: ResumeFailedCause) -> Unit
typealias onDownloadFromBreakpoint = (task: DownloadTask, info: BreakpointInfo) -> Unit
typealias onError = (task: DownloadTask, e: Exception) -> Unit
typealias onFetchEnd = onFetchStart
typealias onFetchProgress = (task: DownloadTask, blockIndex: Int, increaseBytes: Long) -> Unit
typealias onFetchStart = (task: DownloadTask, blockIndex: Int, contentLength: Long) -> Unit
typealias onInfoReady = (task: DownloadTask, info: BreakpointInfo, fromBreakpoint: Boolean, model: Listener4Model) -> Unit
typealias onInfoReadyWithSpeed = (task: DownloadTask, info: BreakpointInfo, fromBreakpoint: Boolean, model: Listener4SpeedModel) -> Unit
typealias onProgress = (task: DownloadTask, currentOffset: Long, totalLength: Long) -> Unit
typealias onProgressBlock = (task: DownloadTask, blockIndex: Int, currentBlockOffset: Long) -> Unit
typealias onProgressBlockWithSpeed = (task: DownloadTask, blockIndex: Int, currentBlockOffset: Long, blockSpeed: SpeedCalculator) -> Unit
typealias onProgressWithoutTotalLength = (task: DownloadTask, currentOffset: Long) -> Unit
typealias onProgressWithSpeed = (task: DownloadTask, currentOffset: Long, taskSpeed: SpeedCalculator) -> Unit
typealias onQueueEnd = (context: DownloadContext) -> Unit
typealias onQueueTaskEnd = (context: DownloadContext, task: DownloadTask, cause: EndCause, realException: Exception?, remainCount: Int) -> Unit
typealias onRetry = (task: DownloadTask, cause: ResumeFailedCause) -> Unit
typealias onStarted = taskCallback
typealias onTaskEnd = (task: DownloadTask, cause: EndCause, realCause: Exception?) -> Unit
typealias onTaskEndWithListener4Model = (task: DownloadTask, cause: EndCause, realCause: Exception?, model: Listener4Model) -> Unit
typealias onTaskEndWithModel = (task: DownloadTask, cause: EndCause, realCause: Exception?, model: Listener1Model) -> Unit
typealias onTaskEndWithSpeed = (task: DownloadTask, cause: EndCause, realCause: Exception?, taskSpeed: SpeedCalculator) -> Unit
typealias onTaskStart = (task: DownloadTask) -> Unit
typealias onTaskStartWithModel = (task: DownloadTask, model: Listener1Model) -> Unit
typealias onWarn = taskCallback
typealias taskCallback = (task: DownloadTask) -> Unit
package com.liulishuo.okdownload.kotlin
Module Contents
com.liulishuo.okdownload.DownloadTask
Module Contents
suspend fun DownloadTask.await(block: () -> Unit = {}): DownloadResult
fun DownloadTask.enqueue(onTaskStart: onTaskStart? = null, onConnectTrialStart: onConnectTrialStart? = null, onConnectTrialEnd: onConnectTrialEnd? = null, onDownloadFromBeginning: onDownloadFromBeginning? = null, onDownloadFromBreakpoint: onDownloadFromBreakpoint? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onFetchStart: onFetchStart? = null, onFetchProgress: onFetchProgress? = null, onFetchEnd: onFetchEnd? = null, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.enqueue1(taskStart: onTaskStartWithModel? = null, retry: onRetry? = null, connected: onConnected? = null, progress: onProgress? = null, taskEnd: onTaskEndWithModel): Unit
fun DownloadTask.enqueue2(onTaskStart: onTaskStart = {}, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.enqueue3(onStarted: onStarted? = null, onConnected: onConnected? = null, onProgress: onProgress? = null, onCompleted: onCompleted? = null, onCanceled: onCanceled? = null, onWarn: onWarn? = null, onRetry: onRetry? = null, onError: onError? = null, onTerminal: () -> Unit = {}): Unit
fun DownloadTask.enqueue4(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReady: onInfoReady? = null, onProgressBlock: onProgressBlock? = null, onProgressWithoutTotalLength: onProgressWithoutTotalLength? = null, onBlockEnd: onBlockEnd? = null, onTaskEndWithListener4Model: onTaskEndWithListener4Model): Unit
fun DownloadTask.enqueue4WithSpeed(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReadyWithSpeed: onInfoReadyWithSpeed? = null, onProgressBlockWithSpeed: onProgressBlockWithSpeed? = null, onProgressWithSpeed: onProgressWithSpeed? = null, onBlockEndWithSpeed: onBlockEndWithSpeed? = null, onTaskEndWithSpeed: onTaskEndWithSpeed): Unit
fun DownloadTask.execute(onTaskStart: onTaskStart? = null, onConnectTrialStart: onConnectTrialStart? = null, onConnectTrialEnd: onConnectTrialEnd? = null, onDownloadFromBeginning: onDownloadFromBeginning? = null, onDownloadFromBreakpoint: onDownloadFromBreakpoint? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onFetchStart: onFetchStart? = null, onFetchProgress: onFetchProgress? = null, onFetchEnd: onFetchEnd? = null, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.execute1(taskStart: onTaskStartWithModel? = null, retry: onRetry? = null, connected: onConnected? = null, progress: onProgress? = null, taskEnd: onTaskEndWithModel): Unit
fun DownloadTask.execute2(onTaskStart: onTaskStart = {}, onTaskEnd: onTaskEnd): Unit
fun DownloadTask.execute3(onStarted: onStarted? = null, onConnected: onConnected? = null, onProgress: onProgress? = null, onCompleted: onCompleted? = null, onCanceled: onCanceled? = null, onWarn: onWarn? = null, onRetry: onRetry? = null, onError: onError? = null, onTerminal: () -> Unit = {}): Unit
fun DownloadTask.execute4(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReady: onInfoReady? = null, onProgressBlock: onProgressBlock? = null, onProgressWithoutTotalLength: onProgressWithoutTotalLength? = null, onBlockEnd: onBlockEnd? = null, onTaskEndWithListener4Model: onTaskEndWithListener4Model): Unit
fun DownloadTask.execute4WithSpeed(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReadyWithSpeed: onInfoReadyWithSpeed? = null, onProgressBlockWithSpeed: onProgressBlockWithSpeed? = null, onProgressWithSpeed: onProgressWithSpeed? = null, onBlockEndWithSpeed: onBlockEndWithSpeed? = null, onTaskEndWithSpeed: onTaskEndWithSpeed): Unit
fun DownloadTask.spChannel(): Channel<DownloadProgress>
data class DownloadProgress
data class DownloadResult
package com.liulishuo.okdownload.kotlin.listener
Module Contents
com.liulishuo.okdownload.DownloadListener
fun createDownloadContextListener(onQueueTaskEnd: onQueueTaskEnd? = null, onQueueEnd: onQueueEnd): DownloadContextListener
fun createListener(onTaskStart: onTaskStart? = null, onConnectTrialStart: onConnectTrialStart? = null, onConnectTrialEnd: onConnectTrialEnd? = null, onDownloadFromBeginning: onDownloadFromBeginning? = null, onDownloadFromBreakpoint: onDownloadFromBreakpoint? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onFetchStart: onFetchStart? = null, onFetchProgress: onFetchProgress? = null, onFetchEnd: onFetchEnd? = null, onTaskEnd: onTaskEnd): DownloadListener
fun createListener1(taskStart: onTaskStartWithModel? = null, retry: onRetry? = null, connected: onConnected? = null, progress: onProgress? = null, taskEnd: onTaskEndWithModel): DownloadListener1
fun createListener2(onTaskStart: onTaskStart = {}, onTaskEnd: onTaskEnd): DownloadListener2
fun createListener3(onStarted: onStarted? = null, onConnected: onConnected? = null, onProgress: onProgress? = null, onCompleted: onCompleted? = null, onCanceled: onCanceled? = null, onWarn: onWarn? = null, onRetry: onRetry? = null, onError: onError? = null, onTerminal: () -> Unit = {}): DownloadListener3
fun createListener4(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReady: onInfoReady? = null, onProgressBlock: onProgressBlock? = null, onProgressWithoutTotalLength: onProgressWithoutTotalLength? = null, onBlockEnd: onBlockEnd? = null, onTaskEndWithListener4Model: onTaskEndWithListener4Model): DownloadListener4
fun createListener4WithSpeed(onTaskStart: onTaskStart? = null, onConnectStart: onConnectStart? = null, onConnectEnd: onConnectEnd? = null, onInfoReadyWithSpeed: onInfoReadyWithSpeed? = null, onProgressBlockWithSpeed: onProgressBlockWithSpeed? = null, onProgressWithSpeed: onProgressWithSpeed? = null, onBlockEndWithSpeed: onBlockEndWithSpeed? = null, onTaskEndWithSpeed: onTaskEndWithSpeed): DownloadListener4WithSpeed
typealias onBlockEnd = (task: DownloadTask, blockIndex: Int, info: BlockInfo) -> Unit
typealias onBlockEndWithSpeed = (task: DownloadTask, blockIndex: Int, info: BlockInfo, blockSpeed: SpeedCalculator) -> Unit
typealias onCanceled = taskCallback
typealias onCompleted = taskCallback
typealias onConnected = (task: DownloadTask, blockCount: Int, currentOffset: Long, totalLength: Long) -> Unit
typealias onConnectEnd = (task: DownloadTask, blockIndex: Int, responseCode: Int, responseHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectStart = (task: DownloadTask, blockIndex: Int, requestHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectTrialEnd = (task: DownloadTask, responseCode: Int, responseHeaderFields: Map<String, List<String>>) -> Unit
typealias onConnectTrialStart = (task: DownloadTask, requestHeaderFields: Map<String, List<String>>) -> Unit
typealias onDownloadFromBeginning = (task: DownloadTask, info: BreakpointInfo, cause: ResumeFailedCause) -> Unit
typealias onDownloadFromBreakpoint = (task: DownloadTask, info: BreakpointInfo) -> Unit
typealias onError = (task: DownloadTask, e: Exception) -> Unit
typealias onFetchEnd = onFetchStart
typealias onFetchProgress = (task: DownloadTask, blockIndex: Int, increaseBytes: Long) -> Unit
typealias onFetchStart = (task: DownloadTask, blockIndex: Int, contentLength: Long) -> Unit
typealias onInfoReady = (task: DownloadTask, info: BreakpointInfo, fromBreakpoint: Boolean, model: Listener4Model) -> Unit
typealias onInfoReadyWithSpeed = (task: DownloadTask, info: BreakpointInfo, fromBreakpoint: Boolean, model: Listener4SpeedModel) -> Unit
typealias onProgress = (task: DownloadTask, currentOffset: Long, totalLength: Long) -> Unit
typealias onProgressBlock = (task: DownloadTask, blockIndex: Int, currentBlockOffset: Long) -> Unit
typealias onProgressBlockWithSpeed = (task: DownloadTask, blockIndex: Int, currentBlockOffset: Long, blockSpeed: SpeedCalculator) -> Unit
typealias onProgressWithoutTotalLength = (task: DownloadTask, currentOffset: Long) -> Unit
typealias onProgressWithSpeed = (task: DownloadTask, currentOffset: Long, taskSpeed: SpeedCalculator) -> Unit
typealias onQueueEnd = (context: DownloadContext) -> Unit
typealias onQueueTaskEnd = (context: DownloadContext, task: DownloadTask, cause: EndCause, realException: Exception?, remainCount: Int) -> Unit
typealias onRetry = (task: DownloadTask, cause: ResumeFailedCause) -> Unit
typealias onStarted = taskCallback
typealias onTaskEnd = (task: DownloadTask, cause: EndCause, realCause: Exception?) -> Unit
typealias onTaskEndWithListener4Model = (task: DownloadTask, cause: EndCause, realCause: Exception?, model: Listener4Model) -> Unit
typealias onTaskEndWithModel = (task: DownloadTask, cause: EndCause, realCause: Exception?, model: Listener1Model) -> Unit
typealias onTaskEndWithSpeed = (task: DownloadTask, cause: EndCause, realCause: Exception?, taskSpeed: SpeedCalculator) -> Unit
typealias onTaskStart = (task: DownloadTask) -> Unit
typealias onTaskStartWithModel = (task: DownloadTask, model: Listener1Model) -> Unit
typealias onWarn = taskCallback
typealias taskCallback = (task: DownloadTask) -> Unit