VLCHTTPFileDownloader.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*****************************************************************************
  2. * VLCHTTPFileDownloader.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2013 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Felix Paul Kühne <fkuehne # videolan.org>
  9. * Pierre Sagaspe <pierre.sagaspe # me.com>
  10. *
  11. * Refer to the COPYING file of the official project for license.
  12. *****************************************************************************/
  13. @protocol VLCHTTPFileDownloader <NSObject>
  14. @required
  15. - (void)downloadStarted;
  16. - (void)downloadEnded;
  17. @optional
  18. - (void)downloadFailedWithErrorDescription:(NSString *)description;
  19. - (void)progressUpdatedTo:(CGFloat)percentage receivedDataSize:(CGFloat)receivedDataSize expectedDownloadSize:(CGFloat)expectedDownloadSize;
  20. @end
  21. @interface VLCHTTPFileDownloader : NSObject
  22. @property (readonly, nonatomic) NSString *userReadableDownloadName;
  23. @property (nonatomic, readonly) BOOL downloadInProgress;
  24. @property (nonatomic, retain) id delegate;
  25. - (void)cancelDownload;
  26. - (void)downloadFileFromURL:(NSURL *)url;
  27. - (void)downloadFileFromURL:(NSURL *)url withFileName:(NSString*) fileName;
  28. @end