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;
33 @class VLCMediaListAspect;
36 * TODO: Documentation VLCMediaListDelegate
38 @protocol VLCMediaListDelegate
40 * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
42 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
45 * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
47 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
51 * TODO: Documentation VLCMediaList
53 @interface VLCMediaList : NSObject
55 void * p_mlist; //< Internal instance of media list
56 id <VLCMediaListDelegate,NSObject> delegate; //< Delegate object
57 /* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
58 NSMutableArray * cachedMedia; //< Private copy of media objects.
59 VLCMediaListAspect * flatAspect; //< TODO: Documentation VLCMediaList.flatAspect
60 VLCMediaListAspect * hierarchicalAspect; //< TODO: Documentation VLCMediaList.hierarchicalAspect
61 VLCMediaListAspect * hierarchicalNodeAspect; //< TODO: Documentation VLCMediaList.hierarchicalNodeAspect
66 * TODO: Documentation - [VLCMediaList lock]
71 * TODO: Documentation - [VLCMediaList unlock]
76 * TODO: Documentation - [VLCMediaList addMedia:]
78 - (NSInteger)addMedia:(VLCMedia *)media;
81 * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
83 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
86 * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
88 - (void)removeMediaAtIndex:(NSInteger)index;
91 * TODO: Documentation - [VLCMediaList mediaAtIndex:]
93 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
96 * TODO: Documentation - [VLCMediaList indexOfMedia:]
98 - (NSInteger)indexOfMedia:(VLCMedia *)media;
102 * TODO: Documentation VLCMediaList.count
104 @property (readonly) NSInteger count;
107 * TODO: Documentation VLCMediaList.delegate
109 @property (assign) id delegate;
112 * TODO: Documentation VLCMediaList.isReadOnly
114 @property (readonly) BOOL isReadOnly;
116 /* Media list aspect */
118 * TODO: Documentation VLCMediaList.hierarchicalAspect
120 @property (readonly) VLCMediaListAspect * hierarchicalAspect;
123 * TODO: Documentation VLCMediaList.hierarchicalNodeAspect
125 @property (readonly) VLCMediaListAspect * hierarchicalNodeAspect;
128 * TODO: Documentation VLCMediaList.flatAspect
130 @property (readonly) VLCMediaListAspect * flatAspect;