PINRemoteImageTask.h 1.4 KB

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