]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | #ifndef __KEXTD_H_ | |
3 | #define __KEXTD_H_ | |
4 | ||
5 | #include <IOKit/kext/KEXTManager.h> | |
6 | ||
7 | #if defined(__cplusplus) | |
8 | extern "C" { | |
9 | #endif | |
10 | ||
11 | typedef struct __KEXTD * KEXTDRef; | |
12 | ||
13 | typedef enum { | |
14 | kKEXTBootlevelNormal = 0x00, | |
15 | kKEXTBootlevelExempt = 0x01, | |
16 | kKEXTBootlevelRecovery = 0x02, | |
17 | kKEXTBootlevelSingleUser = 0x04, | |
18 | kKEXTBootlevelFlexible = 0x08, | |
19 | kKEXTBootlevelRequired = 0x10, | |
20 | } KEXTBootlevel; | |
21 | ||
22 | typedef enum { | |
23 | kKEXTEventReset, | |
24 | kKEXTEventModuleRequest, | |
25 | kKEXTEventPersonalityRequest, | |
26 | kKEXTEventBundleAuthenticationFailed, | |
27 | } KEXTEvent; | |
28 | ||
29 | typedef struct { | |
30 | CFIndex version; | |
31 | void * (*HelperInitialize)(KEXTDRef kextd); | |
32 | void (*HelperFinalize)(void * context); | |
33 | void (*DaemonDidFinishLaunching)(void * context); | |
34 | void (*DaemonWillTerminate)(void * context); | |
35 | Boolean (*BundleAdd)(KEXTBundleRef bundle, void * context); | |
36 | Boolean (*BundleRemove)(KEXTBundleRef bundle, void * context); | |
37 | void (*EventOccurred)(KEXTEvent event, CFTypeRef data, void * context); | |
38 | Boolean (*ModuleWillLoad)(KEXTModuleRef module, void * context); | |
39 | void (*ModuleWasLoaded)(KEXTModuleRef module, void * context); | |
40 | KEXTReturn (*ModuleLoadError)(KEXTModuleRef module, KEXTReturn error, void * context); | |
41 | } KEXTDHelperCallbacks; | |
42 | ||
43 | ||
44 | KEXTDRef KEXTDCreate(CFArrayRef scanPaths, KEXTReturn * error); | |
45 | void KEXTDFree(KEXTDRef kextd); | |
46 | ||
47 | void KEXTDHangup(KEXTDRef kextd); | |
48 | void KEXTDReset(KEXTDRef kextd); | |
49 | #if TIMERSOURCE | |
50 | KEXTReturn KEXTDStartMain(KEXTDRef kextd, Boolean beVerbose, Boolean safeBoot, Boolean debug, Boolean poll, CFIndex period, KEXTBootlevel bootlevel, Boolean cdMKextBoot); | |
51 | #else | |
52 | KEXTReturn KEXTDStartMain(KEXTDRef kextd, Boolean beVerbose, Boolean safeBoot, Boolean debug, KEXTBootlevel bootlevel, Boolean cdMKextBoot); | |
53 | #endif | |
54 | void KEXTDScanPaths(KEXTDRef kextd, Boolean cdMKextBoot); | |
55 | void KEXTDAddScanPath(KEXTDRef kextd, CFURLRef path); | |
56 | void KEXTDRegisterHelperCallbacks(KEXTDRef kextd, KEXTDHelperCallbacks * callbacks); | |
57 | KEXTReturn KEXTDKernelRequest(KEXTDRef kextd, CFStringRef moduleName); | |
58 | KEXTReturn KEXTDLoadModule(KEXTDRef kextd, CFStringRef moduleName); | |
59 | ||
60 | #if defined(__cplusplus) | |
61 | } /* "C" */ | |
62 | #endif | |
63 | ||
64 | #endif __KEXTD_H_ | |
65 |