IDownloadManager

Defines the contract of a download manager, which can used to queue and manage download requests.

Inheritors

Types

Link copied to clipboard
interface IRequest
Contract of a download request that can be submitted to the download manager.

Functions

Link copied to clipboard
abstract fun createDownloadRequestSet(requestConfig: RequestConfig, estimatedSize: Long, listener: DownloadManager.Listener): Observable<DownloadRequestSet>
Creates an empty download request set with the specified estimated size.
Link copied to clipboard
abstract fun deleteDownload(requestSet: DownloadRequestSet): Boolean
abstract fun deleteDownload(requestSetKey: Long): Boolean
Cancels all the download requests in the specified set and removes the download request set.
Link copied to clipboard
abstract fun enqueueDownload(requestSet: DownloadRequestSet, requests: Array<IDownloadManager.IRequest>): Observable<DownloadRequestSet>
Enqueues a set of download requests to the specified request set.
Link copied to clipboard
abstract fun getDownloadStatus(requestSet: DownloadRequestSet): DownloadStatus
abstract fun getDownloadStatus(requestSetKey: Long): DownloadStatus
Queries the overall download status of the specified download request set.
Link copied to clipboard
abstract fun pauseDownload(requestSet: DownloadRequestSet): DownloadStatus
abstract fun pauseDownload(requestSetKey: Long): DownloadStatus
Pauses download of the specified request set, if it is not already paused.
Link copied to clipboard
abstract fun resumeDownload(requestSet: DownloadRequestSet): DownloadStatus
abstract fun resumeDownload(requestSetKey: Long): DownloadStatus
Resumes download of the specified request set, if it is currently paused.