VLCMediaFileDiscoverer.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*****************************************************************************
  2. * VLCMediaFileDiscoverer.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2013 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Gleb Pinigin <gpinigin # gmail.com>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. #import <Foundation/Foundation.h>
  13. @protocol VLCMediaFileDiscovererDelegate <NSObject>
  14. @required
  15. - (void)mediaFilesFoundRequiringAdditionToStorageBackend:(NSArray <NSString *> *)foundFiles;
  16. @optional
  17. // loading is equal to YES first time when file is discovered
  18. - (void)mediaFileAdded:(NSString *)filePath loading:(BOOL)isLoading;
  19. - (void)mediaFileChanged:(NSString *)filePath size:(unsigned long long)size;
  20. - (void)mediaFileDeleted:(NSString *)filePath;
  21. @end
  22. @interface VLCMediaFileDiscoverer : NSObject
  23. /**
  24. * the path the discoverer will monitor
  25. * \note _MUST_ be set before starting the discovery
  26. */
  27. @property (readwrite, retain, nonatomic) NSString *directoryPath;
  28. @property (readwrite, nonatomic) BOOL filterResultsForPlayability;
  29. - (void)addObserver:(id<VLCMediaFileDiscovererDelegate>)delegate;
  30. - (void)removeObserver:(id<VLCMediaFileDiscovererDelegate>)delegate;
  31. - (void)startDiscovering;
  32. - (void)stopDiscovering;
  33. - (void)updateMediaList;
  34. + (instancetype)sharedInstance;
  35. @end