forked from iMediaSandboxing/iMedia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
IMBAppleMediaLibraryParserConfiguration.h
102 lines (80 loc) · 2.55 KB
/
IMBAppleMediaLibraryParserConfiguration.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// IMBAppleMediaLibraryParserConfiguration.h
// iMedia
//
// Created by Jörg Jacobsen on 06.03.15.
//
//
#import <iMedia/iMedia.h>
#import "IMBAppleMediaLibraryParser.h"
@class IMBAppleMediaLibraryParserConfiguration;
typedef id<IMBAppleMediaLibraryParserDelegate> (^IMBMLParserConfigurationFactory)(MLMediaType);
/**
Parser configuration factory for Apple iPhoto app.
*/
extern IMBMLParserConfigurationFactory IMBMLiPhotoParserConfigurationFactory;
/**
Parser configuration factory for Apple Aperture app.
*/
extern IMBMLParserConfigurationFactory IMBMLApertureParserConfigurationFactory;
/**
Parser configuration factory for Apple Photos app.
*/
extern IMBMLParserConfigurationFactory IMBMLPhotosParserConfigurationFactory;
/**
Parser configuration factory for Apple iTunes app.
*/
extern IMBMLParserConfigurationFactory IMBMLiTunesParserConfigurationFactory;
@interface IMBAppleMediaLibraryParserConfiguration : NSObject
{
NSString *_mediaSourceIdentifier;
MLMediaSource *_mediaSource;
MLMediaType _mediaType;
NSSet *_identifiersOfNonUserCreatedGroups;
}
/**
The media source identifier used in the media sources dictionary of an MLMediaLibrary.
*/
@property (nonatomic, strong) NSString *mediaSourceIdentifier;
/**
The media source of an MLMediaLibrary.
*/
@property (nonatomic, strong) MLMediaSource *mediaSource;
/**
The media type of the library.
*/
@property (nonatomic) MLMediaType mediaType;
/**
The set of group identifiers identifying non-user created media groups.
*/
@property (nonatomic, strong) NSSet *identifiersOfNonUserCreatedGroups;
/**
Returns the mediaSourceIdentifier of the receiver as the bundle identifier of the library's source app.
*/
- (NSString *)sourceAppBundleIdentifier;
/**
Designated initiliazer.
*/
- (instancetype)initWithMediaSourceIdentifier:(NSString *)mediaSourceIdentifier
AppleMediaLibraryMediaType:(MLMediaType)mediaType
identifiersOfNonUserCreatedGroups:(NSSet *)identifiersOfNonUserCreatedGroups;
/**
@return The string @"Album"
*/
- (IMBMLMediaGroupType *)typeForMediaGroup:(MLMediaGroup *)mediaGroup;
/**
@return Last object in media object list of the receiver.
*/
- (MLMediaObject *)keyMediaObjectForMediaGroup:(MLMediaGroup *)mediaGroup;
/**
*/
- (NSImage *)thumbnailForMediaObject:(MLMediaObject *)mediaObject;
/**
@discussion
Must add return value of super implementation if overriden.
*/
- (NSDictionary *)metadataForMediaObject:(MLMediaObject *)mediaObject;
/**
*/
- (NSString *)countFormatForGroup: (MLMediaGroup *)mediaGroup plural:(BOOL)plural;
@end