VLCKit
Instance Methods | Properties | List of all members
VLCMediaList Class Reference

#import <VLCMediaList.h>

Inheritance diagram for VLCMediaList:

Instance Methods

(instancetype) - initWithArray:
 
(void) - lock
 
(void) - unlock
 
(NSInteger) - addMedia:
 
(void) - insertMedia:atIndex:
 
(void) - removeMediaAtIndex:
 
(VLCMedia *) - mediaAtIndex:
 
(NSInteger) - indexOfMedia:
 

Properties

NSInteger count
 
id delegate
 
BOOL isReadOnly
 

Detailed Description

VLCMediaList

Method Documentation

- (NSInteger) addMedia: (VLCMedia *)  media

add a media to a read-write list

Parameters
mediathe media object to add
Returns
the index of the newly added media
Note
this function silently fails if the list is read-only
- (NSInteger) indexOfMedia: (VLCMedia *)  media

retrieve the position of a media item

Parameters
mediathe media object to search for
Returns
the index position of the media in the list or -1 if not found
- (instancetype) initWithArray: (NSArray *)  array

initializer with a set of VLCMedia instances

Parameters
arraythe NSArray of VLCMedia instances
Returns
instance of VLCMediaList equipped with the VLCMedia instances
See also
VLCMedia
- (void) insertMedia: (VLCMedia *)  media
atIndex: (NSInteger)  index 

add a media to a read-write list at a given position

Parameters
mediathe media object to add
indexthe index where to add the given media
Note
this function silently fails if the list is read-only
- (void) lock

lock the media list from being edited by another thread

- (VLCMedia *) mediaAtIndex: (NSInteger)  index

retrieve a media from a given position

Parameters
indexthe index of the media you want
Returns
the media object
- (void) removeMediaAtIndex: (NSInteger)  index

remove a media from a given position

Parameters
indexthe index of the media to remove
Note
this function silently fails if the list is read-only
- (void) unlock

unlock the media list from being edited by another thread

Property Documentation

- (NSInteger) count
readatomicassign

count number of media items in the list

Returns
the number of media objects
- (id) delegate
readwritenonatomicweak

delegate property to listen to addition/removal events

- (BOOL) isReadOnly
readatomicassign

read-only property to check if the media list is writable or not

Returns
boolean value if the list is read-only

The documentation for this class was generated from the following file: