forked from SelfControlApp/selfcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCDaemon.h
More file actions
40 lines (29 loc) · 1.03 KB
/
SCDaemon.h
File metadata and controls
40 lines (29 loc) · 1.03 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
//
// SCDaemon.h
// SelfControl
//
// Created by Charlie Stigler on 5/28/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// SCDaemon is the top-level class that runs the SelfControl
// daemon process (selfcontrold). It runs from DaemonMain.
@interface SCDaemon : NSObject
// Singleton instance of SCDaemon
+ (instancetype)sharedDaemon;
// Starts the daemon tasks, including accepting XPC connections
// and running block checkup jobs if necessary
- (void)start;
// Starts checking up on the block on a regular basis
// to make sure it hasn't expired, been tampered with, etc
// (and will remove it or fix it if so)
- (void)startCheckupTimer;
// Stops the checkup timer (this should only be called if there's
// no block running, because we should have checkups going for all blocks)
- (void)stopCheckupTimer;
// Lets the daemon know that there was recent activity
// so we can reset our inactivity timer.
// The daemon will die if goes for too long without activity.
- (void)resetInactivityTimer;
@end
NS_ASSUME_NONNULL_END