-
Notifications
You must be signed in to change notification settings - Fork 12
/
iOSapi.IOKit.pas
57 lines (41 loc) · 965 Bytes
/
iOSapi.IOKit.pas
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
{ *********************************************************** }
{ }
{ CodeGear Delphi Runtime Library }
{ }
{ Copyright(c) 2012-2014 Embarcadero Technologies, Inc. }
{ }
{ *********************************************************** }
//
// Delphi-Objective-C Bridge
// Interfaces for Cocoa framework IOKit
//
unit iOSapi.IOKit;
interface
uses
Macapi.CoreFoundation,
Macapi.CoreServices,
Macapi.Dispatch,
Macapi.Foundation,
Macapi.Mach,
Macapi.ObjCRuntime,
Macapi.ObjectiveC,
Macapi.QuartzCore,
iOSapi.CocoaTypes,
iOSapi.Foundation;
// ===== External functions =====
const
libIOKit = '/System/Library/Frameworks/IOKit.framework/IOKit';
implementation
{$IF defined(IOS) and NOT defined(CPUARM)}
uses
Posix.Dlfcn;
var
IOKitModule: THandle;
{$ENDIF IOS}
{$IF defined(IOS) and NOT defined(CPUARM)}
initialization
IOKitModule := dlopen(MarshaledAString(libIOKit), RTLD_LAZY);
finalization
dlclose(IOKitModule);
{$ENDIF IOS}
end.