VLCHTTPFileDownloader.h 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/*****************************************************************************
 * VLCHTTPFileDownloader.h
 * VLC for iOS
 *****************************************************************************
 * Copyright (c) 2013 VideoLAN. All rights reserved.
 * $Id$
 *
 * Authors: Felix Paul Kühne <fkuehne # videolan.org>
 *          Pierre Sagaspe <pierre.sagaspe # me.com>
 *
 * Refer to the COPYING file of the official project for license.
 *****************************************************************************/
13

14 15 16 17 18 19
@protocol VLCHTTPFileDownloader <NSObject>
@required
- (void)downloadStarted;
- (void)downloadEnded;

@optional
20
- (void)downloadFailedWithErrorDescription:(NSString *)description;
21
- (void)progressUpdatedTo:(CGFloat)percentage receivedDataSize:(CGFloat)receivedDataSize  expectedDownloadSize:(CGFloat)expectedDownloadSize;
22 23

@end
24 25 26

@interface VLCHTTPFileDownloader : NSObject

27 28
@property (readonly, nonatomic) NSString *userReadableDownloadName;

29
@property (nonatomic, readonly) BOOL downloadInProgress;
30
@property (nonatomic, retain) id delegate;
31

32
- (void)cancelDownload;
33
- (void)downloadFileFromURL:(NSURL *)url;
Pierre SAGASPE's avatar
Pierre SAGASPE committed
34
- (void)downloadFileFromURLwithFileName:(NSURL *)url fileNameOfMedia:(NSString*) fileName;
35 36

@end