forked from opa334/AltList
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ATLApplicationSection.h
36 lines (29 loc) · 1.36 KB
/
ATLApplicationSection.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
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, ApplicationSectionType) {
SECTION_TYPE_ALL,
SECTION_TYPE_SYSTEM,
SECTION_TYPE_USER,
SECTION_TYPE_HIDDEN,
SECTION_TYPE_VISIBLE,
SECTION_TYPE_CUSTOM
};
#define kApplicationSectionTypeAll @"All"
#define kApplicationSectionTypeSystem @"System"
#define kApplicationSectionTypeUser @"User"
#define kApplicationSectionTypeHidden @"Hidden"
#define kApplicationSectionTypeVisible @"Visible"
#define kApplicationSectionTypeCustom @"Custom"
@interface ATLApplicationSection : NSObject
@property (nonatomic) ApplicationSectionType sectionType;
@property (nonatomic) NSPredicate* customPredicate;
@property (nonatomic) NSString* sectionName;
@property (nonatomic) NSArray* applicationsInSection;
+ (ApplicationSectionType)sectionTypeFromString:(NSString*)typeString;
+ (NSString*)stringFromSectionType:(ApplicationSectionType)sectionType;
+ (__kindof ATLApplicationSection*)applicationSectionWithDictionary:(NSDictionary*)sectionDictionary;
- (instancetype)_initWithDictionary:(NSDictionary*)sectionDictionary;
- (instancetype)initNonCustomSectionWithType:(ApplicationSectionType)sectionType;
- (instancetype)initCustomSectionWithPredicate:(NSPredicate*)predicate sectionName:(NSString*)sectionName;
- (NSArray<NSSortDescriptor*>*)sortDescriptorsForApplications;
- (void)populateFromAllApplications:(NSArray*)allApplications;
@end