]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Headers/Public/VLCMediaList.h
macosx/framework: Added [VLCMediaList initWithArray:] method
[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
34 /**
35  * TODO: Documentation VLCMediaListDelegate
36  */
37 @protocol VLCMediaListDelegate
38 /**
39  * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
40  */
41 - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
42
43 /**
44  * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
45  */
46 - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
47 @end
48
49 /**
50  * TODO: Documentation VLCMediaList
51  */
52 @interface VLCMediaList : NSObject
53 {
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.
58 }
59
60 /**
61  * Init a MediaList with the media contained in array.
62  * \array an array of VLCMedia.
63  */
64 - (id)initWithArray:(NSArray *)array;
65
66 /* Operations */
67 /**
68  * TODO: Documentation - [VLCMediaList lock]
69  */
70 - (void)lock;
71
72 /**
73  * TODO: Documentation - [VLCMediaList unlock]
74  */
75 - (void)unlock;
76
77 /**
78  * TODO: Documentation - [VLCMediaList addMedia:]
79  */
80 - (NSInteger)addMedia:(VLCMedia *)media;
81
82 /**
83  * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
84  */
85 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
86
87 /**
88  * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
89  */
90 - (void)removeMediaAtIndex:(NSInteger)index;
91
92 /**
93  * TODO: Documentation - [VLCMediaList mediaAtIndex:]
94  */
95 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
96
97 /**
98  * TODO: Documentation - [VLCMediaList indexOfMedia:]
99  */
100 - (NSInteger)indexOfMedia:(VLCMedia *)media;
101
102 /* Properties */
103 /**
104  * TODO: Documentation VLCMediaList.count
105  */
106 @property (readonly) NSInteger count;
107
108 /**
109  * TODO: Documentation VLCMediaList.delegate
110  */
111 @property (assign) id delegate;
112
113 /**
114  * TODO: Documentation VLCMediaList.isReadOnly
115  */
116 @property (readonly) BOOL isReadOnly;
117
118 @end