Package apple.foundation.protocol
Interface NSURLSessionDownloadDelegate
-
- All Superinterfaces:
NSURLSessionDelegate,NSURLSessionTaskDelegate
public interface NSURLSessionDownloadDelegate extends NSURLSessionTaskDelegate
Messages related to the operation of a task that writes data to a file and notifies the delegate upon completion.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionDelegate
NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
NSURLSessionTaskDelegate.Block_URLSessionTaskDidReceiveChallengeCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStream, NSURLSessionTaskDelegate.Block_URLSessionTaskWillBeginDelayedRequestCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidURLSessionDownloadTaskDidFinishDownloadingToURL(NSURLSession session, NSURLSessionDownloadTask downloadTask, NSURL location)Sent when a download task that has completed a download.default voidURLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes(NSURLSession session, NSURLSessionDownloadTask downloadTask, long fileOffset, long expectedTotalBytes)Sent when a download has been resumed.default voidURLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite(NSURLSession session, NSURLSessionDownloadTask downloadTask, long bytesWritten, long totalBytesWritten, long totalBytesExpectedToWrite)Sent periodically to notify the delegate of download progress.-
Methods inherited from interface apple.foundation.protocol.NSURLSessionDelegate
URLSessionDidBecomeInvalidWithError, URLSessionDidFinishEventsForBackgroundURLSession, URLSessionDidReceiveChallengeCompletionHandler
-
Methods inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
URLSessionTaskDidCompleteWithError, URLSessionTaskDidFinishCollectingMetrics, URLSessionTaskDidReceiveChallengeCompletionHandler, URLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSend, URLSessionTaskIsWaitingForConnectivity, URLSessionTaskNeedNewBodyStream, URLSessionTaskWillBeginDelayedRequestCompletionHandler, URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
-
-
Method Detail
-
URLSessionDownloadTaskDidFinishDownloadingToURL
void URLSessionDownloadTaskDidFinishDownloadingToURL(NSURLSession session, NSURLSessionDownloadTask downloadTask, NSURL location)
Sent when a download task that has completed a download. The delegate should copy or move the file at the given location to a new location as it will be removed when the delegate message returns. URLSession:task:didCompleteWithError: will still be called.
-
URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes
default void URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes(NSURLSession session, NSURLSessionDownloadTask downloadTask, long fileOffset, long expectedTotalBytes)
Sent when a download has been resumed. If a download failed with an error, the -userInfo dictionary of the error will contain an NSURLSessionDownloadTaskResumeData key, whose value is the resume data.
-
URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite
default void URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite(NSURLSession session, NSURLSessionDownloadTask downloadTask, long bytesWritten, long totalBytesWritten, long totalBytesExpectedToWrite)
Sent periodically to notify the delegate of download progress.
-
-