VLCKit
VLCMediaList.h
1 /*****************************************************************************
2  * VLCMediaList.h: VLCKit.framework VLCMediaList 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  *
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU Lesser General Public License as published by
13  * the Free Software Foundation; either version 2.1 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25 
26 #import <Foundation/Foundation.h>
27 #import "VLCMedia.h"
28 
32 extern NSString *const VLCMediaListItemAdded;
36 extern NSString *const VLCMediaListItemDeleted;
37 
38 @class VLCMedia;
39 @class VLCMediaList;
40 
45 @optional
53 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSUInteger)index;
54 
61 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSUInteger)index;
62 @end
63 
67 @interface VLCMediaList : NSObject
68 
75 - (instancetype)initWithArray:(NSArray *)array;
76 
77 /* Operations */
81 - (void)lock;
82 
86 - (void)unlock;
87 
95 - (NSUInteger)addMedia:(VLCMedia *)media;
96 
104 - (void)insertMedia:(VLCMedia *)media atIndex:(NSUInteger)index;
105 
114 - (BOOL)removeMediaAtIndex:(NSUInteger)index;
115 
122 - (VLCMedia *)mediaAtIndex:(NSUInteger)index;
123 
131 - (NSUInteger)indexOfMedia:(VLCMedia *)media;
132 
133 /* Properties */
138 @property (readonly) NSInteger count;
139 
143 @property (weak, nonatomic) id delegate;
144 
149 @property (readonly) BOOL isReadOnly;
150 
151 @end
-[VLCMediaList unlock]
void unlock()
VLCMediaList
Definition: VLCMediaList.h:68
VLCMedia
Definition: VLCMedia.h:113
VLCMediaListDelegate-p
Definition: VLCMediaList.h:44
-[VLCMediaList lock]
void lock()
VLCMediaList::count
NSInteger count
Definition: VLCMediaList.h:138
VLCMediaList::isReadOnly
BOOL isReadOnly
Definition: VLCMediaList.h:149
VLCMediaList::delegate
id delegate
Definition: VLCMediaList.h:143