/* ** Sources.h ** ** Copyright (c) 2004 ** ** Author: Yen-Ju Chen ** ** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __Sources__ #define __Sources__ #include #include "Constants.h" #include "GeneralContainer.h" @interface Sources: GeneralContainer { } /* sorting */ - (void) sort; /* write accessory */ - (void) newSource: (NSString *) title ofType: (SourceType) type; - (void) newSource: (NSString *) title ofType: (SourceType) type atIndex: (unsigned int) index; - (void) setType: (SourceType) type atIndex: (unsigned int) index; - (void) setResourcePath: (NSString *) path atIndex: (unsigned int) index; - (void) setIndexPath: (NSString *) absolutePath atIndex: (unsigned int) index; /* read accessory */ - (SourceType) typeOfSourceAtIndex: (unsigned int) index; - (NSString *) resourcePathAtIndex: (unsigned int) index; - (NSString *) resourceFullPathAtIndex: (unsigned int) index; - (NSString *) indexPathAtIndex: (unsigned int) index; /* For folders */ - (void) setContainer: (id) container atIndex: (unsigned int) index; - (id) containerAtIndex: (unsigned int) index; - (void) removeContainerAtIndex: (unsigned int) index; /* Basic methods */ + (Sources *) sharedSources; @end #endif /* __Sources__ */