-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathinterface.h
More file actions
70 lines (49 loc) · 2.26 KB
/
interface.h
File metadata and controls
70 lines (49 loc) · 2.26 KB
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
typedef NS_ENUM(NSUInteger, BKSProcessAssertionReason)
{
kProcessAssertionReasonAudio = 1,
kProcessAssertionReasonLocation,
kProcessAssertionReasonExternalAccessory,
kProcessAssertionReasonFinishTask,
kProcessAssertionReasonBluetooth,
kProcessAssertionReasonNetworkAuthentication,
kProcessAssertionReasonBackgroundUI,
kProcessAssertionReasonInterAppAudioStreaming,
kProcessAssertionReasonViewServices
};
typedef NS_OPTIONS(NSUInteger, ProcessAssertionFlags)
{
ProcessAssertionFlagNone = 0,
ProcessAssertionFlagPreventSuspend = 1 << 0,
ProcessAssertionFlagPreventThrottleDownCPU = 1 << 1,
ProcessAssertionFlagAllowIdleSleep = 1 << 2,
ProcessAssertionFlagWantsForegroundResourcePriority = 1 << 3
};
typedef enum
{
NSNotificationSuspensionBehaviorDrop = 1,
NSNotificationSuspensionBehaviorCoalesce = 2,
NSNotificationSuspensionBehaviorHold = 3,
NSNotificationSuspensionBehaviorDeliverImmediately = 4
} NSNotificationSuspensionBehavior;
@interface SBApplication : NSObject
- (BOOL)suspendingUnsupported;
- (BOOL)isRunning;
@end
@interface SBApplicationController : NSObject
+ (instancetype)sharedInstance;
- (SBApplication *)applicationWithDisplayIdentifier:(NSString *)identifier;
@end
@interface SpringBoard : UIApplication
- (BOOL)launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
@end
@interface BKSProcessAssertion : NSObject
@property(readonly, assign, nonatomic) BOOL valid;
- (id)initWithBundleIdentifier:(NSString *)bundleIdentifier flags:(unsigned)flags reason:(unsigned)reason name:(NSString *)name withHandler:(id)handler;
- (void)invalidate;
@end
@interface NSDistributedNotificationCenter : NSNotificationCenter
+ (instancetype)defaultCenter;
- (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(NSString *)notificationSender suspensionBehavior:(NSNotificationSuspensionBehavior)suspendedDeliveryBehavior;
- (void)removeObserver:(id)notificationObserver name:(NSString *)notificationName object:(NSString *)notificationSender;
- (void)postNotificationName:(NSString *)notificationName object:(NSString *)notificationSender userInfo:(NSDictionary *)userInfo deliverImmediately:(BOOL)deliverImmediately;
@end