Merge branch 'master' of git://github.com/ksuther/MenuTunes
[MenuTunes.git] / PlaylistNode.h
1 /*
2  *      MenuTunes
3  *      PlaylistNode.h
4  *
5  *      Helper class for keeping track of sources, playlists and folders.
6  *
7  *      Copyright (c) 2005 iThink Software
8  *
9  */
10  
11 #import <Cocoa/Cocoa.h>
12 #import <ITMTRemote/ITMTRemote.h>
13
14 typedef enum {
15     ITMTSourceNode = -1,
16         ITMTPlaylistNode,
17     ITMTFolderNode,
18         ITMTPartyShuffleNode,
19         ITMTPodcastsNode,
20         ITMTPurchasedMusicNode,
21         ITMTVideosNode
22 } ITMTNodeType;
23
24 @interface PlaylistNode : NSObject
25 {
26         NSString *_name;
27         ITMTNodeType _type;
28         ITMTRemotePlayerSource _sourceType;
29         NSMutableArray *_children;
30         PlaylistNode *_parent;
31         int _index;
32 }
33 + (PlaylistNode *)playlistNodeWithName:(NSString *)n type:(ITMTNodeType)t index:(int)i;
34
35 - (id)initWithName:(NSString *)n type:(ITMTNodeType)t index:(int)i;
36
37 - (NSString *)name;
38 - (NSMutableArray *)children;
39 - (int)index;
40
41 - (void)setType:(ITMTNodeType)t;
42 - (ITMTNodeType)type;
43
44 - (PlaylistNode *)parent;
45 - (void)setParent:(PlaylistNode *)p;
46
47 - (ITMTRemotePlayerSource)sourceType;
48 - (void)setSourceType:(ITMTRemotePlayerSource)t;
49 @end