SDWebImage/SDImageCache.h

33 lines
1.0 KiB
C
Raw Normal View History

2009-09-20 04:24:03 +08:00
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
2009-09-20 04:24:03 +08:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2009-09-20 02:45:42 +08:00
#import <Foundation/Foundation.h>
#import "SDImageCacheDelegate.h"
2009-09-20 02:45:42 +08:00
@interface SDImageCache : NSObject
2009-09-20 02:45:42 +08:00
{
NSMutableDictionary *memCache;
2009-09-20 02:45:42 +08:00
NSString *diskCachePath;
NSOperationQueue *cacheInQueue, *cacheOutQueue;
2009-09-20 02:45:42 +08:00
}
+ (SDImageCache *)sharedImageCache;
2009-09-20 02:45:42 +08:00
- (void)storeImage:(UIImage *)image forKey:(NSString *)key;
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
- (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk;
2009-09-20 02:45:42 +08:00
- (UIImage *)imageFromKey:(NSString *)key;
- (UIImage *)imageFromKey:(NSString *)key fromDisk:(BOOL)fromDisk;
- (void)queryDiskCacheForKey:(NSString *)key delegate:(id <SDImageCacheDelegate>)delegate userInfo:(NSDictionary *)info;
2009-09-20 02:45:42 +08:00
- (void)removeImageForKey:(NSString *)key;
- (void)clearMemory;
- (void)clearDisk;
- (void)cleanDisk;
@end