-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppMonitor.h
More file actions
30 lines (24 loc) · 781 Bytes
/
Copy pathAppMonitor.h
File metadata and controls
30 lines (24 loc) · 781 Bytes
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
//
// AppMonitor.h
// Meow Soundboard
//
// Created by Randall Salvo on 10/20/2018.
// Copyright © 2018 Candoran LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef bool (^condition_block_t)(void);
typedef void (^action_block_t)(void);
@interface AppMonitor : NSObject
@property (readonly) NSInteger cumulativeAppRunTime;
@property (readonly) NSInteger currentInstanceRunTime;
@property (readonly) NSInteger runCount;
@property (readonly) NSInteger cumulativeAppTaps;
+ (AppMonitor*)sharedInstance;
- (void)addAction:(action_block_t)action forCondition:(condition_block_t)condition;
- (void)doConditionalActions;
- (void)logTap;
- (id)objectForKey:(NSString *)key;
- (void)setObject:(id)value forKey:(NSString *)key;
- (void)start;
- (void)stop;
@end