SDImageLoadersManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import "SDImageLoader.h"
  9. /**
  10. A loaders manager to manage multiple loaders
  11. */
  12. @interface SDImageLoadersManager : NSObject <SDImageLoader>
  13. /**
  14. Returns the global shared loaders manager instance. By default we will set [`SDWebImageDownloader.sharedDownloader`] into the loaders array.
  15. */
  16. @property (nonatomic, class, readonly, nonnull) SDImageLoadersManager *sharedManager;
  17. /**
  18. All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority
  19. */
  20. @property (nonatomic, copy, nullable) NSArray<id<SDImageLoader>>* loaders;
  21. /**
  22. Add a new image loader to the end of loaders array. Which has the highest priority.
  23. @param loader loader
  24. */
  25. - (void)addLoader:(nonnull id<SDImageLoader>)loader;
  26. /**
  27. Remove a image loader in the loaders array.
  28. @param loader loader
  29. */
  30. - (void)removeLoader:(nonnull id<SDImageLoader>)loader;
  31. @end