forked from casademora/SDWebImage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDWebImagePrefetcher.h
44 lines (35 loc) · 1.08 KB
/
SDWebImagePrefetcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import <Foundation/Foundation.h>
#import "SDWebImageManagerDelegate.h"
@interface SDWebImagePrefetcher : NSObject <SDWebImageManagerDelegate>
{
NSArray *_prefetchURLs;
NSUInteger _skippedCount;
NSUInteger _finishedCount;
NSUInteger _requestedCount;
NSTimeInterval _startedTime;
}
/**
* Maximum number of URLs to prefetch at the same time. Defaults to 3.
*/
@property (nonatomic, assign) NSUInteger maxConcurrentDownloads;
+ (SDWebImagePrefetcher *)sharedImagePrefetcher;
/**
* Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
* currently one image is downloaded at a time,
* and skips images for failed downloads and proceed to the next image in the list
*
* @param NSArray list of URLs to prefetch
*/
- (void)prefetchURLs:(NSArray *)urls;
/**
* Remove and cancel queued list
*/
- (void)cancelPrefetching;
@end