VLCGoogleDriveController.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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, readonly) NSInteger numberOfFilesWaitingToBeDownloaded;
  31. @property (nonatomic, retain) GTLServiceDrive *driveService;
  32. + (VLCGoogleDriveController *)sharedInstance;
  33. - (void)startSession;
  34. - (void)stopSession;
  35. - (void)logout;
  36. - (void)requestFileListing;
  37. - (BOOL)hasMoreFiles;
  38. - (void)downloadFileToDocumentFolder:(GTLDriveFile *)file;
  39. @end