VLCGoogleDriveController.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*****************************************************************************
  2. * VLCGoogleDriveController.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2013 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Carola Nitz <nitz.carola # googlemail.com>
  9. * Felix Paul Kühne <fkuehne # videolan.org>
  10. *
  11. * Refer to the COPYING file of the official project for license.
  12. *****************************************************************************/
  13. #import "GTLDrive.h"
  14. #import "GTMOAuth2ViewControllerTouch.h"
  15. #import "VLCGoogleDriveConstants.h"
  16. @protocol VLCGoogleDriveController
  17. @required
  18. - (void)mediaListUpdated;
  19. @optional
  20. - (void)operationWithProgressInformationStarted;
  21. - (void)currentProgressInformation:(float)progress;
  22. - (void)updateRemainingTime:(NSString *)time;
  23. - (void)operationWithProgressInformationStopped;
  24. - (void)numberOfFilesWaitingToBeDownloadedChanged;
  25. @end
  26. @interface VLCGoogleDriveController : NSObject
  27. @property (nonatomic, retain) id delegate;
  28. @property (nonatomic, readonly) NSArray *currentListFiles;
  29. @property (nonatomic, readwrite) BOOL isAuthorized;
  30. @property (nonatomic, retain) GTLServiceDrive *driveService;
  31. + (VLCGoogleDriveController *)sharedInstance;
  32. - (void)startSession;
  33. - (void)stopSession;
  34. - (void)logout;
  35. - (void)requestDirectoryListingWithFolderId:(NSString *)folderId;
  36. - (BOOL)hasMoreFiles;
  37. - (void)downloadFileToDocumentFolder:(GTLDriveFile *)file;
  38. @end