BackgroundDownloadDelegate
class BackgroundDownloadDelegate(taskId: String, onComplete: (String) -> Unit?, onError: (Exception) -> Unit?, eventStore: EventStore?, scope: CoroutineScope) : NSObject, NSURLSessionDownloadDelegateProtocol
NSURLSession download delegate bridging iOS callbacks to TaskMonitor and EventStore.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect open override fun performSelector(aSelector: COpaquePointer?, withObject: Any?, _withObject: Any?): Any?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL: NSURL)
Called when the download finishes successfully. The file is at location — move it to a permanent location in this callback.
open override fun URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError: NSError?)
Called when the task completes — with or without error. If error is non-null, the download failed.
open override fun URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didWriteData: Long, totalBytesWritten: Long, totalBytesExpectedToWrite: Long)
Called periodically with download progress.
expect open fun URLSession(session: NSURLSession, didReceiveChallenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Unit)
expect open fun URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didResumeAtOffset: int64_t, expectedTotalBytes: int64_t)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, needNewBodyStream: (NSInputStream?) -> Unit)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, didReceiveInformationalResponse: NSHTTPURLResponse)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, didFinishCollectingMetrics: NSURLSessionTaskMetrics)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, needNewBodyStreamFromOffset: int64_t, completionHandler: (NSInputStream?) -> Unit)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, didReceiveChallenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Unit)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, willBeginDelayedRequest: NSURLRequest, completionHandler: (NSURLSessionDelayedRequestDisposition, NSURLRequest?) -> Unit)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, didSendBodyData: int64_t, totalBytesSent: int64_t, totalBytesExpectedToSend: int64_t)
expect open fun URLSession(session: NSURLSession, task: NSURLSessionTask, willPerformHTTPRedirection: NSHTTPURLResponse, newRequest: NSURLRequest, completionHandler: (NSURLRequest?) -> Unit)
Link copied to clipboard