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

14
#import "LiveConnectClient.h"
15 16 17 18 19 20 21 22 23 24 25

@class VLCOneDriveObject;

@protocol VLCOneDriveObjectDelegate <NSObject>

- (void)folderContentLoaded:(VLCOneDriveObject *)sender;

- (void)fullFolderTreeLoaded:(VLCOneDriveObject *)sender;

- (void)folderContentLoadingFailed:(NSError *)error
                            sender:(VLCOneDriveObject *) sender;
26
@end
27

28
@protocol VLCOneDriveObjectDownloadDelegate <NSObject>
29

30 31 32 33
- (void)downloadStarted:(VLCOneDriveObject *)object;
- (void)downloadEnded:(VLCOneDriveObject *)object;
- (void)progressUpdated:(CGFloat)progress;
- (void)calculateRemainingTime:(CGFloat)receivedDataSize expectedDownloadSize:(CGFloat)expectedDownloadSize;
34 35 36 37 38 39 40 41 42
@end

@interface VLCOneDriveObject : NSObject <LiveOperationDelegate, LiveDownloadOperationDelegate, VLCOneDriveObjectDelegate>

@property (strong, nonatomic) VLCOneDriveObject *parent;
@property (strong, nonatomic) NSString *objectId;
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *type;
@property (strong, nonatomic) NSNumber *size;
43
@property (strong, nonatomic) NSNumber *duration;
44 45
@property (strong, nonatomic) NSString *thumbnailURL;
@property (readonly, nonatomic) BOOL isFolder;
46 47
@property (readonly, nonatomic) BOOL isVideo;
@property (readonly, nonatomic) BOOL isAudio;
48 49 50 51 52 53

@property (strong, nonatomic) NSArray *folders;
@property (strong, nonatomic) NSArray *files;
@property (strong, nonatomic) NSArray *items;

@property (readonly, nonatomic) NSString *filesPath;
54
@property (strong, nonatomic) NSString *downloadPath;
55
@property (strong, nonatomic) NSString *subtitleURL;
56 57 58 59
@property (readonly, nonatomic) BOOL hasFullFolderTree;

@property (strong, nonatomic) LiveConnectClient *liveClient;
@property (strong, nonatomic) id<VLCOneDriveObjectDelegate>delegate;
60
@property (strong, nonatomic) id<VLCOneDriveObjectDownloadDelegate>downloadDelegate;
61 62

- (void)loadFolderContent;
63
- (void)saveObjectToDocuments;
64 65

@end