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
44 @protocol VLCMediaListDelegate
45 @optional
53 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
54
61 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)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 - (NSInteger)addMedia:(VLCMedia *)media;
96
104 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
105
112 - (void)removeMediaAtIndex:(NSInteger)index;
113
120 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
121
128 - (NSInteger)indexOfMedia:(VLCMedia *)media;
129
130 /* Properties */
135 @property (readonly) NSInteger count;
136
140 @property (weak, nonatomic) id delegate;
141
146 @property (readonly) BOOL isReadOnly;
147
148 @end
-[VLCMediaList unlock]
void unlock()
VLCMediaList::delegate
id delegate
Definition: VLCMediaList.h:140
VLCMediaListDelegate-p
Definition: VLCMediaList.h:44
VLCMediaList
Definition: VLCMediaList.h:67
VLCMediaList::count
NSInteger count
Definition: VLCMediaList.h:135
VLCMediaList::isReadOnly
BOOL isReadOnly
Definition: VLCMediaList.h:146
VLCMedia
Definition: VLCMedia.h:112
-[VLCMediaList lock]
void lock()