1 /*****************************************************************************
2 * VLCMediaList.h: VLCKit.framework VLCMediaList header
3 *****************************************************************************
4 * Copyright (C) 2007 Pierre d'Herbemont
5 * Copyright (C) 2007 the VideoLAN team
8 * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
27 /* Notification Messages */
28 extern NSString * VLCMediaListItemAdded;
29 extern NSString * VLCMediaListItemDeleted;
35 * TODO: Documentation VLCMediaListDelegate
37 @protocol VLCMediaListDelegate
39 * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
41 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
44 * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
46 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
50 * TODO: Documentation VLCMediaList
52 @interface VLCMediaList : NSObject
54 void * p_mlist; //< Internal instance of media list
55 id <VLCMediaListDelegate,NSObject> delegate; //< Delegate object
56 /* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
57 NSMutableArray * cachedMedia; //< Private copy of media objects.
61 * Init a MediaList with the media contained in array.
62 * \array an array of VLCMedia.
64 - (id)initWithArray:(NSArray *)array;
68 * TODO: Documentation - [VLCMediaList lock]
73 * TODO: Documentation - [VLCMediaList unlock]
78 * TODO: Documentation - [VLCMediaList addMedia:]
80 - (NSInteger)addMedia:(VLCMedia *)media;
83 * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
85 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
88 * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
90 - (void)removeMediaAtIndex:(NSInteger)index;
93 * TODO: Documentation - [VLCMediaList mediaAtIndex:]
95 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
98 * TODO: Documentation - [VLCMediaList indexOfMedia:]
100 - (NSInteger)indexOfMedia:(VLCMedia *)media;
104 * TODO: Documentation VLCMediaList.count
106 @property (readonly) NSInteger count;
109 * TODO: Documentation VLCMediaList.delegate
111 @property (assign) id delegate;
114 * TODO: Documentation VLCMediaList.isReadOnly
116 @property (readonly) BOOL isReadOnly;