-
Notifications
You must be signed in to change notification settings - Fork 0
/
QSLMUMonitor.h
71 lines (49 loc) · 1.47 KB
/
QSLMUMonitor.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
//
// QSLMUMonitor.h
// Nocturne
//
// Created by Nicholas Jitkoff on 5/14/07.
// Copyright 2007 Blacktree. All rights reserved.
//
// lmucommon.h
#import <Cocoa/Cocoa.h>
#include <mach/mach.h>
#include <IOKit/IOKitLib.h>
#include <CoreFoundation/CoreFoundation.h>
#ifndef LMUCOMMON_H
#define LMUCOMMON_H
enum {
kGetSensorReadingID = 0, // getSensorReading(int *, int *)
kGetLEDBrightnessID = 1, // getLEDBrightness(int, int *)
kSetLEDBrightnessID = 2, // setLEDBrightness(int, int, int *)
kSetLEDFadeID = 3, // setLEDFade(int, int, int, int *)
// other firmware-related functions
// verifyFirmwareID = 4, // verifyFirmware(int *)
// getFirmwareVersionID = 5, // getFirmwareVersion(int *)
// other flashing-related functions
// ...
};
#endif
@interface QSLMUMonitor : NSObject {
NSTimer *checkTimer;
io_connect_t dataPort;
SInt32 left;
SInt32 right;
id delegate;
SInt32 lowerBound;
SInt32 upperBound;
BOOL sendNotifications;
}
- (id)delegate;
- (void)setDelegate:(id)value;
- (SInt32)lowerBound;
- (void)setLowerBound:(SInt32)value;
- (SInt32)upperBound;
- (void)setUpperBound:(SInt32)value;
- (void) setMonitorSensors:(BOOL)flag;
+ (BOOL)hasSensors;
@end
@interface NSObject (QSLMUMonitorDelegate)
- (void)monitor:(QSLMUMonitor *)monitor passedLowerBound:(SInt32)lowerBound withValue:(SInt32)value;
- (void)monitor:(QSLMUMonitor *)monitor passedUpperBound:(SInt32)upperBound withValue:(SInt32)value;
@end