]> git.saurik.com Git - apple/system_cmds.git/blame - kextd.tproj/KEXTD.h
system_cmds-196.tar.gz
[apple/system_cmds.git] / kextd.tproj / KEXTD.h
CommitLineData
1815bff5
A
1
2#ifndef __KEXTD_H_
3#define __KEXTD_H_
4
5#include <IOKit/kext/KEXTManager.h>
6
7#if defined(__cplusplus)
8extern "C" {
9#endif
10
11typedef struct __KEXTD * KEXTDRef;
12
13typedef enum {
14 kKEXTBootlevelNormal = 0x00,
15 kKEXTBootlevelExempt = 0x01,
16 kKEXTBootlevelRecovery = 0x02,
17 kKEXTBootlevelSingleUser = 0x04,
18 kKEXTBootlevelFlexible = 0x08,
19 kKEXTBootlevelRequired = 0x10,
20} KEXTBootlevel;
21
22typedef enum {
23 kKEXTEventReset,
24 kKEXTEventModuleRequest,
25 kKEXTEventPersonalityRequest,
26 kKEXTEventBundleAuthenticationFailed,
27} KEXTEvent;
28
29typedef 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
44KEXTDRef KEXTDCreate(CFArrayRef scanPaths, KEXTReturn * error);
45void KEXTDFree(KEXTDRef kextd);
46
47void KEXTDHangup(KEXTDRef kextd);
48void KEXTDReset(KEXTDRef kextd);
49#if TIMERSOURCE
1c51fdde 50KEXTReturn KEXTDStartMain(KEXTDRef kextd, Boolean beVerbose, Boolean safeBoot, Boolean debug, Boolean poll, CFIndex period, KEXTBootlevel bootlevel, Boolean cdMKextBoot);
1815bff5 51#else
1c51fdde 52KEXTReturn KEXTDStartMain(KEXTDRef kextd, Boolean beVerbose, Boolean safeBoot, Boolean debug, KEXTBootlevel bootlevel, Boolean cdMKextBoot);
1815bff5 53#endif
1c51fdde 54void KEXTDScanPaths(KEXTDRef kextd, Boolean cdMKextBoot);
1815bff5
A
55void KEXTDAddScanPath(KEXTDRef kextd, CFURLRef path);
56void KEXTDRegisterHelperCallbacks(KEXTDRef kextd, KEXTDHelperCallbacks * callbacks);
57KEXTReturn KEXTDKernelRequest(KEXTDRef kextd, CFStringRef moduleName);
58KEXTReturn KEXTDLoadModule(KEXTDRef kextd, CFStringRef moduleName);
59
60#if defined(__cplusplus)
61} /* "C" */
62#endif
63
64#endif __KEXTD_H_
65