]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Headers/Public/VLCMediaList.h
VLCKit: Import MobileVLCKit.
[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 <Foundation/Foundation.h>
26 #import "VLCMedia.h"
27
28 /* Notification Messages */
29 extern NSString * VLCMediaListItemAdded;
30 extern NSString * VLCMediaListItemDeleted;
31
32 @class VLCMedia;
33 @class VLCMediaList;
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 }
60
61 /**
62  * Init a MediaList with the media contained in array.
63  * \array an array of VLCMedia.
64  */
65 - (id)initWithArray:(NSArray *)array;
66
67 /* Operations */
68 /**
69  * TODO: Documentation - [VLCMediaList lock]
70  */
71 - (void)lock;
72
73 /**
74  * TODO: Documentation - [VLCMediaList unlock]
75  */
76 - (void)unlock;
77
78 /**
79  * TODO: Documentation - [VLCMediaList addMedia:]
80  */
81 - (NSInteger)addMedia:(VLCMedia *)media;
82
83 /**
84  * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
85  */
86 - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
87
88 /**
89  * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
90  */
91 - (void)removeMediaAtIndex:(NSInteger)index;
92
93 /**
94  * TODO: Documentation - [VLCMediaList mediaAtIndex:]
95  */
96 - (VLCMedia *)mediaAtIndex:(NSInteger)index;
97
98 /**
99  * TODO: Documentation - [VLCMediaList indexOfMedia:]
100  */
101 - (NSInteger)indexOfMedia:(VLCMedia *)media;
102
103 /* Properties */
104 /**
105  * TODO: Documentation VLCMediaList.count
106  */
107 @property (readonly) NSInteger count;
108
109 /**
110  * TODO: Documentation VLCMediaList.delegate
111  */
112 @property (assign) id delegate;
113
114 /**
115  * TODO: Documentation VLCMediaList.isReadOnly
116  */
117 @property (readonly) BOOL isReadOnly;
118
119 @end