VLCNetworkServerBrowser-Protocol.h 2.14 KB
Newer Older
1 2 3 4
/*****************************************************************************
 * VLCNetworkServerBrowser-Protocol.h
 * VLC for iOS
 *****************************************************************************
5
 * Copyright (c) 2015-2018 VideoLAN. All rights reserved.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * $Id$
 *
 * Authors: Tobias Conradi <videolan # tobias-conradi.de>
 *
 * Refer to the COPYING file of the official project for license.
 *****************************************************************************/

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol VLCNetworkServerBrowserItem;
@protocol VLCNetworkServerBrowserDelegate;

@protocol VLCNetworkServerBrowser <NSObject>

22
@required
23 24
@property (nonatomic, weak) id <VLCNetworkServerBrowserDelegate> delegate;
@property (nonatomic, readonly, nullable) NSString *title;
25
@property (nonatomic, readonly, copy) VLCMediaList *mediaList;
26
@property (nonatomic, copy, readonly) NSArray<id<VLCNetworkServerBrowserItem>> *items;
27 28 29 30 31 32 33 34 35 36 37 38

- (void)update;

@end

@protocol VLCNetworkServerBrowserDelegate <NSObject>
- (void) networkServerBrowserDidUpdate:(id<VLCNetworkServerBrowser>)networkBrowser;
- (void) networkServerBrowser:(id<VLCNetworkServerBrowser>)networkBrowser requestDidFailWithError:(NSError *)error;
@end


@protocol VLCNetworkServerBrowserItem <NSObject>
39
@required
40 41 42 43
@property (nonatomic, readonly, getter=isContainer) BOOL container;
// if item is container browser is the browser for the container
@property (nonatomic, readonly, nullable) id<VLCNetworkServerBrowser> containerBrowser;

44
@property (nonatomic, readonly, nullable) VLCMedia *media;
45
@property (nonatomic, readonly) NSString *name;
46
@property (nonatomic, readonly, nullable) NSURL *URL;
47 48
@property (nonatomic, readonly, nullable) NSNumber *fileSizeBytes;

49
@optional
50
@property (nonatomic, readonly, nullable) NSString *filename;
51
@property (nonatomic, readonly, nullable) NSString *duration;
52
@property (nonatomic, readonly, nullable) NSString *subtitleType;
53
@property (nonatomic, readonly, nullable) NSURL *subtitleURL;
54
@property (nonatomic, readonly, nullable) NSURL *thumbnailURL;
55
@property (nonatomic, getter=isDownloadable, readonly) BOOL downloadable;
56 57 58
@end


59
NS_ASSUME_NONNULL_END