|
|
@@ -27,6 +27,11 @@ FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadFinishNotification
|
|
|
inSession:(nullable NSURLSession *)session
|
|
|
options:(SDWebImageDownloaderOptions)options;
|
|
|
|
|
|
+- (nonnull instancetype)initWithRequest:(nullable NSURLRequest *)request
|
|
|
+ inSession:(nullable NSURLSession *)session
|
|
|
+ options:(SDWebImageDownloaderOptions)options
|
|
|
+ context:(nullable SDWebImageContext *)context;
|
|
|
+
|
|
|
- (nullable id)addHandlersForProgress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
|
|
|
completed:(nullable SDWebImageDownloaderCompletedBlock)completedBlock;
|
|
|
|
|
|
@@ -36,9 +41,6 @@ FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadFinishNotification
|
|
|
- (nullable NSURLCredential *)credential;
|
|
|
- (void)setCredential:(nullable NSURLCredential *)value;
|
|
|
|
|
|
-- (nullable SDWebImageContext *)context;
|
|
|
-- (void)setContext:(nullable SDWebImageContext *)context;
|
|
|
-
|
|
|
- (BOOL)cancel:(nullable id)token;
|
|
|
|
|
|
@end
|
|
|
@@ -77,7 +79,7 @@ FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadFinishNotification
|
|
|
/**
|
|
|
* The context for the receiver.
|
|
|
*/
|
|
|
-@property (copy, nonatomic, nullable) SDWebImageContext *context;
|
|
|
+@property (copy, nonatomic, readonly, nullable) SDWebImageContext *context;
|
|
|
|
|
|
/**
|
|
|
* The expected size of data.
|
|
|
@@ -102,7 +104,24 @@ FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadFinishNotification
|
|
|
*/
|
|
|
- (nonnull instancetype)initWithRequest:(nullable NSURLRequest *)request
|
|
|
inSession:(nullable NSURLSession *)session
|
|
|
- options:(SDWebImageDownloaderOptions)options NS_DESIGNATED_INITIALIZER;
|
|
|
+ options:(SDWebImageDownloaderOptions)options;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Initializes a `SDWebImageDownloaderOperation` object
|
|
|
+ *
|
|
|
+ * @see SDWebImageDownloaderOperation
|
|
|
+ *
|
|
|
+ * @param request the URL request
|
|
|
+ * @param session the URL session in which this operation will run
|
|
|
+ * @param options downloader options
|
|
|
+ * @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold.
|
|
|
+ *
|
|
|
+ * @return the initialized instance
|
|
|
+ */
|
|
|
+- (nonnull instancetype)initWithRequest:(nullable NSURLRequest *)request
|
|
|
+ inSession:(nullable NSURLSession *)session
|
|
|
+ options:(SDWebImageDownloaderOptions)options
|
|
|
+ context:(nullable SDWebImageContext *)context NS_DESIGNATED_INITIALIZER;
|
|
|
|
|
|
/**
|
|
|
* Adds handlers for progress and completion. Returns a tokent that can be passed to -cancel: to cancel this set of
|