// // VIResourceLoadingRequestWorker.h // VIMediaCacheDemo // // Created by Vito on 4/21/16. // Copyright © 2016 Vito. All rights reserved. // #import @class VIMediaDownloader, AVAssetResourceLoadingRequest; @protocol VIResourceLoadingRequestWorkerDelegate; @interface VIResourceLoadingRequestWorker : NSObject - (instancetype)initWithMediaDownloader:(VIMediaDownloader *)mediaDownloader resourceLoadingRequest:(AVAssetResourceLoadingRequest *)request; @property (nonatomic, weak) id delegate; @property (nonatomic, strong, readonly) AVAssetResourceLoadingRequest *request; - (void)startWork; - (void)cancel; - (void)finish; @end @protocol VIResourceLoadingRequestWorkerDelegate - (void)resourceLoadingRequestWorker:(VIResourceLoadingRequestWorker *)requestWorker didCompleteWithError:(NSError *)error; @end