cog/Playlist/PlaylistLoader.h

59 lines
1.5 KiB
C
Raw Normal View History

2007-03-07 01:26:50 +00:00
//
// PlaylistLoader.h
// Cog
//
// Created by Vincent Spader on 3/05/07.
// Copyright 2007 Vincent Spader All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PlaylistController.h"
2007-03-07 01:26:50 +00:00
@class PlaylistController;
@class PlaybackController;
@class PlaylistEntry;
2007-03-07 01:26:50 +00:00
typedef enum {
kPlaylistM3u,
kPlaylistPls,
kPlaylistXml,
2007-03-07 01:26:50 +00:00
} PlaylistType;
@interface PlaylistLoader : NSObject {
IBOutlet PlaylistController *playlistController;
NSOperationQueue *queue;
2007-03-07 01:26:50 +00:00
}
- (void)initDefaults;
// Clear playlist
- (void)clear:(id)sender;
// Load arrays of urls...
- (NSArray*)addURLs:(NSArray *)urls sort:(BOOL)sort;
- (NSArray*)addURL:(NSURL *)url;
- (NSArray*)insertURLs:(NSArray *)urls atIndex:(int)index sort:(BOOL)sort;
// Save playlist, auto-determines type based on extension. Uses m3u if it cannot be determined.
2007-03-07 01:26:50 +00:00
- (BOOL)save:(NSString *)filename;
- (BOOL)save:(NSString *)filename asType:(PlaylistType)type;
- (BOOL)saveM3u:(NSString *)filename;
- (BOOL)savePls:(NSString *)filename;
- (BOOL)saveXml:(NSString *)filename;
2007-03-07 01:26:50 +00:00
// Read info for a playlist entry
2016-06-29 02:33:21 +00:00
//- (NSDictionary *)readEntryInfo:(PlaylistEntry *)pe;
- (void)loadInfoForEntries:(NSArray *)entries;
- (NSArray *)acceptableFileTypes;
- (NSArray *)acceptablePlaylistTypes; //Only m3u and pls saving
- (NSArray *)acceptableContainerTypes;
2007-03-07 01:26:50 +00:00
// Events (passed to playlist controler):
2009-02-28 22:22:33 +00:00
- (void)willInsertURLs:(NSArray*)urls origin:(URLOrigin)origin;
- (void)didInsertURLs:(NSArray*)entries origin:(URLOrigin)origin;
2007-03-07 01:26:50 +00:00
@end