PictureFileDownloadConfig.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // PictureFileDownloadConfig.h
  3. // FunSDKDemo
  4. //
  5. // Created by XM on 2018/11/16.
  6. // Copyright © 2018年 XM. All rights reserved.
  7. //
  8. /***
  9. *
  10. *图片下载功能,目前是在主线程操作,退出界面时会被释放,就会停止下载。
  11. 录像和图片下载不支持断点续传,如果想要后台下载,下载工具类需要设置为全局对象,根据需要进行app后台运行设置。
  12. *
  13. ******/
  14. #import "Header.h"
  15. @protocol PictureDownloadDelegate <NSObject>
  16. @optional
  17. //缩略图下载回调
  18. - (void)thumbDownloadResult:(NSInteger)result path:(NSString*)thumbPath;
  19. //下载图片开始回调
  20. - (void)pictureDownloadStartResult:(NSInteger)result;
  21. //下载进度回调
  22. - (void)pictureDownloadProgressResult:(float)progress;
  23. //下载图片结果回调
  24. - (void)pictureDownloadEndResultPath:(NSString*)path;
  25. @end
  26. #import "FunMsgListener.h"
  27. #import "PictureInfo.h"
  28. @interface PictureFileDownloadConfig : FunMsgListener
  29. @property (nonatomic, assign) id <PictureDownloadDelegate> delegate;
  30. #pragma mark - 开始下载缩略图片
  31. - (void)downloadSmallPicture:(PictureInfo*)pictureInfo;
  32. #pragma mark - 开始下载图片
  33. - (void)downloadPicture:(PictureInfo*)pictureInfo;
  34. @end