VLCNetworkServerBrowser-Protocol.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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) NSURL *URL;
  32. @property (nonatomic, readonly, nullable) NSNumber *fileSizeBytes;
  33. @end
  34. NS_ASSUME_NONNULL_END