JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MusicPlaylistManager.h
Go to the documentation of this file.
1
12
13#import <Foundation/Foundation.h>
14
15NS_ASSUME_NONNULL_BEGIN
16
24@interface MusicPlaylistManager : NSObject
25
27@property(nonatomic, strong, nullable) NSMutableArray *arrayPlaylist;
29@property(nonatomic, strong, nullable) NSString *filePath;
30
42- (instancetype)initWithFile:(nonnull NSString *)file;
43
48- (void)synchronize;
49
55- (NSUInteger)numberOfPlaylists;
56
66- (nullable NSMutableDictionary *)playlistAtIndex:(NSUInteger)index;
67
74- (NSUInteger)indexOfPlaylist:(nonnull NSDictionary *)playlist;
75
82- (NSUInteger)indexOfPlaylistWithIdentifier:(nullable NSString *)identifier;
83
90- (nullable NSString *)nameOfPlaylistAtIndex:(NSUInteger)index;
91
98- (nullable NSString *)identifierOfPlaylistAtIndex:(NSUInteger)index;
99
107- (BOOL)setNameOfPlaylist:(nonnull NSString *)name atIndex:(NSUInteger)index;
108
118- (BOOL)addPlaylistWithName:(nonnull NSString *)name;
119
126- (BOOL)removePlaylistAtIndex:(NSUInteger)index;
127
134- (NSUInteger)numberOfMusicInPlaylistAtIndex:(NSUInteger)index;
135
143- (BOOL)containsMusic:(NSUInteger)musicIdentifier inPlaylistAtIndex:(NSUInteger)index;
144
155- (void)addMusic:(NSUInteger)musicIdentifier toPlaylistAtIndex:(NSUInteger)index;
156
164- (BOOL)removeMusic:(NSUInteger)musicIdentifier fromPlaylistAtIndex:(NSUInteger)index;
165
166@end
167
168NS_ASSUME_NONNULL_END
169
170// code: language=Objective-C
171// kate: hl Objective-C;
172// vim: set ft=objc :
Manages the user's music playlists, persisting them to a property-list file.
Definition MusicPlaylistManager.h:25
void synchronize()
Writes the current playlists back to the file, atomically.
Definition MusicPlaylistManager.m:44
NSMutableArray * arrayPlaylist
The playlists, each an NSMutableDictionary keyed by identifier, name, and music list.
Definition MusicPlaylistManager.h:27
NSString * filePath
The property-list file the playlists are loaded from and written back to.
Definition MusicPlaylistManager.h:29
NSUInteger numberOfPlaylists()
Returns the number of playlists.
Definition MusicPlaylistManager.m:48