VLCServerBrowsingController.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. @property (nonatomic, readonly) id<VLCNetworkServerBrowser> serverBrowser;
  31. @property (nonatomic, weak, nullable, readonly) UIViewController *viewController;
  32. - (instancetype)init NS_UNAVAILABLE;
  33. - (instancetype)initWithViewController:(UIViewController *)viewController serverBrowser:(id<VLCNetworkServerBrowser>)browser;
  34. - (void)configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:(id<VLCNetworkServerBrowserItem>)item;
  35. #pragma mark - Subtitles
  36. - (void)configureSubtitlesInMediaList:(VLCMediaList *)mediaList;
  37. #pragma mark - Streaming
  38. - (void)streamFileForItem:(id<VLCNetworkServerBrowserItem>)item;
  39. - (void)streamMediaList:(VLCMediaList *)mediaList startingAtIndex:(NSInteger)startIndex;
  40. #if DOWNLOAD_SUPPORTED
  41. - (BOOL)triggerDownloadForItem:(id<VLCNetworkServerBrowserItem>)item;
  42. #endif
  43. @end
  44. NS_ASSUME_NONNULL_END