VLCMediaList.h 2.49 KB
Newer Older
1
/*****************************************************************************
2
 * VLCMediaList.h: VLC.framework VLCMediaList header
3
4
5
 *****************************************************************************
 * Copyright (C) 2007 Pierre d'Herbemont
 * Copyright (C) 2007 the VideoLAN team
6
 * $Id: VLCMediaList.h 21564 2007-08-29 21:09:27Z pdherbemont $
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 *
 * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

25
#import "VLCMedia.h"
26

27
/* Notification Messages */
28
29
extern NSString * VLCMediaListItemAdded;
extern NSString * VLCMediaListItemDeleted;
30

31
32
@class VLCMedia;
@class VLCMediaList;
33
@class VLCMediaListAspect;
34

35
36
// TODO: Documentation
@protocol VLCMediaListDelegate
37
38
- (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(int)index;
- (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(int)index;
39
@end
40

41
42
// TODO: Documentation
@interface VLCMediaList : NSObject
43
{
44
    void * p_mlist;                //< Internal instance of media list
45
    id <VLCMediaListDelegate,NSObject> delegate;                //< Delegate object
46
    NSMutableArray *cachedMedia; /* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
47
48
    VLCMediaListAspect * flatAspect;
    VLCMediaListAspect * hierarchicalAspect;
49
50
}

51
52
53
54
55
/* Properties */
- (void)setDelegate:(id)value;
- (id)delegate;

/* Operations */
56
57
58
- (void)lock;
- (void)unlock;

59
60
61
62
63
64
- (int)addMedia:(VLCMedia *)media;
- (void)insertMedia:(VLCMedia *)media atIndex:(int)index;
- (void)removeMediaAtIndex:(int)index;
- (VLCMedia *)mediaAtIndex:(int)index;
- (int)indexOfMedia:(VLCMedia *)media;
- (int)count;
65

66
67
- (BOOL)isReadOnly;

68
69
70
/* Media list aspect */
- (VLCMediaListAspect *)hierarchicalAspect;
- (VLCMediaListAspect *)flatAspect;
71
@end