VLCServerBrowsingController.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. @property (nonatomic) BOOL couldBeAudioOnlyMedia;
  22. #if DOWNLOAD_SUPPORTED
  23. @property (nonatomic) BOOL isDownloadable;
  24. #endif
  25. @end
  26. @interface VLCServerBrowsingController : NSObject
  27. @property (nonatomic, nullable) NSByteCountFormatter *byteCountFormatter;
  28. @property (nonatomic, nullable) UIImage *folderImage;
  29. @property (nonatomic, nullable) UIImage *genericFileImage;
  30. #if DOWNLOAD_SUPPORTED
  31. @property (nonatomic) BOOL allowsFileDownload;
  32. #endif
  33. @property (nonatomic, readonly) id<VLCNetworkServerBrowser> serverBrowser;
  34. @property (nonatomic, weak, nullable, readonly) UIViewController *viewController;
  35. - (instancetype)init NS_UNAVAILABLE;
  36. - (instancetype)initWithViewController:(UIViewController *)viewController serverBrowser:(id<VLCNetworkServerBrowser>)browser;
  37. - (void)configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:(id<VLCNetworkServerBrowserItem>)item;
  38. #pragma mark - Subtitles
  39. - (void)configureSubtitlesInMediaList:(VLCMediaList *)mediaList;
  40. #pragma mark - Streaming
  41. - (void)streamFileForItem:(id<VLCNetworkServerBrowserItem>)item;
  42. - (void)streamMediaList:(VLCMediaList *)mediaList startingAtIndex:(NSInteger)startIndex;
  43. #if DOWNLOAD_SUPPORTED
  44. - (BOOL)triggerDownloadForItem:(id<VLCNetworkServerBrowserItem>)item;
  45. #endif
  46. @end
  47. NS_ASSUME_NONNULL_END