4 * Helper class for keeping track of sources, playlists and folders
6 * Original Author : Kent Sutherland <ksuther@ithinksw.com>
7 * Responsibility : Kent Sutherland <ksuther@ithinksw.com>
9 * Copyright (c) 2005 iThink Software.
14 #import "PlaylistNode.h"
17 @implementation PlaylistNode
19 + (PlaylistNode *)playlistNodeWithName:(NSString *)n type:(ITMTNodeType)t index:(int)i
21 return [[[PlaylistNode alloc] initWithName:n type:t index:i] autorelease];
24 - (id)initWithName:(NSString *)n type:(ITMTNodeType)t index:(int)i
26 if ( (self = [super init]) ) {
30 _children = [[NSMutableArray alloc] init];
44 - (NSString *)description
46 return [NSString stringWithFormat:@"{%@, index: %i, type: %i, parent: %@, children: %@}", _name, _index, _type, [_parent name], _children];
54 - (NSMutableArray *)children
64 - (void)setType:(ITMTNodeType)t
74 - (PlaylistNode *)parent
79 - (void)setParent:(PlaylistNode *)p
85 - (ITMTRemotePlayerSource)sourceType
90 - (void)setSourceType:(ITMTRemotePlayerSource)t