mirror of
https://github.com/odin-lang/Odin.git
synced 2026-11-03 01:04:40 -05:00
878 lines
44 KiB
Odin
878 lines
44 KiB
Odin
// Generated by vendor/darwin/_gen/import_darwinkit.py from darwinkit. DO NOT EDIT.
|
|
#+build darwin
|
|
package darwin_IOKit
|
|
|
|
import "base:intrinsics"
|
|
import cffi "core:c"
|
|
import CF "core:sys/darwin/CoreFoundation"
|
|
import darwin "core:sys/darwin"
|
|
|
|
id :: ^intrinsics.objc_object
|
|
SEL :: ^intrinsics.objc_selector
|
|
Class :: ^intrinsics.objc_class
|
|
IMP :: rawptr
|
|
Protocol :: distinct id
|
|
instancetype :: intrinsics.objc_instancetype
|
|
|
|
@(export)
|
|
foreign import lib {
|
|
"system:IOKit.framework",
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kBSDKey :: "IOBSD" // (BSD subsystem resource)
|
|
kBSDNameKey :: "BSD Name" // (an OSString)
|
|
kBSDNamesKey :: "BSD Names" // (an OSDictionary of OSString's, for links)
|
|
kBSDMajorKey :: "BSD Major" // (an OSNumber)
|
|
kBSDMinorKey :: "BSD Minor" // (an OSNumber)
|
|
kBSDUnitKey :: "BSD Unit" // (an OSNumber)
|
|
|
|
kPropertyDeviceCharacteristicsKey :: "Device Characteristics"
|
|
kPropertyVendorNameKey :: "Vendor Name"
|
|
kPropertyProductNameKey :: "Product Name"
|
|
kPropertyProductRevisionLevelKey :: "Product Revision Level"
|
|
kPropertyProductSerialNumberKey :: "Serial Number"
|
|
kPropertySupportedCDFeaturesKey :: "CD Features"
|
|
kPropertySupportedDVDFeaturesKey :: "DVD Features"
|
|
kPropertySupportedBDFeaturesKey :: "BD Features"
|
|
kPropertyRigidDiskGeometryKey :: "Rigid Disk Geometry"
|
|
kPropertySectorCountPerTrackKey :: "Sector Count per Track"
|
|
kPropertyHeadCountKey :: "Head Count"
|
|
kPropertyCylinderCountKey :: "Cylinder Count"
|
|
kPropertyBytesPerPhysicalSectorKey :: "Bytes per Physical Sector"
|
|
kPropertyPhysicalBlockSizeKey :: "Physical Block Size"
|
|
kPropertyLogicalBlockSizeKey :: "Logical Block Size"
|
|
kPropertyTargetDiskModeKey :: "Target Disk Mode"
|
|
kPropertyInvalidStartupDiskKey :: "Invalid Startup Disk"
|
|
kPropertyMediumTypeKey :: "Medium Type"
|
|
kPropertyMediumTypeRotationalKey :: "Rotational"
|
|
kPropertyMediumTypeSolidStateKey :: "Solid State"
|
|
kPropertyMediumRotationRateKey :: "Rotation Rate"
|
|
|
|
|
|
/*!
|
|
* @defined kIOBlockStorageDeviceClass
|
|
* @abstract
|
|
* The name of the IOBlockStorageDevice class.
|
|
*/
|
|
|
|
kBlockStorageDeviceClass :: "IOBlockStorageDevice"
|
|
|
|
/*!
|
|
* @defined kIOBlockStorageDeviceWriteCacheStateKey
|
|
* @abstract
|
|
* The name of the property used to get or set the write cache state of the
|
|
* block storage device.
|
|
*/
|
|
kBlockStorageDeviceWriteCacheStateKey :: "WriteCacheState"
|
|
|
|
|
|
|
|
kMediaClass :: "IOMedia"
|
|
|
|
/*!
|
|
* @defined kIOMediaContentKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaContentKey property has an OSString
|
|
* value and contains a description of the media's
|
|
* contents. The description is the same as the hint at the time of the
|
|
* object's creation, but it is possible that the description has been overridden
|
|
* by a client (which has probed the media and identified the content correctly)
|
|
* of the media object. It is more accurate than the hint for this reason. The
|
|
* string is formed in the likeness of Apple's "Apple_HFS" strings or in the
|
|
* likeness of a UUID.
|
|
*/
|
|
|
|
kMediaContentKey :: "Content"
|
|
|
|
/*!
|
|
* @defined kIOMediaContentHintKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaContentHintKey property has an OSString
|
|
* value and contains a hint of the media's contents.
|
|
* The hint is set at the time of the object's creation, should the creator have
|
|
* a clue as to what it may contain. The hint string does not change for the
|
|
* lifetime of the object and is formed in the likeness of Apple's "Apple_HFS"
|
|
* strings or in the likeness of a UUID.
|
|
*/
|
|
|
|
kMediaContentHintKey :: "Content Hint"
|
|
|
|
/*!
|
|
* @defined kIOMediaEjectableKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaEjectableKey property has an OSBoolean
|
|
* value and describes whether the media is ejectable
|
|
* from the drive mechanism under software control. Implies IOMediaRemovable
|
|
* is also true.
|
|
*/
|
|
|
|
kMediaEjectableKey :: "Ejectable"
|
|
|
|
/*!
|
|
* @defined kIOMediaLeafKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is,
|
|
* it is the deepest media object in this branch of the I/O Registry.
|
|
*/
|
|
|
|
kMediaLeafKey :: "Leaf"
|
|
|
|
/*!
|
|
* @defined kIOMediaOpenKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaOpenKey property has an OSBoolean value and describes whether
|
|
* a client presently has an open on this media.
|
|
*/
|
|
|
|
kMediaOpenKey :: "Open"
|
|
|
|
/*!
|
|
* @defined kIOMediaPreferredBlockSizeKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaPreferredBlockSizeKey property has an
|
|
* OSNumber value and describes the media's natural
|
|
* block size in bytes. This information is useful to clients that want to
|
|
* optimize access to the media.
|
|
*/
|
|
|
|
kMediaPreferredBlockSizeKey :: "Preferred Block Size"
|
|
|
|
/*!
|
|
* @defined kIOMediaRemovableKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaRemovableKey property has an OSBoolean
|
|
* value and describes whether the media is removable
|
|
* from the drive mechanism.
|
|
*/
|
|
|
|
kMediaRemovableKey :: "Removable"
|
|
|
|
/*!
|
|
* @defined kIOMediaSizeKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in
|
|
* bytes.
|
|
*/
|
|
|
|
kMediaSizeKey :: "Size"
|
|
|
|
/*!
|
|
* @defined kIOMediaUUIDKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaUUIDKey property has an OSString value and contains a persistent
|
|
* Universal Unique Identifier for the media if such an identifier is available.
|
|
*/
|
|
|
|
kMediaUUIDKey :: "UUID"
|
|
|
|
/*!
|
|
* @defined kIOMediaWholeKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaWholeKey property has an OSBoolean
|
|
* value and describes whether the media is whole, that is,
|
|
* it represents the whole disk (the physical disk, or a virtual replica
|
|
* thereof).
|
|
*/
|
|
|
|
kMediaWholeKey :: "Whole"
|
|
|
|
/*!
|
|
* @defined kIOMediaWritableKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaWritableKey property has an OSBoolean
|
|
* value and describes whether the media is writable.
|
|
*/
|
|
|
|
kMediaWritableKey :: "Writable"
|
|
|
|
/*!
|
|
* @defined kIOMediaContentMaskKey
|
|
* @abstract
|
|
* A property of IOMedia clients.
|
|
* @discussion
|
|
* The kIOMediaContentMaskKey property has an OSString
|
|
* value and must exist in all IOMedia clients that
|
|
* drive new content (that is, produce new media objects). When the client
|
|
* matches against the provider media, the value of the client's
|
|
* kIOMediaContentMaskKey property is used to replace the provider's
|
|
* kIOMediaContentKey property.
|
|
*/
|
|
|
|
kMediaContentMaskKey :: "Content Mask"
|
|
|
|
/*!
|
|
* @defined kIOMediaIconKey
|
|
* @abstract
|
|
* A property of any object in the media stack.
|
|
* @discussion
|
|
* kIOMediaIconKey is a property of any object in the media stack that wishes
|
|
* to override the default icon shown for the media objects in the stack. It
|
|
* is usually defined in a provider object below the media object. It has an
|
|
* OSDictionary value, with properties identical to the kIOIconKey definition,
|
|
* that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey.
|
|
*/
|
|
|
|
kMediaIconKey :: "IOMediaIcon"
|
|
|
|
/*!
|
|
* @defined kIOMediaInvalidStartupDiskKey
|
|
* @abstract
|
|
* A property of IOMedia objects.
|
|
* @discussion
|
|
* The kIOMediaInvalidStartupDiskKey property has an OSBoolean
|
|
* value and describes whether the media cannot be used as a startup disk
|
|
*/
|
|
|
|
kMediaInvalidStartupDiskKey :: "Invalid Startup Disk"
|
|
|
|
/*!
|
|
* @enum IOMediaAttributeMask
|
|
* @discussion
|
|
* The IOMediaAttributeMask bit mask describes various attributes of
|
|
* the media object, such as its ejectability and its removability.
|
|
* @constant kIOMediaAttributeEjectableMask
|
|
* Indicates whether the media is ejectable from the drive mechanism
|
|
* under software control. Implies kIOMediaAttributeRemovableMask.
|
|
* @constant kIOMediaAttributeRemovableMask
|
|
* Indicates whether the media is removable from the drive mechanism.
|
|
*/
|
|
|
|
IOMediaAttributeMaskFlag :: enum u32 {
|
|
EjectableMask = 0,
|
|
RemovableMask = 1,
|
|
}
|
|
IOMediaAttributeMask :: bit_set[IOMediaAttributeMaskFlag; u32]
|
|
IOMediaAttributeMask_ReservedMask :: transmute(IOMediaAttributeMask)u32(0xfffffffc)
|
|
|
|
|
|
|
|
|
|
foreign lib {
|
|
@(link_name="kIOMainPortDefault")
|
|
kMainPortDefault: darwin.mach_port_t
|
|
|
|
@(link_name="kIOMasterPortDefault")
|
|
kMasterPortDefault: darwin.mach_port_t
|
|
|
|
@(link_name="IOMainPort")
|
|
MainPort :: proc(bootstrapPort: darwin.mach_port_t, mainPort: ^darwin.mach_port_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOMasterPort")
|
|
MasterPort :: proc(bootstrapPort: darwin.mach_port_t, mainPort: ^darwin.mach_port_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IONotificationPortCreate")
|
|
NotificationPortCreate :: proc(mainPort: darwin.mach_port_t) -> NotificationPortRef ---
|
|
|
|
@(link_name="IONotificationPortDestroy")
|
|
NotificationPortDestroy :: proc(notify: NotificationPortRef) ---
|
|
|
|
@(link_name="IONotificationPortGetRunLoopSource")
|
|
NotificationPortGetRunLoopSource :: proc(notify: NotificationPortRef) -> CF.RunLoopSourceRef ---
|
|
|
|
@(link_name="IONotificationPortGetMachPort")
|
|
NotificationPortGetMachPort :: proc(notify: NotificationPortRef) -> darwin.mach_port_t ---
|
|
|
|
@(link_name="IONotificationPortSetImportanceReceiver")
|
|
NotificationPortSetImportanceReceiver :: proc(notify: NotificationPortRef) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IONotificationPortSetDispatchQueue")
|
|
NotificationPortSetDispatchQueue :: proc(notify: NotificationPortRef, queue: CF.dispatch_queue_t) ---
|
|
|
|
@(link_name="IODispatchCalloutFromMessage")
|
|
DispatchCalloutFromMessage :: proc(unused: rawptr, msg: ^darwin.mach_msg_header_t, reference: rawptr) ---
|
|
|
|
@(link_name="IOCreateReceivePort")
|
|
CreateReceivePort :: proc(msgType: cffi.uint32_t, recvPort: ^darwin.mach_port_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOObjectRelease")
|
|
ObjectRelease :: proc(object: object_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOObjectRetain")
|
|
ObjectRetain :: proc(object: object_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOObjectGetClass")
|
|
ObjectGetClass :: proc(object: object_t, className: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOObjectCopyClass")
|
|
ObjectCopyClass :: proc(object: object_t) -> CF.StringRef ---
|
|
|
|
@(link_name="IOObjectCopySuperclassForClass")
|
|
ObjectCopySuperclassForClass :: proc(classname: CF.StringRef) -> CF.StringRef ---
|
|
|
|
@(link_name="IOObjectCopyBundleIdentifierForClass")
|
|
ObjectCopyBundleIdentifierForClass :: proc(classname: CF.StringRef) -> CF.StringRef ---
|
|
|
|
@(link_name="IOObjectConformsTo")
|
|
ObjectConformsTo :: proc(object: object_t, className: ^name_t) -> CF.boolean_t ---
|
|
|
|
@(link_name="IOObjectIsEqualTo")
|
|
ObjectIsEqualTo :: proc(object: object_t, anObject: object_t) -> CF.boolean_t ---
|
|
|
|
@(link_name="IOObjectGetKernelRetainCount")
|
|
ObjectGetKernelRetainCount :: proc(object: object_t) -> cffi.uint32_t ---
|
|
|
|
@(link_name="IOObjectGetUserRetainCount")
|
|
ObjectGetUserRetainCount :: proc(object: object_t) -> cffi.uint32_t ---
|
|
|
|
@(link_name="IOObjectGetRetainCount")
|
|
ObjectGetRetainCount :: proc(object: object_t) -> cffi.uint32_t ---
|
|
|
|
@(link_name="IOIteratorNext")
|
|
IteratorNext :: proc(iterator: iterator_t) -> object_t ---
|
|
|
|
@(link_name="IOIteratorReset")
|
|
IteratorReset :: proc(iterator: iterator_t) ---
|
|
|
|
@(link_name="IOIteratorIsValid")
|
|
IteratorIsValid :: proc(iterator: iterator_t) -> CF.boolean_t ---
|
|
|
|
@(link_name="IOServiceGetMatchingService")
|
|
ServiceGetMatchingService :: proc(mainPort: darwin.mach_port_t, matching: CF.DictionaryRef) -> service_t ---
|
|
|
|
@(link_name="IOServiceGetMatchingServices")
|
|
ServiceGetMatchingServices :: proc(mainPort: darwin.mach_port_t, matching: CF.DictionaryRef, existing: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceAddNotification")
|
|
ServiceAddNotification :: proc(mainPort: darwin.mach_port_t, notificationType: ^name_t, matching: CF.DictionaryRef, wakePort: darwin.mach_port_t, reference: cffi.uintptr_t, notification: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceAddMatchingNotification")
|
|
ServiceAddMatchingNotification :: proc(notifyPort: NotificationPortRef, notificationType: ^name_t, matching: CF.DictionaryRef, callback: ServiceMatchingCallback, refCon: rawptr, notification: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceAddInterestNotification")
|
|
ServiceAddInterestNotification :: proc(notifyPort: NotificationPortRef, service: service_t, interestType: ^name_t, callback: ServiceInterestCallback, refCon: rawptr, notification: ^object_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceMatchPropertyTable")
|
|
ServiceMatchPropertyTable :: proc(service: service_t, matching: CF.DictionaryRef, matches: ^CF.boolean_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceGetBusyState")
|
|
ServiceGetBusyState :: proc(service: service_t, busyState: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceWaitQuiet")
|
|
ServiceWaitQuiet :: proc(service: service_t, waitTime: ^darwin.mach_timespec_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOKitGetBusyState")
|
|
KitGetBusyState :: proc(mainPort: darwin.mach_port_t, busyState: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOKitWaitQuietWithOptions")
|
|
KitWaitQuietWithOptions :: proc(mainPort: darwin.mach_port_t, waitTime: ^darwin.mach_timespec_t, options: OptionBits) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOKitWaitQuiet")
|
|
KitWaitQuiet :: proc(mainPort: darwin.mach_port_t, waitTime: ^darwin.mach_timespec_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceOpen")
|
|
ServiceOpen :: proc(service: service_t, owningTask: darwin.task_t, type: cffi.uint32_t, connect: ^connect_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceRequestProbe")
|
|
ServiceRequestProbe :: proc(service: service_t, options: cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceAuthorize")
|
|
ServiceAuthorize :: proc(service: service_t, options: cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOServiceOpenAsFileDescriptor")
|
|
ServiceOpenAsFileDescriptor :: proc(service: service_t, oflag: cffi.int) -> cffi.int ---
|
|
|
|
@(link_name="IOServiceClose")
|
|
ServiceClose :: proc(connect: connect_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectAddRef")
|
|
ConnectAddRef :: proc(connect: connect_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectRelease")
|
|
ConnectRelease :: proc(connect: connect_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectGetService")
|
|
ConnectGetService :: proc(connect: connect_t, service: ^service_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectSetNotificationPort")
|
|
ConnectSetNotificationPort :: proc(connect: connect_t, type: cffi.uint32_t, port: darwin.mach_port_t, reference: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectMapMemory")
|
|
ConnectMapMemory :: proc(connect: connect_t, memoryType: cffi.uint32_t, intoTask: darwin.task_t, atAddress: ^darwin.mach_vm_address_t, ofSize: ^darwin.mach_vm_size_t, options: OptionBits) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectMapMemory64")
|
|
ConnectMapMemory64 :: proc(connect: connect_t, memoryType: cffi.uint32_t, intoTask: darwin.task_t, atAddress: ^darwin.mach_vm_address_t, ofSize: ^darwin.mach_vm_size_t, options: OptionBits) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectUnmapMemory")
|
|
ConnectUnmapMemory :: proc(connect: connect_t, memoryType: cffi.uint32_t, fromTask: darwin.task_t, atAddress: darwin.mach_vm_address_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectUnmapMemory64")
|
|
ConnectUnmapMemory64 :: proc(connect: connect_t, memoryType: cffi.uint32_t, fromTask: darwin.task_t, atAddress: darwin.mach_vm_address_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectSetCFProperties")
|
|
ConnectSetCFProperties :: proc(connect: connect_t, properties: CF.TypeRef) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectSetCFProperty")
|
|
ConnectSetCFProperty :: proc(connect: connect_t, propertyName: CF.StringRef, property: CF.TypeRef) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallMethod")
|
|
ConnectCallMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, input: ^cffi.uint64_t, inputCnt: cffi.uint32_t, inputStruct: rawptr, inputStructCnt: cffi.size_t, output: ^cffi.uint64_t, outputCnt: ^cffi.uint32_t, outputStruct: rawptr, outputStructCnt: ^cffi.size_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallAsyncMethod")
|
|
ConnectCallAsyncMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, wake_port: darwin.mach_port_t, reference: ^cffi.uint64_t, referenceCnt: cffi.uint32_t, input: ^cffi.uint64_t, inputCnt: cffi.uint32_t, inputStruct: rawptr, inputStructCnt: cffi.size_t, output: ^cffi.uint64_t, outputCnt: ^cffi.uint32_t, outputStruct: rawptr, outputStructCnt: ^cffi.size_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallStructMethod")
|
|
ConnectCallStructMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, inputStruct: rawptr, inputStructCnt: cffi.size_t, outputStruct: rawptr, outputStructCnt: ^cffi.size_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallAsyncStructMethod")
|
|
ConnectCallAsyncStructMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, wake_port: darwin.mach_port_t, reference: ^cffi.uint64_t, referenceCnt: cffi.uint32_t, inputStruct: rawptr, inputStructCnt: cffi.size_t, outputStruct: rawptr, outputStructCnt: ^cffi.size_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallScalarMethod")
|
|
ConnectCallScalarMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, input: ^cffi.uint64_t, inputCnt: cffi.uint32_t, output: ^cffi.uint64_t, outputCnt: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectCallAsyncScalarMethod")
|
|
ConnectCallAsyncScalarMethod :: proc(connection: darwin.mach_port_t, selector: cffi.uint32_t, wake_port: darwin.mach_port_t, reference: ^cffi.uint64_t, referenceCnt: cffi.uint32_t, input: ^cffi.uint64_t, inputCnt: cffi.uint32_t, output: ^cffi.uint64_t, outputCnt: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap0")
|
|
ConnectTrap0 :: proc(connect: connect_t, index: cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap1")
|
|
ConnectTrap1 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap2")
|
|
ConnectTrap2 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t, p2: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap3")
|
|
ConnectTrap3 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t, p2: cffi.uintptr_t, p3: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap4")
|
|
ConnectTrap4 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t, p2: cffi.uintptr_t, p3: cffi.uintptr_t, p4: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap5")
|
|
ConnectTrap5 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t, p2: cffi.uintptr_t, p3: cffi.uintptr_t, p4: cffi.uintptr_t, p5: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectTrap6")
|
|
ConnectTrap6 :: proc(connect: connect_t, index: cffi.uint32_t, p1: cffi.uintptr_t, p2: cffi.uintptr_t, p3: cffi.uintptr_t, p4: cffi.uintptr_t, p5: cffi.uintptr_t, p6: cffi.uintptr_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOConnectAddClient")
|
|
ConnectAddClient :: proc(connect: connect_t, client: connect_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryGetRootEntry")
|
|
RegistryGetRootEntry :: proc(mainPort: darwin.mach_port_t) -> registry_entry_t ---
|
|
|
|
@(link_name="IORegistryEntryFromPath")
|
|
RegistryEntryFromPath :: proc(mainPort: darwin.mach_port_t, path: ^string_t) -> registry_entry_t ---
|
|
|
|
@(link_name="IORegistryEntryCopyFromPath")
|
|
RegistryEntryCopyFromPath :: proc(mainPort: darwin.mach_port_t, path: CF.StringRef) -> registry_entry_t ---
|
|
|
|
@(link_name="IORegistryCreateIterator")
|
|
RegistryCreateIterator :: proc(mainPort: darwin.mach_port_t, plane: ^name_t, options: OptionBits, iterator: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryCreateIterator")
|
|
RegistryEntryCreateIterator :: proc(entry: registry_entry_t, plane: ^name_t, options: OptionBits, iterator: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryIteratorEnterEntry")
|
|
RegistryIteratorEnterEntry :: proc(iterator: iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryIteratorExitEntry")
|
|
RegistryIteratorExitEntry :: proc(iterator: iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetName")
|
|
RegistryEntryGetName :: proc(entry: registry_entry_t, name: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetNameInPlane")
|
|
RegistryEntryGetNameInPlane :: proc(entry: registry_entry_t, plane: ^name_t, name: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetLocationInPlane")
|
|
RegistryEntryGetLocationInPlane :: proc(entry: registry_entry_t, plane: ^name_t, location: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetPath")
|
|
RegistryEntryGetPath :: proc(entry: registry_entry_t, plane: ^name_t, path: ^string_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryCopyPath")
|
|
RegistryEntryCopyPath :: proc(entry: registry_entry_t, plane: ^name_t) -> CF.StringRef ---
|
|
|
|
@(link_name="IORegistryEntryGetRegistryEntryID")
|
|
RegistryEntryGetRegistryEntryID :: proc(entry: registry_entry_t, entryID: ^cffi.uint64_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryCreateCFProperties")
|
|
RegistryEntryCreateCFProperties :: proc(entry: registry_entry_t, properties: ^CF.MutableDictionaryRef, allocator: CF.AllocatorRef, options: OptionBits) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryCreateCFProperty")
|
|
RegistryEntryCreateCFProperty :: proc(entry: registry_entry_t, key: CF.StringRef, allocator: CF.AllocatorRef, options: OptionBits) -> CF.TypeRef ---
|
|
|
|
@(link_name="IORegistryEntrySearchCFProperty")
|
|
RegistryEntrySearchCFProperty :: proc(entry: registry_entry_t, plane: ^name_t, key: CF.StringRef, allocator: CF.AllocatorRef, options: OptionBits) -> CF.TypeRef ---
|
|
|
|
@(link_name="IORegistryEntryGetProperty")
|
|
RegistryEntryGetProperty :: proc(entry: registry_entry_t, propertyName: ^name_t, buffer: ^struct_inband_t, size: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntrySetCFProperties")
|
|
RegistryEntrySetCFProperties :: proc(entry: registry_entry_t, properties: CF.TypeRef) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntrySetCFProperty")
|
|
RegistryEntrySetCFProperty :: proc(entry: registry_entry_t, propertyName: CF.StringRef, property: CF.TypeRef) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetChildIterator")
|
|
RegistryEntryGetChildIterator :: proc(entry: registry_entry_t, plane: ^name_t, iterator: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetChildEntry")
|
|
RegistryEntryGetChildEntry :: proc(entry: registry_entry_t, plane: ^name_t, child: ^registry_entry_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetParentIterator")
|
|
RegistryEntryGetParentIterator :: proc(entry: registry_entry_t, plane: ^name_t, iterator: ^iterator_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryGetParentEntry")
|
|
RegistryEntryGetParentEntry :: proc(entry: registry_entry_t, plane: ^name_t, parent: ^registry_entry_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IORegistryEntryInPlane")
|
|
RegistryEntryInPlane :: proc(entry: registry_entry_t, plane: ^name_t) -> CF.boolean_t ---
|
|
|
|
@(link_name="IOServiceMatching")
|
|
ServiceMatching :: proc(name: cstring) -> CF.MutableDictionaryRef ---
|
|
|
|
@(link_name="IOServiceNameMatching")
|
|
ServiceNameMatching :: proc(name: cstring) -> CF.MutableDictionaryRef ---
|
|
|
|
@(link_name="IOBSDNameMatching")
|
|
BSDNameMatching :: proc(mainPort: darwin.mach_port_t, options: cffi.uint32_t, bsdName: cstring) -> CF.MutableDictionaryRef ---
|
|
|
|
@(link_name="IOOpenFirmwarePathMatching")
|
|
OpenFirmwarePathMatching :: proc(mainPort: darwin.mach_port_t, options: cffi.uint32_t, path: cstring) -> CF.MutableDictionaryRef ---
|
|
|
|
@(link_name="IORegistryEntryIDMatching")
|
|
RegistryEntryIDMatching :: proc(entryID: cffi.uint64_t) -> CF.MutableDictionaryRef ---
|
|
|
|
@(link_name="IOServiceOFPathToBSDName")
|
|
ServiceOFPathToBSDName :: proc(mainPort: darwin.mach_port_t, openFirmwarePath: ^name_t, bsdName: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOCatalogueSendData")
|
|
CatalogueSendData :: proc(mainPort: darwin.mach_port_t, flag: cffi.uint32_t, buffer: cstring, size: cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOCatalogueTerminate")
|
|
CatalogueTerminate :: proc(mainPort: darwin.mach_port_t, flag: cffi.uint32_t, description: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOCatalogueGetData")
|
|
CatalogueGetData :: proc(mainPort: darwin.mach_port_t, flag: cffi.uint32_t, buffer: ^cstring, size: ^cffi.uint32_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOCatalogueModuleLoaded")
|
|
CatalogueModuleLoaded :: proc(mainPort: darwin.mach_port_t, name: ^name_t) -> darwin.kern_return_t ---
|
|
|
|
@(link_name="IOCatalogueReset")
|
|
CatalogueReset :: proc(mainPort: darwin.mach_port_t, flag: cffi.uint32_t) -> darwin.kern_return_t ---
|
|
}
|
|
|
|
|
|
|
|
kKitBuildVersionKey :: "IOKitBuildVersion"
|
|
kKitDiagnosticsKey :: "IOKitDiagnostics"
|
|
kRegistryPlanesKey :: "IORegistryPlanes"
|
|
kCatalogueKey :: "IOCatalogue"
|
|
kServicePlane :: "IOService"
|
|
kPowerPlane :: "IOPower"
|
|
kDeviceTreePlane :: "IODeviceTree"
|
|
kAudioPlane :: "IOAudio"
|
|
kFireWirePlane :: "IOFireWire"
|
|
kUSBPlane :: "IOUSB"
|
|
kRegistryEntryIDKey :: "IORegistryEntryID"
|
|
kRegistryEntryPropertyKeysKey :: "IORegistryEntryPropertyKeys"
|
|
kRegistryEntryAllowableSetPropertiesKey :: "IORegistryEntryAllowableSetProperties"
|
|
kRegistryEntryDefaultLockingSetPropertiesKey :: "IORegistryEntryDefaultLockingSetProperties"
|
|
kServiceClass :: "IOService"
|
|
kResourcesClass :: "IOResources"
|
|
kClassKey :: "IOClass"
|
|
kProbeScoreKey :: "IOProbeScore"
|
|
kKitDebugKey :: "IOKitDebug"
|
|
kUserClassKey :: "IOUserClass"
|
|
kUserClassesKey :: "IOUserClasses"
|
|
kSupportedPropertiesKey :: "IOSupportedProperties"
|
|
kUserServicePropertiesKey :: "IOUserServiceProperties"
|
|
kProviderClassKey :: "IOProviderClass"
|
|
kNameMatchKey :: "IONameMatch"
|
|
kPropertyMatchKey :: "IOPropertyMatch"
|
|
kPropertyExistsMatchKey :: "IOPropertyExistsMatch"
|
|
kPathMatchKey :: "IOPathMatch"
|
|
kLocationMatchKey :: "IOLocationMatch"
|
|
kParentMatchKey :: "IOParentMatch"
|
|
kResourceMatchKey :: "IOResourceMatch"
|
|
kResourceMatchedKey :: "IOResourceMatched"
|
|
kMatchedServiceCountKey :: "IOMatchedServiceCountMatch"
|
|
kNameMatchedKey :: "IONameMatched"
|
|
kMatchCategoryKey :: "IOMatchCategory"
|
|
kDefaultMatchCategoryKey :: "IODefaultMatchCategory"
|
|
kMatchedPersonalityKey :: "IOMatchedPersonality"
|
|
kRematchPersonalityKey :: "IORematchPersonality"
|
|
kRematchCountKey :: "IORematchCount"
|
|
kDEXTMatchCountKey :: "IODEXTMatchCount"
|
|
kUserClientEntitlementsKey :: "IOUserClientEntitlements"
|
|
kServiceDEXTEntitlementsKey :: "IOServiceDEXTEntitlements"
|
|
kDriverKitEntitlementKey :: "com.apple.developer.driverkit"
|
|
kDriverKitUserClientEntitlementsKey :: "com.apple.developer.driverkit.userclient-access"
|
|
kDriverKitRequiredEntitlementsKey :: "com.apple.private.driverkit.driver-access"
|
|
kDriverKitTestDriverEntitlementKey :: "com.apple.private.driverkit.test-driver"
|
|
kDriverKitUserClientEntitlementAllowAnyKey :: "com.apple.developer.driverkit.allow-any-userclient-access"
|
|
kDriverKitUserClientEntitlementAdministratorKey :: "com.apple.developer.driverkit.administrator"
|
|
kDriverKitUserClientEntitlementCommunicatesWithDriversKey :: "com.apple.developer.driverkit.communicates-with-drivers"
|
|
kDriverKitUserClientEntitlementAllowThirdPartyUserClientsKey :: "com.apple.developer.driverkit.allow-third-party-userclients"
|
|
kDriverKitUSBTransportEntitlementKey :: "com.apple.developer.driverkit.transport.usb"
|
|
kDriverKitHIDTransportEntitlementKey :: "com.apple.developer.driverkit.transport.hid"
|
|
kDriverKitHIDFamilyDeviceEntitlementKey :: "com.apple.developer.driverkit.family.hid.device"
|
|
kDriverKitHIDFamilyEventServiceEntitlementKey :: "com.apple.developer.driverkit.family.hid.eventservice"
|
|
kDriverKitTransportBuiltinEntitlementKey :: "com.apple.developer.driverkit.builtin"
|
|
kNVRAMReadAccessKey :: "com.apple.private.iokit.nvram-read-access"
|
|
kNVRAMWriteAccessKey :: "com.apple.private.iokit.nvram-write-access"
|
|
kResourcesSetPropertyKey :: "com.apple.private.iokit.ioresources.setproperty"
|
|
kNVRAMSystemAllowKey :: "com.apple.private.iokit.system-nvram-allow"
|
|
kMatchDeferKey :: "IOMatchDefer"
|
|
kAllCPUInitializedKey :: "IOAllCPUInitialized"
|
|
kUserClientClassKey :: "IOUserClientClass"
|
|
kMapperIDKey :: "IOMapperID"
|
|
kUserClientCrossEndianKey :: "IOUserClientCrossEndian"
|
|
kUserClientCrossEndianCompatibleKey :: "IOUserClientCrossEndianCompatible"
|
|
kUserClientSharedInstanceKey :: "IOUserClientSharedInstance"
|
|
kUserClientDefaultLockingKey :: "IOUserClientDefaultLocking"
|
|
kUserClientDefaultLockingSetPropertiesKey :: "IOUserClientDefaultLockingSetProperties"
|
|
kUserClientDefaultLockingSingleThreadExternalMethodKey :: "IOUserClientDefaultLockingSingleThreadExternalMethod"
|
|
kUserClientCreatorKey :: "IOUserClientCreator"
|
|
kUserServerCDHashKey :: "IOUserServerCDHash"
|
|
kUserUserClientKey :: "IOUserUserClient"
|
|
kUserServerOneProcessKey :: "IOUserServerOneProcess"
|
|
kUserServerPreserveUserspaceRebootKey :: "IOUserServerPreserveUserspaceReboot"
|
|
kPublishNotification :: "IOServicePublish"
|
|
kFirstPublishNotification :: "IOServiceFirstPublish"
|
|
kMatchedNotification :: "IOServiceMatched"
|
|
kFirstMatchNotification :: "IOServiceFirstMatch"
|
|
kTerminatedNotification :: "IOServiceTerminate"
|
|
kWillTerminateNotification :: "IOServiceWillTerminate"
|
|
kGeneralInterest :: "IOGeneralInterest"
|
|
kBusyInterest :: "IOBusyInterest"
|
|
kAppPowerStateInterest :: "IOAppPowerStateInterest"
|
|
kPriorityPowerStateInterest :: "IOPriorityPowerStateInterest"
|
|
kPlatformDeviceMessageKey :: "IOPlatformDeviceMessage"
|
|
kCFPlugInTypesKey :: "IOCFPlugInTypes"
|
|
kCompatibilityMatchKey :: "IOCompatibilityMatch"
|
|
kCompatibilityPropertiesKey :: "IOCompatibilityProperties"
|
|
kPathKey :: "IOPath"
|
|
kCommandPoolSizeKey :: "IOCommandPoolSize"
|
|
kMaximumPriorityCountKey :: "IOMaximumPriorityCount"
|
|
kMaximumBlockCountReadKey :: "IOMaximumBlockCountRead"
|
|
kMaximumBlockCountWriteKey :: "IOMaximumBlockCountWrite"
|
|
kMaximumByteCountReadKey :: "IOMaximumByteCountRead"
|
|
kMaximumByteCountWriteKey :: "IOMaximumByteCountWrite"
|
|
kMaximumSegmentCountReadKey :: "IOMaximumSegmentCountRead"
|
|
kMaximumSegmentCountWriteKey :: "IOMaximumSegmentCountWrite"
|
|
kMaximumSegmentByteCountReadKey :: "IOMaximumSegmentByteCountRead"
|
|
kMaximumSegmentByteCountWriteKey :: "IOMaximumSegmentByteCountWrite"
|
|
kMinimumSegmentAlignmentByteCountKey :: "IOMinimumSegmentAlignmentByteCount"
|
|
kMaximumSegmentAddressableBitCountKey :: "IOMaximumSegmentAddressableBitCount"
|
|
kMinimumSaturationByteCountKey :: "IOMinimumSaturationByteCount"
|
|
kMaximumSwapWriteKey :: "IOMaximumSwapWrite"
|
|
kIconKey :: "IOIcon"
|
|
kBundleResourceFileKey :: "IOBundleResourceFile"
|
|
kBusBadgeKey :: "IOBusBadge"
|
|
kDeviceIconKey :: "IODeviceIcon"
|
|
kPlatformSerialNumberKey :: "IOPlatformSerialNumber"
|
|
kPlatformUUIDKey :: "IOPlatformUUID"
|
|
kNVRAMBootArgsKey :: "boot-args"
|
|
kNVRAMDeletePropertyKey :: "IONVRAM-DELETE-PROPERTY"
|
|
kNVRAMSyncNowPropertyKey :: "IONVRAM-SYNCNOW-PROPERTY"
|
|
kNVRAMActivateCSRConfigPropertyKey :: "IONVRAM-ARMCSR-PROPERTY"
|
|
kDTNVRAMPanicInfoKey :: "aapl,panic-info"
|
|
kNVRAMDeletePropertyKeyWRet :: "IONVRAM-DELETEWRET-PROPERTY"
|
|
kBootDeviceKey :: "IOBootDevice"
|
|
kBootDevicePathKey :: "IOBootDevicePath"
|
|
kBootDeviceSizeKey :: "IOBootDeviceSize"
|
|
kStateNotificationItemCreateKey :: "com.apple.iokit.statenotification.create"
|
|
kStateNotificationItemSetKey :: "com.apple.iokit.statenotification.set"
|
|
kStateNotificationItemCopyKey :: "com.apple.iokit.statenotification.copy"
|
|
kStateNotificationNameKey :: "com.apple.iokit.statenotification.name"
|
|
kStateNotificationEntitlementSetKey :: "com.apple.iokit.statenotification.entitlement-set"
|
|
kStateNotificationEntitlementGetKey :: "com.apple.iokit.statenotification.entitlement-get"
|
|
kSystemStateClamshellKey :: "com.apple.iokit.pm.clamshell"
|
|
kSystemStateSleepDescriptionKey :: "com.apple.iokit.pm.sleepdescription"
|
|
kSystemStateSleepDescriptionReasonKey :: "com.apple.iokit.pm.sleepreason"
|
|
kSystemStateSleepDescriptionHibernateStateKey :: "com.apple.iokit.pm.hibernatestate"
|
|
kSystemStateWakeDescriptionKey :: "com.apple.iokit.pm.wakedescription"
|
|
kSystemStateWakeDescriptionWakeReasonKey :: "com.apple.iokit.pm.wakereason"
|
|
kSystemStateWakeDescriptionContinuousTimeOffsetKey :: "com.apple.iokit.pm.wakedescription.continuous-time-offset"
|
|
kSystemStateHaltDescriptionKey :: "com.apple.iokit.pm.haltdescription"
|
|
kSystemStateHaltDescriptionHaltStateKey :: "com.apple.iokit.pm.haltstate"
|
|
kSystemStatePowerSourceDescriptionKey :: "com.apple.iokit.pm.powersourcedescription"
|
|
kSystemStatePowerSourceDescriptionACAttachedKey :: "com.apple.iokit.pm.acattached"
|
|
kDefaultMemoryType :: 0
|
|
kDefaultCache :: 0
|
|
kInhibitCache :: 1
|
|
kWriteThruCache :: 2
|
|
kCopybackCache :: 3
|
|
kWriteCombineCache :: 4
|
|
kCopybackInnerCache :: 5
|
|
kPostedWrite :: 6
|
|
kRealTimeCache :: 7
|
|
kPostedReordered :: 8
|
|
kPostedCombinedReordered :: 9
|
|
kMapAnywhere :: 1
|
|
kMapCacheMask :: 3840
|
|
kMapCacheShift :: 8
|
|
kMapDefaultCache :: 0
|
|
kMapInhibitCache :: 256
|
|
kMapWriteThruCache :: 512
|
|
kMapCopybackCache :: 768
|
|
kMapWriteCombineCache :: 1024
|
|
kMapCopybackInnerCache :: 1280
|
|
kMapPostedWrite :: 1536
|
|
kMapRealTimeCache :: 1792
|
|
kMapPostedReordered :: 2048
|
|
kMapPostedCombinedReordered :: 2304
|
|
kMapUserOptionsMask :: 4095
|
|
kMapReadOnly :: 4096
|
|
kMapStatic :: 16777216
|
|
kMapReference :: 33554432
|
|
kMapUnique :: 67108864
|
|
kMapPrefault :: 268435456
|
|
kMapOverwrite :: 536870912
|
|
kMapGuardedMask :: 3221225472
|
|
kMapGuardedSmall :: 1073741824
|
|
kMapGuardedLarge :: 2147483648
|
|
kConnectMethodVarOutputSize :: -3
|
|
kMaxBusStall40usec :: 40000
|
|
kMaxBusStall30usec :: 30000
|
|
kMaxBusStall25usec :: 25000
|
|
kMaxBusStall20usec :: 20000
|
|
kMaxBusStall10usec :: 10000
|
|
kMaxBusStall5usec :: 5000
|
|
kMaxBusStallNone :: 0
|
|
kSystemStateSleepDescriptionHibernateStateInactive :: 0
|
|
kSystemStateSleepDescriptionHibernateStateHibernating :: 1
|
|
kSystemStateSleepDescriptionHibernateStateWakingFromHibernate :: 2
|
|
kServicePublishNotificationType :: 100
|
|
kServiceMatchedNotificationType :: 101
|
|
kServiceTerminatedNotificationType :: 102
|
|
kAsyncCompletionNotificationType :: 150
|
|
kServiceMessageNotificationType :: 160
|
|
kKitNoticationTypeMask :: 4095
|
|
kKitNoticationTypeSizeAdjShift :: 30
|
|
kKitNoticationMsgSizeMask :: 3
|
|
kAsyncReservedIndex :: 0
|
|
kAsyncReservedCount :: 1
|
|
kAsyncCalloutFuncIndex :: 1
|
|
kAsyncCalloutRefconIndex :: 2
|
|
kAsyncCalloutCount :: 3
|
|
kMatchingCalloutFuncIndex :: 1
|
|
kMatchingCalloutRefconIndex :: 2
|
|
kMatchingCalloutCount :: 3
|
|
kInterestCalloutFuncIndex :: 1
|
|
kInterestCalloutRefconIndex :: 2
|
|
kInterestCalloutServiceIndex :: 3
|
|
kInterestCalloutCount :: 4
|
|
kServiceInteractionAllowed :: 1
|
|
kRegistryIterateRecursively :: 1
|
|
kRegistryIterateParents :: 2
|
|
stat_info_t :: ^stat_info
|
|
main_t :: darwin.mach_port_t
|
|
Return :: darwin.kern_return_t
|
|
OptionBits :: CF.UInt32
|
|
Fixed :: CF.SInt32
|
|
Version :: CF.UInt32
|
|
ItemCount :: CF.UInt32
|
|
CacheMode :: distinct CF.UInt32
|
|
ByteCount32 :: CF.UInt32
|
|
ByteCount64 :: CF.UInt64
|
|
PhysicalAddress32 :: CF.UInt32
|
|
PhysicalAddress64 :: CF.UInt64
|
|
PhysicalLength32 :: CF.UInt32
|
|
PhysicalLength64 :: CF.UInt64
|
|
VirtualAddress :: darwin.mach_vm_address_t
|
|
ByteCount :: ByteCount64
|
|
LogicalAddress :: VirtualAddress
|
|
PhysicalAddress :: PhysicalAddress64
|
|
PhysicalLength :: PhysicalLength64
|
|
AddressRange :: VirtualRange
|
|
Alignment :: cffi.uint
|
|
object_t :: darwin.mach_port_t
|
|
buf_ptr_t :: cstring
|
|
name_t :: [128]cffi.char
|
|
string_t :: [512]cffi.char
|
|
string_inband_t :: [4096]cffi.char
|
|
struct_inband_t :: [4096]cffi.char
|
|
user_scalar_t :: cffi.uint64_t
|
|
user_reference_t :: cffi.uint64_t
|
|
scalar_inband_t :: [16]user_scalar_t
|
|
async_ref_t :: [8]user_reference_t
|
|
scalar_inband64_t :: [16]user_scalar_t
|
|
async_ref64_t :: [8]user_reference_t
|
|
connect_t :: object_t
|
|
enumerator_t :: object_t
|
|
ident_t :: object_t
|
|
iterator_t :: object_t
|
|
registry_entry_t :: object_t
|
|
service_t :: object_t
|
|
DeviceNumber :: cffi.uint
|
|
NotificationPortRef :: ^NotificationPort
|
|
ServiceMatchingCallback :: proc "c" ( refcon: rawptr, iterator: iterator_t )
|
|
ServiceInterestCallback :: proc "c" ( refcon: rawptr, service: service_t, messageType: cffi.uint32_t, messageArgument: rawptr )
|
|
AsyncCallback0 :: proc "c" ( refcon: rawptr, result: Return )
|
|
AsyncCallback1 :: proc "c" ( refcon: rawptr, result: Return, arg0: rawptr )
|
|
AsyncCallback2 :: proc "c" ( refcon: rawptr, result: Return, arg0: rawptr, arg1: rawptr )
|
|
AsyncCallback :: proc "c" ( refcon: rawptr, result: Return, args: ^rawptr, numArgs: cffi.uint32_t )
|
|
|
|
stat_entry :: struct #align (8) {
|
|
count: cffi.uint64_t,
|
|
size: cffi.uint64_t,
|
|
}
|
|
|
|
stat_info :: struct #align (8) {
|
|
disk_reads: stat_entry,
|
|
io_priority: [4]stat_entry,
|
|
paging: stat_entry,
|
|
metadata: stat_entry,
|
|
total_io: stat_entry,
|
|
}
|
|
|
|
PhysicalRange :: struct #align (8) {
|
|
address: PhysicalAddress,
|
|
length: ByteCount,
|
|
}
|
|
|
|
VirtualRange :: struct #align (8) {
|
|
address: VirtualAddress,
|
|
length: ByteCount,
|
|
}
|
|
|
|
NamedValue :: struct #align (8) {
|
|
value: cffi.int,
|
|
name: cstring,
|
|
}
|
|
|
|
ServiceInterestContent64 :: struct #align (4) #max_field_align(4) {
|
|
messageType: darwin.natural_t,
|
|
messageArgument: [1]user_reference_t,
|
|
}
|
|
|
|
ServiceInterestContent :: struct #align (4) #max_field_align(4) {
|
|
messageType: darwin.natural_t,
|
|
messageArgument: [1]rawptr,
|
|
}
|
|
|
|
AsyncCompletionContent :: struct #align (4) #max_field_align(4) {
|
|
result: Return,
|
|
// args: [^]rawptr,
|
|
}
|
|
|
|
NotificationPort :: struct {}
|