VLCOneDriveObject.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*****************************************************************************
  2. * VLCOneDriveObject.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2015 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Felix Paul Kühne <fkuehne # videolan.org>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. #import <LiveSDK/LiveConnectClient.h>
  13. @class VLCOneDriveObject;
  14. @protocol VLCOneDriveObjectDelegate <NSObject>
  15. - (void)folderContentLoaded:(VLCOneDriveObject *)sender;
  16. - (void)fullFolderTreeLoaded:(VLCOneDriveObject *)sender;
  17. - (void)folderContentLoadingFailed:(NSError *)error
  18. sender:(VLCOneDriveObject *) sender;
  19. @end
  20. @protocol VLCOneDriveObjectDownloadDelegate <NSObject>
  21. - (void)downloadStarted:(VLCOneDriveObject *)object;
  22. - (void)downloadEnded:(VLCOneDriveObject *)object;
  23. - (void)progressUpdated:(CGFloat)progress;
  24. - (void)calculateRemainingTime:(CGFloat)receivedDataSize expectedDownloadSize:(CGFloat)expectedDownloadSize;
  25. @end
  26. @interface VLCOneDriveObject : NSObject <LiveOperationDelegate, LiveDownloadOperationDelegate, VLCOneDriveObjectDelegate>
  27. @property (strong, nonatomic) VLCOneDriveObject *parent;
  28. @property (strong, nonatomic) NSString *objectId;
  29. @property (strong, nonatomic) NSString *name;
  30. @property (strong, nonatomic) NSString *type;
  31. @property (strong, nonatomic) NSNumber *size;
  32. @property (strong, nonatomic) NSNumber *duration;
  33. @property (strong, nonatomic) NSString *thumbnailURL;
  34. @property (readonly, nonatomic) BOOL isFolder;
  35. @property (readonly, nonatomic) BOOL isVideo;
  36. @property (readonly, nonatomic) BOOL isAudio;
  37. @property (strong, nonatomic) NSArray *folders;
  38. @property (strong, nonatomic) NSArray *files;
  39. @property (strong, nonatomic) NSArray *items;
  40. @property (readonly, nonatomic) NSString *filesPath;
  41. @property (strong, nonatomic) NSString *downloadPath;
  42. @property (readonly, nonatomic) BOOL hasFullFolderTree;
  43. @property (strong, nonatomic) LiveConnectClient *liveClient;
  44. @property (strong, nonatomic) id<VLCOneDriveObjectDelegate>delegate;
  45. @property (strong, nonatomic) id<VLCOneDriveObjectDownloadDelegate>downloadDelegate;
  46. - (void)loadFolderContent;
  47. - (void)saveObjectToDocuments;
  48. @end