VLCHTTPFileDownloader.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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)downloadStartedWithIdentifier:(NSString *)identifier;
  16. - (void)downloadEndedWithIdentifier:(NSString *)identifier;
  17. @optional
  18. - (void)downloadFailedWithIdentifier:(NSString *)identifier errorDescription:(NSString *)description;
  19. - (void)progressUpdatedTo:(CGFloat)percentage receivedDataSize:(CGFloat)receivedDataSize expectedDownloadSize:(CGFloat)expectedDownloadSize identifier:(NSString *)identifier;
  20. @end
  21. @interface VLCHTTPFileDownloader : NSObject
  22. @property (nonatomic, readonly) BOOL downloadInProgress;
  23. @property (nonatomic, retain) id delegate;
  24. - (void)cancelDownloadWithIdentifier:(NSString *)identifier;
  25. - (NSString *)downloadFileFromURL:(NSURL *)url;
  26. - (NSString *)downloadFileFromURL:(NSURL *)url withFileName:(NSString*)fileName;
  27. @end