]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Headers/Public/VLCMediaList.h
45ca74e819cb1fc990d02b41a50fdcae8c6c69c8
[vlc] / projects / macosx / framework / Headers / Public / VLCMediaList.h
1 /*****************************************************************************
2  * VLCMediaList.h: VLCKit.framework VLCMediaList header
3  *****************************************************************************
4  * Copyright (C) 2007 Pierre d'Herbemont
5  * Copyright (C) 2007 the VideoLAN team
6  * $Id$
7  *
8  * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 #import "VLCMedia.h"
26
27 /* Notification Messages */
28 extern NSString * VLCMediaListItemAdded;
29 extern NSString * VLCMediaListItemDeleted;
30
31 @class VLCMedia;
32 @class VLCMediaList;
33 @class VLCMediaListAspect;
34
35 /**
36  * TODO: Documentation VLCMediaListDelegate
37  */
38 @protocol VLCMediaListDelegate
39 /**
40  * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
41  */
42 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
43
44 /**
45  * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
46  */
47 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
48 @end
49
50 /**
51  * TODO: Documentation VLCMediaList
52  */
53 @interface VLCMediaList : NSObject
54 {
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
62 }
63
64 /* Operations */
65 /**
66  * TODO: Documentation - [VLCMediaList lock]
67  */
68 - (void)lock;
69
70 /**
71  * TODO: Documentation - [VLCMediaList unlock]
72  */
73 - (void)unlock;
74
75 /**
76  * TODO: Documentation - [VLCMediaList addMedia:]
77  */
78 - (NSInteger)addMedia:(VLCMedia *)media;
79
80 /**
81  * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
82  */
83 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
84
85 /**
86  * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
87  */
88 - (void)removeMediaAtIndex:(NSInteger)index;
89
90 /**
91  * TODO: Documentation - [VLCMediaList mediaAtIndex:]
92  */
93 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
94
95 /**
96  * TODO: Documentation - [VLCMediaList indexOfMedia:]
97  */
98 - (NSInteger)indexOfMedia:(VLCMedia *)media;
99
100 /* Properties */
101 /**
102  * TODO: Documentation VLCMediaList.count
103  */
104 @property (readonly) NSInteger count;
105
106 /**
107  * TODO: Documentation VLCMediaList.delegate
108  */
109 @property (assign) id delegate;
110
111 /**
112  * TODO: Documentation VLCMediaList.isReadOnly
113  */
114 @property (readonly) BOOL isReadOnly;
115
116 /* Media list aspect */
117 /**
118  * TODO: Documentation VLCMediaList.hierarchicalAspect
119  */
120 @property (readonly) VLCMediaListAspect * hierarchicalAspect;
121
122 /**
123  * TODO: Documentation VLCMediaList.hierarchicalNodeAspect
124  */
125 @property (readonly) VLCMediaListAspect * hierarchicalNodeAspect;
126
127 /**
128  * TODO: Documentation VLCMediaList.flatAspect
129  */
130 @property (readonly) VLCMediaListAspect * flatAspect;
131 @end