VLCNetworkServerBrowser-Protocol.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*****************************************************************************
  2. * VLCNetworkServerBrowser-Protocol.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2015 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Tobias Conradi <videolan # tobias-conradi.de>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. #import <Foundation/Foundation.h>
  13. NS_ASSUME_NONNULL_BEGIN
  14. @protocol VLCNetworkServerBrowserItem;
  15. @protocol VLCNetworkServerBrowserDelegate;
  16. @protocol VLCNetworkServerBrowser <NSObject>
  17. @property (nonatomic, weak) id <VLCNetworkServerBrowserDelegate> delegate;
  18. @property (nonatomic, readonly, nullable) NSString *title;
  19. @property (nonatomic, copy, readonly) NSArray<id<VLCNetworkServerBrowserItem>> *items;
  20. - (void)update;
  21. @end
  22. @protocol VLCNetworkServerBrowserDelegate <NSObject>
  23. - (void) networkServerBrowserDidUpdate:(id<VLCNetworkServerBrowser>)networkBrowser;
  24. - (void) networkServerBrowser:(id<VLCNetworkServerBrowser>)networkBrowser requestDidFailWithError:(NSError *)error;
  25. @end
  26. @protocol VLCNetworkServerBrowserItem <NSObject>
  27. @property (nonatomic, readonly, getter=isContainer) BOOL container;
  28. // if item is container browser is the browser for the container
  29. @property (nonatomic, readonly, nullable) id<VLCNetworkServerBrowser> containerBrowser;
  30. @property (nonatomic, readonly) NSString *name;
  31. @property (nonatomic, readonly, nullable) NSURL *URL;
  32. @property (nonatomic, readonly, nullable) NSNumber *fileSizeBytes;
  33. @optional
  34. @property (nonatomic, readonly, nullable) NSString *duration;
  35. @property (nonatomic, readonly, nullable) NSURL *subtitleURL;
  36. @property (nonatomic, readonly, nullable) NSURL *thumbnailURL;
  37. @property (nonatomic, getter=isDownloadable, readonly) BOOL downloadable;
  38. @end
  39. NS_ASSUME_NONNULL_END