forked from overcyn/Enqueue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NSNotificationCenter+Extensions.h
77 lines (57 loc) · 2 KB
/
NSNotificationCenter+Extensions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#import <Foundation/Foundation.h>
#import "PRPlaylists.h"
@interface PRChangeSet : NSObject
@property (nonatomic, strong) NSArray *changes;
@end
@interface PRListChange : NSObject
@property (nonatomic, strong) PRListID *list;
@end
@interface PRNowPlayingChange : NSObject
@end
@interface PRMovieChange : NSObject
@property (nonatomic) BOOL progress;
@end
// KD: todo
@interface PRLibraryChange : NSObject
@end
@interface PRItemChange : NSObject
@property (nonatomic, strong) NSArray *items;
@end
@interface PRListsChange : NSObject
@end
@interface PRListItemsChange : NSObject
@property (nonatomic, strong) PRListID *list;
@end
extern NSString * const PRLibraryViewSelectionDidChangeNotification;
extern NSString * const PRLastfmStateDidChangeNotification;
extern NSString * const PRDeviceDidChangeNotification;
@interface NSNotificationCenter (Extensions)
+ (void)post:(NSString *)name;
+ (void)post:(NSString *)name object:(id)object info:(NSDictionary *)info;
+ (void)addObserver:(id)observer selector:(SEL)selector name:(NSString *)name object:(id)object;
+ (void)removeObserver:(id)observer;
/* Changeset */
- (void)postChanges:(NSArray *)changes;
- (void)observeBackendChanged:(id)obs sel:(SEL)sel;
/* Db */
- (void)postLibraryChanged;
- (void)postItemsChanged:(NSArray *)items;
- (void)postListsDidChange;
- (void)postListItemsDidChange:(PRListID *)list;
- (void)observeLibraryChanged:(id)obs sel:(SEL)sel;
- (void)observeItemsChanged:(id)obs sel:(SEL)sel;
- (void)observePlaylistsChanged:(id)obs sel:(SEL)sel;
- (void)observePlaylistFilesChanged:(id)obs sel:(SEL)sel;
/* Preferences */
- (void)postPreGainChanged;
- (void)postUseAlbumArtistChanged;
- (void)postEQChanged;
- (void)observePreGainChanged:(id)obs sel:(SEL)sel;
- (void)observeUseAlbumArtistChanged:(id)obs sel:(SEL)sel;
- (void)observeEQChanged:(id)obs sel:(SEL)sel;
/* PRMovie */
- (void)postMovieFinished;
- (void)postMovieAlmostFinished;
- (void)observeMovieFinished:(id)obs sel:(SEL)sel;
- (void)observeMovieAlmostFinished:(id)obs sel:(SEL)sel;
@end