You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.6 KiB

//
// MOBFImageGetter.h
// MOBFoundation
//
// Created by fenghj on 16/1/21.
// Copyright © 2016年 MOB. All rights reserved.
//
#import "MOBFImageObserver.h"
#import "MOBFImageServiceTypeDef.h"
#import <Foundation/Foundation.h>
@class MOBFImageCachePolicy;
/**
*
*/
@interface MOBFImageGetter : NSObject
/**
*
*
* @return
*/
+ (instancetype _Nullable )sharedInstance;
/**
@param cachePolicy
@return
*/
- (instancetype _Nullable )initWithCachePolicy:(MOBFImageCachePolicy *_Nullable)cachePolicy;
/**
*
*
* @param url URL
*
* @return YES NO
*/
- (BOOL)existsImageCacheWithURL:(NSURL *_Nullable)url;
/**
*
*
* @param url
* @param resultHandler
*
* @return
*/
- (MOBFImageObserver *_Nonnull)getImageWithURL:(NSURL *_Nullable)url
result:(MOBFImageGetterResultHandler _Nullable )resultHandler;
/**
*
*
* @param url
* @param allowReadCache
* @param resultHandler
*
* @return
*/
- (MOBFImageObserver *_Nullable)getImageWithURL:(NSURL * _Nullable)url
allowReadCache:(BOOL)allowReadCache
result:(MOBFImageGetterResultHandler _Nullable )resultHandler;
/**
@param url
@param resultHandler
@return
*/
- (MOBFImageObserver *_Nullable)getImageDataWithURL:(NSURL * _Nullable)url
result:(MOBFImageDataGetterResultHandler _Nullable)resultHandler;
/**
@param url
@param allowReadCache
@param resultHandler
@return
*/
- (MOBFImageObserver *_Nullable)getImageDataWithURL:(NSURL * _Nullable)url
allowReadCache:(BOOL)allowReadCache
result:(MOBFImageDataGetterResultHandler _Nullable)resultHandler;
/**
*
*
* @param imageObserver
*/
- (void)removeImageObserver:(MOBFImageObserver * _Nullable)imageObserver;
/**
*
*
* @param url
*/
- (void)removeImageForURL:(nullable NSURL *)url;
/**
*
*
*/
- (void)clearDisk;
@end