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

#import <DropboxSDK/DropboxSDK.h>

15
@protocol VLCDropboxController <NSObject>
16 17 18
@required
- (void)mediaListUpdated;

19 20 21
@optional
- (void)operationWithProgressInformationStarted;
- (void)currentProgressInformation:(float)progress;
22
- (void)updateRemainingTime:(NSString *)time;
23
- (void)operationWithProgressInformationStopped;
24 25

- (void)numberOfFilesWaitingToBeDownloadedChanged;
26 27 28 29
@end

@interface VLCDropboxController : NSObject <DBRestClientDelegate, DBSessionDelegate, DBNetworkRequestDelegate>

30
@property (nonatomic, weak) id<VLCDropboxController> delegate;
31 32
@property (nonatomic, readonly) NSArray *currentListFiles;
@property (nonatomic, readonly) BOOL sessionIsLinked;
33
@property (nonatomic, readonly) NSInteger numberOfFilesWaitingToBeDownloaded;
34 35 36 37 38 39

- (void)startSession;
- (void)logout;

- (void)requestDirectoryListingAtPath:(NSString *)path;
- (void)downloadFileToDocumentFolder:(DBMetadata *)file;
40
- (void)streamFile:(DBMetadata *)file;
41 42

@end