PINRemoteImageTask.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // PINRemoteImageTask.h
  3. // Pods
  4. //
  5. // Created by Garrett Moon on 3/9/15.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "PINRemoteImageManager.h"
  10. #import "PINRemoteImageMacros.h"
  11. @interface PINRemoteImageTask : NSObject
  12. @property (nonatomic, strong, nonnull) NSMutableDictionary *callbackBlocks;
  13. #if PINRemoteImageLogging
  14. @property (nonatomic, copy, nullable) NSString *key;
  15. #endif
  16. - (void)addCallbacksWithCompletionBlock:(nonnull PINRemoteImageManagerImageCompletion)completionBlock
  17. progressImageBlock:(nullable PINRemoteImageManagerImageCompletion)progressImageBlock
  18. progressDownloadBlock:(nullable PINRemoteImageManagerProgressDownload)progressDownloadBlock
  19. withUUID:(nonnull NSUUID *)UUID;
  20. - (void)removeCallbackWithUUID:(nonnull NSUUID *)UUID;
  21. - (void)callCompletionsWithQueue:(nonnull dispatch_queue_t)queue
  22. remove:(BOOL)remove
  23. withImage:(nullable PINImage *)image
  24. alternativeRepresentation:(nullable id)alternativeRepresentation
  25. cached:(BOOL)cached
  26. error:(nullable NSError *)error;
  27. //returns YES if no more attached completionBlocks
  28. - (BOOL)cancelWithUUID:(nonnull NSUUID *)UUID manager:(nullable PINRemoteImageManager *)manager;
  29. - (void)setPriority:(PINRemoteImageManagerPriority)priority;
  30. @end