123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- /*****************************************************************************
- * VLCRendererDiscoverer.h
- *****************************************************************************
- * Copyright © 2018 VLC authors, VideoLAN
- * Copyright © 2018 Videolabs
- *
- * Authors: Soomin Lee<bubu@mikan.io>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
- @class VLCRendererItem;
- @class VLCRendererDiscoverer;
- NS_ASSUME_NONNULL_BEGIN
- /**
- * Renderer Discoverer delegate protocol
- * Allows to be notified upon discovery/changes of an renderer item
- */
- @protocol VLCRendererDiscovererDelegate <NSObject>
- - (void)rendererDiscovererItemAdded:(VLCRendererDiscoverer *)rendererDiscoverer
- item:(VLCRendererItem *)item;
- - (void)rendererDiscovererItemDeleted:(VLCRendererDiscoverer *)rendererDiscoverer
- item:(VLCRendererItem *)item;
- @end
- /**
- * Renderer Discoverer description
- */
- @interface VLCRendererDiscovererDescription : NSObject
- /**
- * Name of the renderer discoverer
- */
- @property (nonatomic, readonly, copy) NSString *name;
- /**
- * Long name of the renderer discoverer
- */
- @property (nonatomic, readonly, copy) NSString *longName;
- /**
- * Instanciates an object that holds information about a renderer discoverer
- * \param name Name of the renderer discoverer
- * \param longName Long name of the renderer discoverer
- * \return A new `VLCRendererDiscovererDescription` object, only if there were no errors
- */
- - (instancetype)initWithName:(NSString *)name longName:(NSString *)longName;
- @end
- /**
- * Renderer Discoverer
- */
- @interface VLCRendererDiscoverer : NSObject
- /**
- * Name of the renderer discoverer
- */
- @property (nonatomic, readonly, copy) NSString *name;
- /**
- * Renderers of the discoverer
- */
- @property (nonatomic, readonly, copy) NSArray<VLCRendererItem *> *renderers;
- /**
- * Receiver's delegate
- */
- @property (nonatomic, weak) id <VLCRendererDiscovererDelegate> _Nullable delegate;
- - (instancetype)init NS_UNAVAILABLE;
- /**
- * Instanciates a `VLCRendererDiscoverer`
- * \param name Name of the renderer discoverer
- * \return A new `VLCRendererDiscoverer` object, only if there were no errors
- */
- - (instancetype _Nullable)initWithName:(NSString *)name;
- /**
- * Returns discovered renderers
- * \return discovered renderers
- */
- - (NSArray<VLCRendererItem *> *)renderers;
- /**
- * Start the renderer discoverer
- * \return `YES` if successful, `NO` otherwise
- */
- - (BOOL)start;
- /**
- * Stops the renderer discoverer
- * \note This cannot fail
- */
- - (void)stop;
- /**
- * Returns an `NSArray` of `VLCRendererDiscovererDescription`
- * \note Call this method to retreive information in order to instanciate a `
- * `VLCRendererDiscoverer`
- * \return An `NSArray` of `VLCRendererDiscovererDescription`
- */
- + (NSArray<VLCRendererDiscovererDescription *> * _Nullable)list;
- @end
- NS_ASSUME_NONNULL_END
|