VLCMediaDiscoverer.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*****************************************************************************
  2. * VLCMediaDiscoverer.h: VLCKit.framework VLCMediaDiscoverer header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2015 Felix Paul Kühne
  6. * Copyright (C) 2007, 2015 VLC authors and VideoLAN
  7. * $Id$
  8. *
  9. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  10. * Felix Paul Kühne <fkuehne # videolan.org>
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU Lesser General Public License as published by
  14. * the Free Software Foundation; either version 2.1 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Lesser General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Lesser General Public License
  23. * along with this program; if not, write to the Free Software Foundation,
  24. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  25. *****************************************************************************/
  26. #import <Foundation/Foundation.h>
  27. #import "VLCMediaList.h"
  28. @class VLCLibrary;
  29. @class VLCMediaList;
  30. @class VLCMediaDiscoverer;
  31. /**
  32. * VLCMediaDiscovererDelegate
  33. */
  34. @protocol VLCMediaDiscovererDelegate <NSObject>
  35. @optional
  36. /**
  37. * delegate method triggered when a discoverer was started
  38. *
  39. * \param the discoverer that was started
  40. */
  41. - (void)discovererStarted:(VLCMediaDiscoverer *)theDiscoverer;
  42. /**
  43. * delegate method triggered when a discoverer was stopped
  44. *
  45. * \param the discoverer that was stopped
  46. */
  47. - (void)discovererStopped:(VLCMediaDiscoverer *)theDiscoverer;
  48. @end
  49. /**
  50. * VLCMediaDiscoverer
  51. */
  52. @interface VLCMediaDiscoverer : NSObject
  53. @property (nonatomic, readonly) VLCLibrary *libraryInstance;
  54. /**
  55. * delegate property to listen to start/stop events
  56. */
  57. @property (weak, readwrite) id<VLCMediaDiscovererDelegate> delegate;
  58. /**
  59. * Maintains a list of available media discoverers. This list is populated as new media
  60. * discoverers are created.
  61. * \return A list of available media discoverers.
  62. */
  63. + (NSArray *)availableMediaDiscoverer;
  64. /* Initializers */
  65. /**
  66. * Initializes new object with specified name.
  67. * \param aServiceName Name of the service for this VLCMediaDiscoverer object.
  68. * \returns Newly created media discoverer.
  69. * \note with VLCKit 3.0 and above, you need to start the discoverer explicitly after creation
  70. */
  71. - (instancetype)initWithName:(NSString *)aServiceName;
  72. /**
  73. * start media discovery
  74. * \returns -1 if start failed, otherwise 0
  75. */
  76. - (int)startDiscoverer;
  77. /**
  78. * stop media discovery
  79. */
  80. - (void)stopDiscoverer;
  81. /**
  82. * a read-only property to retrieve the list of discovered media items
  83. */
  84. @property (weak, readonly) VLCMediaList *discoveredMedia;
  85. /**
  86. * returns the localized name of the discovery module if available, otherwise in US English
  87. */
  88. @property (readonly, copy) NSString *localizedName;
  89. /**
  90. * read-only property to check if the discovery service is active
  91. * \return boolean value
  92. */
  93. @property (readonly) BOOL isRunning;
  94. @end