VLCServerBrowsingController.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*****************************************************************************
  2. * VLC for iOS
  3. *****************************************************************************
  4. * Copyright (c) 2015 VideoLAN. All rights reserved.
  5. * $Id$
  6. *
  7. * Authors: Tobias Conradi <videolan # tobias-conradi.de>
  8. *
  9. * Refer to the COPYING file of the official project for license.
  10. *****************************************************************************/
  11. #import <UIKit/UIKit.h>
  12. #import "VLCNetworkServerBrowser-Protocol.h"
  13. #define DOWNLOAD_SUPPORTED TARGET_OS_IOS
  14. NS_ASSUME_NONNULL_BEGIN
  15. @protocol VLCRemoteBrowsingCell <NSObject>
  16. @property (nonatomic, nullable) NSString *title;
  17. @property (nonatomic, nullable) NSString *subtitle;
  18. @property (nonatomic, nullable) UIImage *thumbnailImage;
  19. @property (nonatomic, nullable) NSURL *thumbnailURL;
  20. @property (nonatomic) BOOL isDirectory;
  21. #if DOWNLOAD_SUPPORTED
  22. @property (nonatomic) BOOL isDownloadable;
  23. #endif
  24. @end
  25. @interface VLCServerBrowsingController : NSObject
  26. @property (nonatomic, nullable) NSByteCountFormatter *byteCountFormatter;
  27. @property (nonatomic, nullable) UIImage *folderImage;
  28. @property (nonatomic, nullable) UIImage *genericFileImage;
  29. #if DOWNLOAD_SUPPORTED
  30. @property (nonatomic) BOOL allowsFileDownload;
  31. #endif
  32. @property (nonatomic, readonly) id<VLCNetworkServerBrowser> serverBrowser;
  33. @property (nonatomic, weak, nullable, readonly) UIViewController *viewController;
  34. - (instancetype)init NS_UNAVAILABLE;
  35. - (instancetype)initWithViewController:(UIViewController *)viewController serverBrowser:(id<VLCNetworkServerBrowser>)browser;
  36. - (void)configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:(id<VLCNetworkServerBrowserItem>)item;
  37. #pragma mark - Subtitles
  38. - (void)configureSubtitlesInMediaList:(VLCMediaList *)mediaList;
  39. #pragma mark - Streaming
  40. - (void)streamFileForItem:(id<VLCNetworkServerBrowserItem>)item;
  41. - (void)streamMediaList:(VLCMediaList *)mediaList startingAtIndex:(NSInteger)startIndex;
  42. #if DOWNLOAD_SUPPORTED
  43. - (BOOL)triggerDownloadForItem:(id<VLCNetworkServerBrowserItem>)item;
  44. #endif
  45. @end
  46. NS_ASSUME_NONNULL_END