iousbhost

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package iousbhost provides purego-based Go bindings for the macOS IOUSBHost framework.

Apple documentation: https://developer.apple.com/documentation/iousbhost

Index

Constants

View Source
const (
	IOUSBHostCICapabilitiesMessageControlPortCount                  = 983040
	IOUSBHostCICapabilitiesMessageControlPortCountPhase             = 16
	IOUSBHostCICapabilitiesMessageData0CommandTimeoutThreshold      = 3
	IOUSBHostCICapabilitiesMessageData0CommandTimeoutThresholdPhase = 0
	IOUSBHostCICapabilitiesMessageData0ConnectionLatency            = 240
	IOUSBHostCICapabilitiesMessageData0ConnectionLatencyPhase       = 4
)
View Source
const (
	IOUSBHostCICommandMessageControlStatus             = 3840
	IOUSBHostCICommandMessageControlStatusPhase        = 8
	IOUSBHostCICommandMessageData0DeviceAddress        = 255
	IOUSBHostCICommandMessageData0DeviceAddressPhase   = 0
	IOUSBHostCICommandMessageData0EndpointAddress      = 65280
	IOUSBHostCICommandMessageData0EndpointAddressPhase = 8
	IOUSBHostCICommandMessageData0RootPort             = 15
	IOUSBHostCICommandMessageData0RootPortPhase        = 0
	IOUSBHostCICommandMessageData0StreamID             = 4294901760
	IOUSBHostCICommandMessageData0StreamIDPhase        = 16
)
View Source
const (
	IOUSBHostCIDeviceCreateCommandData0RootPort      = 15
	IOUSBHostCIDeviceCreateCommandData0RootPortPhase = 0
	IOUSBHostCIDeviceCreateCommandData0Route         = 16777200
	IOUSBHostCIDeviceCreateCommandData0RoutePhase    = 4
)
View Source
const (
	IOUSBHostCIDeviceCreateCommandData1DeviceAddress      = 255
	IOUSBHostCIDeviceCreateCommandData1DeviceAddressPhase = 0
)
View Source
const (
	IOUSBHostCIDeviceUpdateCommandData1DescriptorAddress      = 18446744073709551615
	IOUSBHostCIDeviceUpdateCommandData1DescriptorAddressPhase = 0
)
View Source
const (
	IOUSBHostCIDoorbellDeviceAddress        = 255
	IOUSBHostCIDoorbellDeviceAddressPhase   = 0
	IOUSBHostCIDoorbellEndpointAddress      = 65280
	IOUSBHostCIDoorbellEndpointAddressPhase = 8
	IOUSBHostCIDoorbellStreamID             = 4294901760
	IOUSBHostCIDoorbellStreamIDPhase        = 16
)
View Source
const (
	IOUSBHostCIEndpointCreateCommandData1Descriptor      = 18446744073709551615
	IOUSBHostCIEndpointCreateCommandData1DescriptorPhase = 0
)
View Source
const (
	IOUSBHostCIEndpointSetNextTransferCommandData1Address      = 18446744073709551615
	IOUSBHostCIEndpointSetNextTransferCommandData1AddressPhase = 0
)
View Source
const (
	IOUSBHostCIEndpointUpdateCommandData1Descriptor      = 18446744073709551615
	IOUSBHostCIEndpointUpdateCommandData1DescriptorPhase = 0
)
View Source
const (
	IOUSBHostCIIsochronousTransferControlASAP             = 16777216
	IOUSBHostCIIsochronousTransferControlFrameNumber      = 16711680
	IOUSBHostCIIsochronousTransferControlFrameNumberPhase = 16
)
View Source
const (
	IOUSBHostCIIsochronousTransferData0Length      = 268435455
	IOUSBHostCIIsochronousTransferData0LengthPhase = 0
)
View Source
const (
	IOUSBHostCIIsochronousTransferData1Buffer      = 18446744073709551615
	IOUSBHostCIIsochronousTransferData1BufferPhase = 0
)
View Source
const (
	IOUSBHostCILinkData1TransferStructureAddress      = 18446744073709551615
	IOUSBHostCILinkData1TransferStructureAddressPhase = 0
)
View Source
const (
	IOUSBHostCIMessageControlNoResponse  = 16384
	IOUSBHostCIMessageControlStatus      = 3840
	IOUSBHostCIMessageControlStatusPhase = 8
	IOUSBHostCIMessageControlType        = 63
	IOUSBHostCIMessageControlTypePhase   = 0
	IOUSBHostCIMessageControlValid       = 32768
)
View Source
const (
	IOUSBHostCINormalTransferData0Length      = 268435455
	IOUSBHostCINormalTransferData0LengthPhase = 0
)
View Source
const (
	IOUSBHostCINormalTransferData1Buffer      = 18446744073709551615
	IOUSBHostCINormalTransferData1BufferPhase = 0
)
View Source
const (
	IOUSBHostCIPortCapabilitiesMessageControlConnectorType      = 4278190080
	IOUSBHostCIPortCapabilitiesMessageControlConnectorTypePhase = 24
	IOUSBHostCIPortCapabilitiesMessageControlInternalConnector  = 8388608
	IOUSBHostCIPortCapabilitiesMessageControlPortNumber         = 983040
	IOUSBHostCIPortCapabilitiesMessageControlPortNumberPhase    = 16
	IOUSBHostCIPortCapabilitiesMessageData0MaxPower             = 255
	IOUSBHostCIPortCapabilitiesMessageData0MaxPowerPhase        = 0
)
View Source
const (
	IOUSBHostCIPortEventMessageData0PortNumber      = 15
	IOUSBHostCIPortEventMessageData0PortNumberPhase = 0
)
View Source
const (
	IOUSBHostCIPortStatusCommandData1ChangeMask        = 1441792
	IOUSBHostCIPortStatusCommandData1ConnectChange     = 262144
	IOUSBHostCIPortStatusCommandData1Connected         = 4
	IOUSBHostCIPortStatusCommandData1LinkState         = 240
	IOUSBHostCIPortStatusCommandData1LinkStateChange   = 1048576
	IOUSBHostCIPortStatusCommandData1LinkStatePhase    = 4
	IOUSBHostCIPortStatusCommandData1Overcurrent       = 2
	IOUSBHostCIPortStatusCommandData1OvercurrentChange = 131072
	IOUSBHostCIPortStatusCommandData1Powered           = 1
	IOUSBHostCIPortStatusCommandData1Speed             = 1792
	IOUSBHostCIPortStatusCommandData1SpeedPhase        = 8
)
View Source
const (
	IOUSBHostCIPortStatusChangeMask        = 1441792
	IOUSBHostCIPortStatusConnectChange     = 262144
	IOUSBHostCIPortStatusConnected         = 4
	IOUSBHostCIPortStatusLinkState         = 240
	IOUSBHostCIPortStatusLinkStateChange   = 1048576
	IOUSBHostCIPortStatusLinkStatePhase    = 4
	IOUSBHostCIPortStatusOvercurrent       = 2
	IOUSBHostCIPortStatusOvercurrentChange = 131072
	IOUSBHostCIPortStatusPowered           = 1
	IOUSBHostCIPortStatusSpeed             = 1792
	IOUSBHostCIPortStatusSpeedPhase        = 8
)
View Source
const (
	IOUSBHostCISetupTransferData1bRequest           = 65280
	IOUSBHostCISetupTransferData1bRequestPhase      = 8
	IOUSBHostCISetupTransferData1bmRequestType      = 255
	IOUSBHostCISetupTransferData1bmRequestTypePhase = 0
	IOUSBHostCISetupTransferData1wIndex             = 281470681743360
	IOUSBHostCISetupTransferData1wIndexPhase        = 32
	IOUSBHostCISetupTransferData1wLength            = 18446462598732840960
	IOUSBHostCISetupTransferData1wLengthPhase       = 48
	IOUSBHostCISetupTransferData1wValue             = 4294901760
	IOUSBHostCISetupTransferData1wValuePhase        = 16
)
View Source
const (
	IOUSBHostCITransferCompletionMessageControlDeviceAddress        = 16711680
	IOUSBHostCITransferCompletionMessageControlDeviceAddressPhase   = 16
	IOUSBHostCITransferCompletionMessageControlEndpointAddress      = 4278190080
	IOUSBHostCITransferCompletionMessageControlEndpointAddressPhase = 24
	IOUSBHostCITransferCompletionMessageControlStatus               = 3840
	IOUSBHostCITransferCompletionMessageControlStatusPhase          = 8
)
View Source
const (
	IOUSBHostCITransferCompletionMessageData0TransferLength      = 268435455
	IOUSBHostCITransferCompletionMessageData0TransferLengthPhase = 0
)
View Source
const (
	IOUSBHostCITransferCompletionMessageData1TransferStructure      = 18446744073709551615
	IOUSBHostCITransferCompletionMessageData1TransferStructurePhase = 0
)
View Source
const (
	IOUSBHostCIEndpointResetCommandData1ClearState = 1
)

Variables

This section is empty.

Functions

func IOUSBGetBillboardDescriptor

func IOUSBGetBillboardDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first BillboardCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first BillboardCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return BillboardCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetConfigurationMaxPowerMilliAmps

func IOUSBGetConfigurationMaxPowerMilliAmps(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32

@brief Extract the maximum bus current required by a configuration descriptor @discussion This method parses a configuration descriptor and returns the number of milliamps required to power the device @param usbDeviceSpeed The operational speed of the device @param descriptor The ConfigurationDescriptor to parse @return uint32_t milliamps required

func IOUSBGetContainerIDDescriptor

func IOUSBGetContainerIDDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first ContainerIDCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first ContainerIDCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return ContainerIDCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetEndpointAddress

func IOUSBGetEndpointAddress(descriptor unsafe.Pointer) uint8

@brief Extract the direction and number of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its address @param descriptor The descriptor to parse @return uint8_t representing direction and endpoint number

func IOUSBGetEndpointBurstSize

func IOUSBGetEndpointBurstSize(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer, sspCompanionDescriptor unsafe.Pointer) uint32

@brief Extract the burst size from endpoint descriptors @discussion This method parses endpoint descriptors to determine burst size, which includes mult and burst factors as applicable. SuperSpeed Plus isochronous endpoints will return the dwBytesPerInterval field from the SuperSpeedPlusIsochronousEndpointCompanionDescriptor parameter. @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @param companionDescriptor The SuperSpeedEndpointCompanionDescriptor to parse, or NULL @param sspCompanionDescriptor The SuperSpeedPlusIsochronousEndpointCompanionDescriptor to parse, or NULL @return uint32_t The burst size in bytes

func IOUSBGetEndpointDirection

func IOUSBGetEndpointDirection(descriptor unsafe.Pointer) uint8

@brief Extract the direction of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its transfer direction @param descriptor The descriptor to parse @return tEndpointDirection indicating the direction found. Control endpoints return tEndpointDirection.

func IOUSBGetEndpointIntervalEncodedMicroframes

func IOUSBGetEndpointIntervalEncodedMicroframes(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32

@brief Extract the interval of an endpoint descriptor @discussion This method parses an endpoint descriptor and returns the service interval as n in (2^(n-1)) microframes @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @return uint32_t Encoded endpoint interval

func IOUSBGetEndpointIntervalFrames

func IOUSBGetEndpointIntervalFrames(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32

@brief Extract the interval of an endpoint descriptor @discussion This method parses an endpoint descriptor and returns the service interval in frames @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @return uint32_t Endpoint interval in frames

func IOUSBGetEndpointIntervalMicroframes

func IOUSBGetEndpointIntervalMicroframes(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32

@brief Extract the interval of an endpoint descriptor @discussion This method parses an endpoint descriptor and returns the service interval in microframes @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @return uint32_t Endpoint interval in microframes

func IOUSBGetEndpointMaxPacketSize

func IOUSBGetEndpointMaxPacketSize(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint16

@brief Extract the max packet size from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its max packet size, which does not take into account mult or burst factors. @param usbDeviceSpeed The operational speed of the device @param descriptor The descriptor to parse @return uint16_t The max packet size in bytes

func IOUSBGetEndpointMaxStreams

func IOUSBGetEndpointMaxStreams(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer) uint32

@brief Extract the number of streams supported by an endpoint @discussion This method parses endpoint descriptors and returns the number of streams supported @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @param companionDescriptor The SuperSpeedEndpointCompanionDescriptor to parse @return uint32_t Number of streams

func IOUSBGetEndpointMaxStreamsEncoded

func IOUSBGetEndpointMaxStreamsEncoded(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer) uint32

@brief Extract the number of streams supported by an endpoint @discussion This method parses endpoint descriptors and returns the number of streams supported as n in (2^n) @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @param companionDescriptor The SuperSpeedEndpointCompanionDescriptor to parse @return uint32_t Encoded number of streams

func IOUSBGetEndpointMult

func IOUSBGetEndpointMult(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer, sspCompanionDescriptor unsafe.Pointer) uint8

@brief Extract the mult count from endpoint descriptors @discussion This method parses endpoint descriptors to determine mult @param usbDeviceSpeed The operational speed of the device @param descriptor The EndpointDescriptor to parse @param companionDescriptor The SuperSpeedEndpointCompanionDescriptor to parse, or NULL @param sspCompanionDescriptor The SuperSpeedPlusIsochronousEndpointCompanionDescriptor to parse, or NULL @return uint8_t The mult count

func IOUSBGetEndpointNumber

func IOUSBGetEndpointNumber(descriptor unsafe.Pointer) uint8

@brief Extract the number of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its number, excluding direction @param descriptor The descriptor to parse @return uint8_t representing endpoint number

func IOUSBGetEndpointSynchronizationType

func IOUSBGetEndpointSynchronizationType(descriptor unsafe.Pointer) uint8

@brief Extract the synchronization type of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its synchronization type. Only Isochronous endpoints have non-zero synchronization types @param descriptor The descriptor to parse @return tEndpointSynchronizationType indicating the type found.

func IOUSBGetEndpointType

func IOUSBGetEndpointType(descriptor unsafe.Pointer) uint8

@brief Extract the type of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its type @param descriptor The descriptor to parse @return tEndpointType indicating the type found.

func IOUSBGetEndpointUsageType

func IOUSBGetEndpointUsageType(descriptor unsafe.Pointer) uint8

@brief Extract the usage type of an endpoint from an endpoint descriptor @discussion This method parses an endpoint descriptor to determine its usage type. Only periodic endpoints have usage types @param descriptor The descriptor to parse @return tEndpointUsageType indicating the type found.

func IOUSBGetNextAssociatedDescriptor

func IOUSBGetNextAssociatedDescriptor(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Get the next descriptor in a configuration descriptor that belongs to another container descriptor @discussion This method uses getNextDescriptor, but will return NULL if another descriptor is found whose bDescriptorType field matches the value used for parentDescriptor's bDescriptorType. Using NULL for currentDescriptor will return the first descriptor after parentDescriptor. @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param parentDescriptor A descriptor pointer within the bounds of configurationDescriptor @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @return Descriptor pointer, or NULL if no descriptor can be returned

func IOUSBGetNextAssociatedDescriptorWithType

func IOUSBGetNextAssociatedDescriptorWithType(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer

@brief Find the next descriptor matching a given type within a configuration descriptor that belongs to another container descriptor @discussion This method uses getNextAssociatedDescriptor, and further validates that the returned descriptor's bDescriptorType field matches the type passed parameter. @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param parentDescriptor A descriptor pointer within the bounds of configurationDescriptor @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @param type tDescriptorType representing the descriptor type to find @return Descriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetNextCapabilityDescriptor

func IOUSBGetNextCapabilityDescriptor(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Get the next device capability descriptor in a BOS descriptor @discussion This method will advance currentDescriptor by its bLength, and validate that the new descriptor fits withing the bounds of bosDescriptor. Using NULL for currentDescriptor will return the first descriptor after the BOS descriptor. @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of bosDescriptor, or NULL @return DeviceCapabilityDescriptor pointer, or NULL if no descriptor can be returned

func IOUSBGetNextCapabilityDescriptorWithType

func IOUSBGetNextCapabilityDescriptorWithType(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer

@brief Find the next descriptor matching a given type within a BOS descriptor @discussion This method uses getNextCapabilityDescriptor, and further validates that the returned descriptor's bDevCapabilityType field matches the type parameter. @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of bosDescriptor, or NULL @param type tDeviceCapabilityType representing the descriptor type to find @return DeviceCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetNextDescriptor

func IOUSBGetNextDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Get the next descriptor in a configuration descriptor @discussion This method will advance currentDescriptor by its bLength, and validate that the new descriptor fits withing the bounds of configurationDescriptor. Using NULL for currentDescriptor will return the first descriptor after the configuration descriptor. @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @return Descriptor pointer, or NULL if no descriptor can be returned

func IOUSBGetNextDescriptorWithType

func IOUSBGetNextDescriptorWithType(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer

@brief Find the next descriptor matching a given type within a configuration descriptor @discussion This method uses getNextDescriptor, and further validates that the returned descriptor's bDescriptorType field matches the type parameter. @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @param type tDescriptorType representing the descriptor type to find @return Descriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetNextEndpointDescriptor

func IOUSBGetNextEndpointDescriptor(configurationDescriptor unsafe.Pointer, interfaceDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the next endpoint descriptor associated with an interface descriptor @discussion This method uses getNextAssociatedDescriptorWithType to fetch the next endpoint descriptor associated with a specific interface descriptor @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param interfaceDescriptor An interface descriptor within the bounds of configurationDescriptor @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @return EndpointDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetNextInterfaceAssociationDescriptor

func IOUSBGetNextInterfaceAssociationDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the next interface association descriptor in a configuration descriptor @discussion This method uses getNextDescriptorWithType to fetch the next interface association descriptor @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @return InterfaceAssociationDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetNextInterfaceDescriptor

func IOUSBGetNextInterfaceDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the next interface descriptor in a configuration descriptor @discussion This method uses getNextDescriptorWithType to fetch the next interface descriptor @param configurationDescriptor Configuration descriptor that contains the descriptors to iterate through @param currentDescriptor A descriptor pointer within the bounds of configurationDescriptor, or NULL @return InterfaceDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetPlatformCapabilityDescriptor

func IOUSBGetPlatformCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first PlatformCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first PlatformCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return PlatformCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetPlatformCapabilityDescriptorWithUUID

func IOUSBGetPlatformCapabilityDescriptorWithUUID(bosDescriptor unsafe.Pointer, uuid *uint8) unsafe.Pointer

@brief Find the first PlatformCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first PlatformCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @param uuid UUID associated with the platform capability @return PlatformCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetSuperSpeedDeviceCapabilityDescriptor

func IOUSBGetSuperSpeedDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first SuperSpeedUSBDeviceCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first SuperSpeedUSBDeviceCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return SuperSpeedUSBDeviceCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor

func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first SuperSpeedPlusUSBDeviceCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first SuperSpeedPlusUSBDeviceCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return SuperSpeedPlusUSBDeviceCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor

func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer

@brief Find the first USB20ExtensionCapabilityDescriptor in a BOS descriptor @discussion This method uses getNextCapabilityDescriptorWithType to fetch the first USB20ExtensionCapabilityDescriptor @param bosDescriptor BOS descriptor that contains the descriptors to iterate through @return USB20ExtensionCapabilityDescriptor pointer, or NULL if no matching descriptor can be found

func IOUSBHostCIControllerStateToString

func IOUSBHostCIControllerStateToString(controllerState IOUSBHostCIControllerState) string

func IOUSBHostCIDeviceSpeedToString

func IOUSBHostCIDeviceSpeedToString(speed IOUSBHostCIDeviceSpeed) string

func IOUSBHostCIDeviceStateToString

func IOUSBHostCIDeviceStateToString(deviceState IOUSBHostCIDeviceState) string

func IOUSBHostCIEndpointStateToString

func IOUSBHostCIEndpointStateToString(endpointState IOUSBHostCIEndpointState) string

func IOUSBHostCIExceptionTypeToString

func IOUSBHostCIExceptionTypeToString(exceptionType IOUSBHostCIExceptionType) string

func IOUSBHostCILinkStateEnabled

func IOUSBHostCILinkStateEnabled(linkState IOUSBHostCILinkState) bool

func IOUSBHostCILinkStateToString

func IOUSBHostCILinkStateToString(linkState IOUSBHostCILinkState) string

func IOUSBHostCIMessageStatusToIOReturn

func IOUSBHostCIMessageStatusToIOReturn(status IOUSBHostCIMessageStatus) int

func IOUSBHostCIMessageStatusToString

func IOUSBHostCIMessageStatusToString(status IOUSBHostCIMessageStatus) string

func IOUSBHostCIMessageTypeToString

func IOUSBHostCIMessageTypeToString(type_ IOUSBHostCIMessageType) string

func IOUSBHostCIPortStateToString

func IOUSBHostCIPortStateToString(portState IOUSBHostCIPortState) string

func IOUSBHostDefaultControlCompletionTimeout

func IOUSBHostDefaultControlCompletionTimeout() float64

func IOUSBHostDeviceCreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray

func IOUSBHostDeviceCreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray(vendorID *foundation.NSNumber, productID *foundation.NSNumber, bcdDevice *foundation.NSNumber, deviceClass *foundation.NSNumber, deviceSubclass *foundation.NSNumber, deviceProtocol *foundation.NSNumber, speed *foundation.NSNumber, productIDArray *foundation.NSArray[objc.ID]) unsafe.Pointer

Creates a matching dictionary to find a USB device.

func IOUSBHostDevicePropertyKeyContainerID

func IOUSBHostDevicePropertyKeyContainerID() *foundation.NSString

func IOUSBHostDevicePropertyKeyCurrentConfiguration

func IOUSBHostDevicePropertyKeyCurrentConfiguration() *foundation.NSString

func IOUSBHostDevicePropertyKeySerialNumberString

func IOUSBHostDevicePropertyKeySerialNumberString() *foundation.NSString

func IOUSBHostDevicePropertyKeyVendorString

func IOUSBHostDevicePropertyKeyVendorString() *foundation.NSString

func IOUSBHostDeviceRequestType

func IOUSBHostDeviceRequestType(direction unsafe.Pointer, type_ unsafe.Pointer, recipient unsafe.Pointer) uint8

@brief Helper method for creating the <code>bmRequestType</code> field of a device request. @param direction The direction of the request. @param type the type of device request. @param recipient the recipient of the device request. @return uint8_t bmRequestType

func IOUSBHostErrorDomain

func IOUSBHostErrorDomain() *foundation.NSString

@brief NSErrorDomain for IOUSBHostFamily. Error codes are IOKit IOReturn codes. @constant IOUSBHostErrorDomain domain for IOUSBHostFamily errors

func IOUSBHostInterfaceCreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray

func IOUSBHostInterfaceCreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray(vendorID *foundation.NSNumber, productID *foundation.NSNumber, bcdDevice *foundation.NSNumber, interfaceNumber *foundation.NSNumber, configurationValue *foundation.NSNumber, interfaceClass *foundation.NSNumber, interfaceSubclass *foundation.NSNumber, interfaceProtocol *foundation.NSNumber, speed *foundation.NSNumber, productIDArray *foundation.NSArray[objc.ID]) unsafe.Pointer

Creates a matching dictionary to find a USB interface.

func IOUSBHostInterfacePropertyKeyAlternateSetting

func IOUSBHostInterfacePropertyKeyAlternateSetting() *foundation.NSString

func IOUSBHostMatchingPropertyKeyConfigurationValue

func IOUSBHostMatchingPropertyKeyConfigurationValue() *foundation.NSString

func IOUSBHostMatchingPropertyKeyDeviceClass

func IOUSBHostMatchingPropertyKeyDeviceClass() *foundation.NSString

func IOUSBHostMatchingPropertyKeyDeviceProtocol

func IOUSBHostMatchingPropertyKeyDeviceProtocol() *foundation.NSString

func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber

func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber() *foundation.NSString

func IOUSBHostMatchingPropertyKeyDeviceSubClass

func IOUSBHostMatchingPropertyKeyDeviceSubClass() *foundation.NSString

func IOUSBHostMatchingPropertyKeyInterfaceClass

func IOUSBHostMatchingPropertyKeyInterfaceClass() *foundation.NSString

func IOUSBHostMatchingPropertyKeyInterfaceNumber

func IOUSBHostMatchingPropertyKeyInterfaceNumber() *foundation.NSString

func IOUSBHostMatchingPropertyKeyInterfaceProtocol

func IOUSBHostMatchingPropertyKeyInterfaceProtocol() *foundation.NSString

func IOUSBHostMatchingPropertyKeyInterfaceSubClass

func IOUSBHostMatchingPropertyKeyInterfaceSubClass() *foundation.NSString

func IOUSBHostMatchingPropertyKeyProductID

func IOUSBHostMatchingPropertyKeyProductID() *foundation.NSString

func IOUSBHostMatchingPropertyKeyProductIDArray

func IOUSBHostMatchingPropertyKeyProductIDArray() *foundation.NSString

func IOUSBHostMatchingPropertyKeyProductIDMask

func IOUSBHostMatchingPropertyKeyProductIDMask() *foundation.NSString

func IOUSBHostMatchingPropertyKeySpeed

func IOUSBHostMatchingPropertyKeySpeed() *foundation.NSString

func IOUSBHostMatchingPropertyKeyVendorID

func IOUSBHostMatchingPropertyKeyVendorID() *foundation.NSString

func IOUSBHostPropertyKeyLocationID

func IOUSBHostPropertyKeyLocationID() *foundation.NSString

func IOUSBHostVersionNumber

func IOUSBHostVersionNumber() float64

func IOUSBHostVersionString

func IOUSBHostVersionString() []unsafe.Pointer

func SymbolAvailable

func SymbolAvailable(symbol string) bool

SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type IOUSBHostAbortOption

type IOUSBHostAbortOption uint64

Options for aborting pending input/output requests.

const (
	// The option to abort input/output requests asynchronously.
	IOUSBHostAbortOptionAsynchronous IOUSBHostAbortOption = 0
	// The option to abort input/output requests synchronously.
	IOUSBHostAbortOptionSynchronous IOUSBHostAbortOption = 1
)

func (IOUSBHostAbortOption) String

func (e IOUSBHostAbortOption) String() string

type IOUSBHostCIControllerState

type IOUSBHostCIControllerState int64

@enum IOUSBHostCIControllerState @brief Host controller state managed by IOUSBHostCIControllerStateMachine @discussion IOUSBHostCIControllerStateOff is the initial state of a newly created IOUSBHostCIControllerStateMachine instance, and represents a completely quiesced controller. All root ports must be in the IOUSBHostCIPortStateOff state. IOUSBHostCIControllerStatePaused represents a controller that is idle. In this state the controller is not processing IO requests, but can detect port changes such as connect events or remote wakes. Root ports must not be in the IOUSBHostCIPortStateActive state. IOUSBHostCIControllerStateActive represents a controller that is fully functional and able to service IO requests. Root ports may be in the IOUSBHostCIPortStateActive state.

const (
	IOUSBHostCIControllerStateOff    IOUSBHostCIControllerState = 0
	IOUSBHostCIControllerStatePaused IOUSBHostCIControllerState = 1
	IOUSBHostCIControllerStateActive IOUSBHostCIControllerState = 2
)

func (IOUSBHostCIControllerState) String

type IOUSBHostCIControllerStateMachine

type IOUSBHostCIControllerStateMachine struct {
	foundation.NSObject
}

@class IOUSBHostCIControllerStateMachine @brief The object representing the state of a user-mode USB host controller @details This class assists with tracking internal state transitions of a user-mode USB host controller, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. IOUSBHostCIControllerStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostcicontrollerstatemachine

func IOUSBHostCIControllerStateMachineFromID

func IOUSBHostCIControllerStateMachineFromID(id objc.ID) *IOUSBHostCIControllerStateMachine

func (*IOUSBHostCIControllerStateMachine) ControllerInterface

func (*IOUSBHostCIControllerStateMachine) ControllerState

func (*IOUSBHostCIControllerStateMachine) EnqueueUpdatedFrameTimestampError

func (o *IOUSBHostCIControllerStateMachine) EnqueueUpdatedFrameTimestampError(frame uint64, timestamp uint64) (bool, error)

@brief Enqueue frame and timestamp messages for delivery to the kernel driver @discussion If the controller interface is in the IOUSBHostCIControllerStateActive state, messages with the type IOUSBHostCIMessageTypeFrameNumberUpdate and IOUSBHostCIMessageTypeFrameTimestampUpdate will be generated using the provided inputs, and enqueued for delivery to the kernel driver. The frame and timestamp information provided effectively measure the duration of the controller's 1ms frame in terms of system time. A 1% frame duration variation is permitted. A larger frame duration variation will result in a IOUSBHostCIExceptionTypeFrameUpdateError. @param frame uint64_t containing the number of 1ms frames that have elapsed since the controller began counting frames @param timestamp uint64_t containing the mach_absolute_time() correlated to the beginning of the frameNumber @return BOOL YES if the messages were enqueued for delivery to the kernel. BOOL NO if the messages were not enqueued for delivery to the kernel.

func (*IOUSBHostCIControllerStateMachine) InitWithInterfaceError

@brief Initializes an IOUSBHostCIControllerStateMachine object @discussion The IOUSBHostCIControllerStateMachine defaults to the IOUSBHostCIControllerStateOff state. @param interface IOUSBHostControllerInterface which will be used to send command responses. @return IOUSBHostCIControllerStateMachine instance, to be released by the caller.

func (*IOUSBHostCIControllerStateMachine) InspectCommandError

func (o *IOUSBHostCIControllerStateMachine) InspectCommandError(command *IOUSBHostCIMessage) (bool, error)

@brief Inspect an IOUSBHostCIMessage command @discussion The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state. @param command IOUSBHostCIMessage command structure received from the kernel driver. @return BOOL YES if the command is targeting a controller, and can be handled in the current state BOOL NO if the command does not target a controller, or cannot be handled in the current state

func (*IOUSBHostCIControllerStateMachine) RespondToCommandStatusError

func (o *IOUSBHostCIControllerStateMachine) RespondToCommandStatusError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus) (bool, error)

@brief Advance the state machine and respond to an IOUSBHostCIMessage command @discussion If the command passes inspectCommand and the client indicates the command was processed successfully, the state machine is advanced, and a properly formatted command response message is sent to the kernel driver. If the client indicates the command was not processed successfully, the state machine is not advanced but a properly formatted command response message is sent to the kernel driver. @param command IOUSBHostCIMessage command structure received from the kernel driver. @param status IOUSBHostCIMessageStatus reported by the user-mode USB host controller implementation for the command response. @return BOOL YES if the command response was sent to the kernel driver BOOL NO if the command response was not sent to the kernel driver

func (*IOUSBHostCIControllerStateMachine) RespondToCommandStatusFrameTimestampError

func (o *IOUSBHostCIControllerStateMachine) RespondToCommandStatusFrameTimestampError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus, frame uint64, timestamp uint64) (bool, error)

@brief Advance the state machine and respond to an IOUSBHostCIMessageTypeControllerFrameNumber command @discussion If the command passes inspectCommand and the client indicates the command was processed successfully, enqueueUpdatedFrame:timestamp:error is called with the supplied parameters, and a properly formatted command response message is sent to the kernel driver. If the client indicates the command was not processed successfully, enqueueUpdatedFrame:timestamp:error is not called but a properly formatted command response message is sent to the kernel driver. @param command IOUSBHostCIMessage command structure received from the kernel driver. The Type field must be IOUSBHostCIMessageTypeControllerFrameNumber @param status IOUSBHostCIMessageStatus reported by the user-mode USB host controller implementation for the command response. @param frame uint64_t containing the number of 1ms frames that have elapsed since the controller began counting frames @param timestamp uint64_t containing the mach_absolute_time() correlated to the beginning of the frameNumber @return BOOL YES if the command response was sent to the kernel driver BOOL NO if the command response was not sent to the kernel driver

type IOUSBHostCIDeviceSpeed

type IOUSBHostCIDeviceSpeed int64

@enum IOUSBHostCIDeviceSpeed @brief Values to represent a connected device speed, to be used in IOUSBHostCIMessages and IOUSBHostsCIPortStatus

const (
	IOUSBHostCIDeviceSpeedNone         IOUSBHostCIDeviceSpeed = 0
	IOUSBHostCIDeviceSpeedFull         IOUSBHostCIDeviceSpeed = 1
	IOUSBHostCIDeviceSpeedLow          IOUSBHostCIDeviceSpeed = 2
	IOUSBHostCIDeviceSpeedHigh         IOUSBHostCIDeviceSpeed = 3
	IOUSBHostCIDeviceSpeedSuper        IOUSBHostCIDeviceSpeed = 4
	IOUSBHostCIDeviceSpeedSuperPlus    IOUSBHostCIDeviceSpeed = 5
	IOUSBHostCIDeviceSpeedSuperPlusBy2 IOUSBHostCIDeviceSpeed = 6
	IOUSBHostCIDeviceSpeedOther        IOUSBHostCIDeviceSpeed = 7
)

func (IOUSBHostCIDeviceSpeed) String

func (e IOUSBHostCIDeviceSpeed) String() string

type IOUSBHostCIDeviceState

type IOUSBHostCIDeviceState int64

@enum IOUSBHostCIDeviceState @brief Device state managed by IOUSBHostCIDeviceStateMachine @discussion IOUSBHostCIDeviceStateDestroyed represents a device that is no longer usable, and whose resources will be destroyed and freed IOUSBHostCIDeviceStatePaused represents a device that may have IO requests enqueued, but they are not active on the bus. The state is closely correlated to IOUSBHostCIPortStateSuspended, and endpoints associated with this device may not be in the IOUSBHostCIEndpointStateActive state. IOUSBHostCIDeviceStateActive is the initial sate of a newly created IOUSBHsotCIDeviceStateMachine, and represents a device that can be processing IO requests. Endpoints associated with this device may be in the IOUSBHostCIEndpointStateActive state.

const (
	IOUSBHostCIDeviceStateDestroyed IOUSBHostCIDeviceState = 0
	IOUSBHostCIDeviceStatePaused    IOUSBHostCIDeviceState = 1
	IOUSBHostCIDeviceStateActive    IOUSBHostCIDeviceState = 2
)

func (IOUSBHostCIDeviceState) String

func (e IOUSBHostCIDeviceState) String() string

type IOUSBHostCIDeviceStateMachine

type IOUSBHostCIDeviceStateMachine struct {
	foundation.NSObject
}

@class IOUSBHostCIDeviceStateMachine @brief The object representing the state of a user-mode USB host controller device @details This class assists with tracking internal state transitions of a user-mode USB host controller device, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. Clients should create an IOUSBHostCIDeviceStateMachine in response to an IOUSBHostCIMessageTypeDeviceCreate command, and then use the provided interfaces to identify and process commands for the device. The IOUSBHostCIDeviceStateMachine should be destroyed in response to an IOUSBHostCIMessageTypeDeviceDestroy command. IOUSBHostCIDeviceStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostcidevicestatemachine

func IOUSBHostCIDeviceStateMachineFromID

func IOUSBHostCIDeviceStateMachineFromID(id objc.ID) *IOUSBHostCIDeviceStateMachine

func (*IOUSBHostCIDeviceStateMachine) CompleteRoute

func (o *IOUSBHostCIDeviceStateMachine) CompleteRoute() uint

func (*IOUSBHostCIDeviceStateMachine) ControllerInterface

func (*IOUSBHostCIDeviceStateMachine) DeviceAddress

func (o *IOUSBHostCIDeviceStateMachine) DeviceAddress() uint

func (*IOUSBHostCIDeviceStateMachine) DeviceState

func (*IOUSBHostCIDeviceStateMachine) InitWithInterfaceCommandError

func (o *IOUSBHostCIDeviceStateMachine) InitWithInterfaceCommandError(interface_ *IOUSBHostControllerInterface, command *IOUSBHostCIMessage) (*IOUSBHostCIDeviceStateMachine, error)

@brief Initializes an IOUSBHostCIDeviceStateMachine object @discussion The IOUSBHostCIDeviceStateMachine defaults to the IOUSBHostCIDeviceStateActive state. @param interface IOUSBHostControllerInterface which will be used to send command responses. @param command IOUSBHostCIMessage with type IOUSBHostCIMessageTypeDeviceCreate @return IOUSBHostCIDeviceStateMachine instance, to be released by the caller.

func (*IOUSBHostCIDeviceStateMachine) InspectCommandError

func (o *IOUSBHostCIDeviceStateMachine) InspectCommandError(command *IOUSBHostCIMessage) (bool, error)

@brief Inspect an IOUSBHostCIMessage command @discussion The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state. @param command IOUSBHostCIMessage command structure received from the kernel driver. @return BOOL YES if the command is targeting a controller, and can be handled in the current state BOOL NO if the command does not target a controller, or cannot be handled in the current state

func (*IOUSBHostCIDeviceStateMachine) RespondToCommandStatusDeviceAddressError

func (o *IOUSBHostCIDeviceStateMachine) RespondToCommandStatusDeviceAddressError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus, deviceAddress uint) (bool, error)

func (*IOUSBHostCIDeviceStateMachine) RespondToCommandStatusError

func (o *IOUSBHostCIDeviceStateMachine) RespondToCommandStatusError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus) (bool, error)

@brief Advance the state machine and respond to an IOUSBHostCIMessage command @discussion If the command passes inspectCommand and the client indicates the command was processed successfully, the state machine is advanced, and a properly formatted command response message is sent to the kernel driver. If the client indicates the command was not processed successfully, the state machine is not advanced but a properly formatted command response message is sent to the kernel driver. @param command IOUSBHostCIMessage command structure received from the kernel driver. @param status IOUSBHostCIMessageStatus reported by the user-mode USB host controller implementation for the command response. @return BOOL YES if the command response was sent to the kernel driver BOOL NO if the command response was not sent to the kernel driver

type IOUSBHostCIEndpointState

type IOUSBHostCIEndpointState int64

@enum IOUSBHostCIEndpointState @brief Endpoint state managed by IOUSBHostCIEndpointStateMachine @discussion IOUSBHostCIEndpointStateDestroyed represents an endpoint that is no longer usable, and whose resources will be destroyed and freed. IOUSBHostCIEndpointStateHalted represents an endpoint that has encountered an IO error. The client must not access or modify transfer structures or IO buffers for an endpoint in this state. IOUSBHostCIEndpointStatePaused is the initial state of a newly created IOUSBHostCIEndpointStateMachine, and represents an endpoint that is not currently servicing IO requests. The client must not access or modify transfer structures or IO buffers for an endpoint in this state. IOUSBHostCIEndpointStateActive represents an endpoint that is currently servicing an IO request, or is idle after successfully servicing its queue of IO requests. In this state the client may access transfer structures and IO buffers.

const (
	IOUSBHostCIEndpointStateDestroyed IOUSBHostCIEndpointState = 0
	IOUSBHostCIEndpointStateHalted    IOUSBHostCIEndpointState = 1
	IOUSBHostCIEndpointStatePaused    IOUSBHostCIEndpointState = 2
	IOUSBHostCIEndpointStateActive    IOUSBHostCIEndpointState = 3
)

func (IOUSBHostCIEndpointState) String

func (e IOUSBHostCIEndpointState) String() string

type IOUSBHostCIEndpointStateMachine

type IOUSBHostCIEndpointStateMachine struct {
	foundation.NSObject
}

@class IOUSBHostCIEndpointStateMachine @brief The object representing the state of a user-mode USB host controller endpoint @details This class assists with tracking internal state transitions of a user-mode USB host controller endpoint, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. Clients should create an IOUSBHostCIEndpointStateMachine in response to an IOUSBHostCIMessageTypeEndpointCreate command, and then use the provided interfaces to identify and process commands, doorbells, and transfer structures for the endpoint. The IOUSBHostCIEndpointStateMachine should be destroyed in response to an IOUSBHostCIMessageTypeEndpointDestroy command. Endpoint state is controlled by IOUSBHostCIMessage structures representing commands and transfer completions, and IOUSBHostCIDoorbell messages. Only an endpoint in the IOUSBHostCIEndpointStateActive state may inspect transfer structures, read or modify IO buffers, and generate transfer completions. IOUSBHostCIEndpointStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostciendpointstatemachine

func IOUSBHostCIEndpointStateMachineFromID

func IOUSBHostCIEndpointStateMachineFromID(id objc.ID) *IOUSBHostCIEndpointStateMachine

func (*IOUSBHostCIEndpointStateMachine) ControllerInterface

func (*IOUSBHostCIEndpointStateMachine) CurrentTransferMessage

func (o *IOUSBHostCIEndpointStateMachine) CurrentTransferMessage() *IOUSBHostCIMessage

func (*IOUSBHostCIEndpointStateMachine) DeviceAddress

func (o *IOUSBHostCIEndpointStateMachine) DeviceAddress() uint

func (*IOUSBHostCIEndpointStateMachine) EndpointAddress

func (o *IOUSBHostCIEndpointStateMachine) EndpointAddress() uint

func (*IOUSBHostCIEndpointStateMachine) EndpointState

func (*IOUSBHostCIEndpointStateMachine) EnqueueTransferCompletionForMessageStatusTransferLengthError

func (o *IOUSBHostCIEndpointStateMachine) EnqueueTransferCompletionForMessageStatusTransferLengthError(message *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus, transferLength uint) (bool, error)

@brief Send an IOUSBHostCIMessage representing a transfer completion to the kernel, and advance the state machine @discussion When a client has processed an IOUSBHostCIMessage representing a transfer, the result is reported to the kernel by another IOUSBHostCIMessage. If successful, this object will use controllerInterface's enqueueInterrupt interface to send a properly formatted IOUSBHostCIMessage to the kernel with IOUSBHostCITransferCompletionMessageData1TransferStructure populated with currentTransferMessage's virtual address, and endpointState and currentTransferMessage are updated. After a successful call, the client should check for an IOUSBHostCIEndpointStateActive endpointState and a currentTransferMessage with IOUSBHostCIMessageControlValid set to determine if more IOUSBHostCIMessages should be processed. @param message pointer to the IOUSBHostCIMessage which generated this tranafer completion message. This must match currentTransferMessage to be successful. @param status IOUSBHostCIMessageStatus @param transferLength The number of bytes transferred for the specified transfer structure.

func (*IOUSBHostCIEndpointStateMachine) InitWithInterfaceCommandError

@brief Initializes an IOUSBHostCIEndpointStateMachine object @discussion The IOUSBHostCIEndpointStateMachine defaults to the IOUSBHostCIEndpointStatePaused state. @param interface IOUSBHostControllerInterface which will be used to send command responses. @param command IOUSBHostCIMessage with type IOUSBHostCIMessageTypeEndpointCreate @return IOUSBHostCIEndpointStateMachine instance, to be released by the caller.

func (*IOUSBHostCIEndpointStateMachine) InspectCommandError

func (o *IOUSBHostCIEndpointStateMachine) InspectCommandError(command *IOUSBHostCIMessage) (bool, error)

@brief Inspect an IOUSBHostCIMessage command @discussion The IOUSBHostCIMessage command is inspected to determine if it is handled by this state machine and is appropriate for the current state. @param command IOUSBHostCIMessage command structure received from the kernel driver. @return BOOL YES if the command is targeting this endpoint, and can be handled in the current state BOOL NO if the command does not target this endpoint, or cannot be handled in the current state

func (*IOUSBHostCIEndpointStateMachine) ProcessDoorbellError

func (o *IOUSBHostCIEndpointStateMachine) ProcessDoorbellError(doorbell uint32) (bool, error)

@brief Advance the state machine and process an IOUSBHostCIDoorbell message @discussion The IOUSBHostCIDoorbell is inspected to determine if it is handled by this state machine and is appropriate for the current state. If successful, the client should check for an IOUSBHostCIEndpointStateActive endpointState and a currentTransferMessage with IOUSBHostCIMessageControlValid set to determine if more IOUSBHostCIMessages should be processed. @param doorbell IOUSBHostCIDoorbell message received from the kernel driver. @return BOOL YES if the doorbell is targeting this endpoint and can be handled in the current state. BOOL NO is the doorbell does not target this endpoint or cannot be handled in the current state.

func (*IOUSBHostCIEndpointStateMachine) RespondToCommandStatusError

func (o *IOUSBHostCIEndpointStateMachine) RespondToCommandStatusError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus) (bool, error)

@brief Advance the state machine and respond to an IOUSBHostCIMessage command @discussion If the command passes inspectCommand and the client indicates the command was processed successfully, endpointState is updated and a properly formatted command response message is sent to the kernel driver. If the client indicates the command was not processed successfully, endpointState is not updated but a properly formatted command response message is sent to the kernel driver. @param command IOUSBHostCIMessage command structure received from the kernel driver. @param status IOUSBHostCIMessageStatus reported by the user-mode USB host controller implementation for the command response. @return BOOL YES if the command response was sent to the kernel driver BOOL NO if the command response was not sent to the kernel driver

type IOUSBHostCIExceptionType

type IOUSBHostCIExceptionType int64

@enum IOUSBHostCIExceptionType @brief Exception specifier included as message argument to <code>kUSBHostMessageControllerException</code> @discussion The kernel driver sends a <code>kUSBHostMessageControllerException</code> message to its clients when a fatal problem has occurred, with a refCon of the IOUSBHostController instance and a <code>IOUSBHostCIExceptionType</code> in the message arguments. When any <code>kUSBHostMessageControllerException</code> message is received, the specified IOUSBHostControllerInterface must be destroyed.

const (
	IOUSBHostCIExceptionTypeUnknown               IOUSBHostCIExceptionType = 0
	IOUSBHostCIExceptionTypeCapabilitiesInvalid   IOUSBHostCIExceptionType = 1
	IOUSBHostCIExceptionTypeTerminated            IOUSBHostCIExceptionType = 2
	IOUSBHostCIExceptionTypeCommandReadCollision  IOUSBHostCIExceptionType = 3
	IOUSBHostCIExceptionTypeCommandWriteFailed    IOUSBHostCIExceptionType = 4
	IOUSBHostCIExceptionTypeCommandTimeout        IOUSBHostCIExceptionType = 5
	IOUSBHostCIExceptionTypeCommandFailure        IOUSBHostCIExceptionType = 6
	IOUSBHostCIExceptionTypeInterruptInvalid      IOUSBHostCIExceptionType = 7
	IOUSBHostCIExceptionTypeInterruptOverflow     IOUSBHostCIExceptionType = 8
	IOUSBHostCIExceptionTypeDoorbellReadCollision IOUSBHostCIExceptionType = 9
	IOUSBHostCIExceptionTypeDoorbellOverflow      IOUSBHostCIExceptionType = 10
	IOUSBHostCIExceptionTypeProtocolError         IOUSBHostCIExceptionType = 11
	IOUSBHostCIExceptionTypeFrameUpdateError      IOUSBHostCIExceptionType = 12
)

func (IOUSBHostCIExceptionType) String

func (e IOUSBHostCIExceptionType) String() string

type IOUSBHostCILinkState

type IOUSBHostCILinkState int64

@enum IOUSBHostCILinkState @brief Values to represent a port's link state, to be used in IOUSBHostCIMessages and IOUSBHostCIPortStatus

const (
	IOUSBHostCILinkStateU0         IOUSBHostCILinkState = 0
	IOUSBHostCILinkStateU1         IOUSBHostCILinkState = 1
	IOUSBHostCILinkStateU2         IOUSBHostCILinkState = 2
	IOUSBHostCILinkStateU3         IOUSBHostCILinkState = 3
	IOUSBHostCILinkStateDisabled   IOUSBHostCILinkState = 4
	IOUSBHostCILinkStateRxDetect   IOUSBHostCILinkState = 5
	IOUSBHostCILinkStateInactive   IOUSBHostCILinkState = 6
	IOUSBHostCILinkStatePolling    IOUSBHostCILinkState = 7
	IOUSBHostCILinkStateRecovery   IOUSBHostCILinkState = 8
	IOUSBHostCILinkStateReset      IOUSBHostCILinkState = 9
	IOUSBHostCILinkStateCompliance IOUSBHostCILinkState = 10
	IOUSBHostCILinkStateTest       IOUSBHostCILinkState = 11
	IOUSBHostCILinkStateResume     IOUSBHostCILinkState = 15
)

func (IOUSBHostCILinkState) String

func (e IOUSBHostCILinkState) String() string

type IOUSBHostCIMessage

type IOUSBHostCIMessage struct {
	Control uint32
	Data0   uint32
	Data1   uint64
}

@typedef IOUSBHostCIMessage @brief Foundational IOUSBHostControllerInterface message structure used for commands, transfers, and interrupts @discussion IOUSBHostCIMessage structures are control structures passed between the IOUSBHostControllerInterface client and the kernel driver. They are used to represent capabilities during initialization, commands and transfers sent from the kernel, and interrupt events sent to the kernel.

type IOUSBHostCIMessageStatus

type IOUSBHostCIMessageStatus int64

@enum IOUSBHostCIMessageStatus @brief Values to be populated in IOUSBHostCIMessageControlStatus of an IOUSBHostCIMessage structure

const (
	IOUSBHostCIMessageStatusReserved           IOUSBHostCIMessageStatus = 0
	IOUSBHostCIMessageStatusSuccess            IOUSBHostCIMessageStatus = 1
	IOUSBHostCIMessageStatusOffline            IOUSBHostCIMessageStatus = 2
	IOUSBHostCIMessageStatusNotPermitted       IOUSBHostCIMessageStatus = 3
	IOUSBHostCIMessageStatusBadArgument        IOUSBHostCIMessageStatus = 4
	IOUSBHostCIMessageStatusTimeout            IOUSBHostCIMessageStatus = 5
	IOUSBHostCIMessageStatusNoResources        IOUSBHostCIMessageStatus = 6
	IOUSBHostCIMessageStatusEndpointStopped    IOUSBHostCIMessageStatus = 7
	IOUSBHostCIMessageStatusProtocolError      IOUSBHostCIMessageStatus = 8
	IOUSBHostCIMessageStatusTransactionError   IOUSBHostCIMessageStatus = 9
	IOUSBHostCIMessageStatusOverrunError       IOUSBHostCIMessageStatus = 10
	IOUSBHostCIMessageStatusStallError         IOUSBHostCIMessageStatus = 11
	IOUSBHostCIMessageStatusMissedServiceError IOUSBHostCIMessageStatus = 12
	IOUSBHostCIMessageStatusError              IOUSBHostCIMessageStatus = 13
)

func IOUSBHostCIMessageStatusFromIOReturn

func IOUSBHostCIMessageStatusFromIOReturn(status int) IOUSBHostCIMessageStatus

func (IOUSBHostCIMessageStatus) String

func (e IOUSBHostCIMessageStatus) String() string

type IOUSBHostCIMessageType

type IOUSBHostCIMessageType int64

@enum IOUSBHostCIMessageType @brief Values to be populated in IOUSBHostCIMessageControlType of an IOUSBHostCIMessage structure

const (
	IOUSBHostCIMessageTypeControllerCapabilities  IOUSBHostCIMessageType = 0
	IOUSBHostCIMessageTypePortCapabilities        IOUSBHostCIMessageType = 1
	IOUSBHostCIMessageTypePortEvent               IOUSBHostCIMessageType = 8
	IOUSBHostCIMessageTypeFrameNumberUpdate       IOUSBHostCIMessageType = 9
	IOUSBHostCIMessageTypeFrameTimestampUpdate    IOUSBHostCIMessageType = 10
	IOUSBHostCIMessageTypeCommandMin              IOUSBHostCIMessageType = 16
	IOUSBHostCIMessageTypeControllerPowerOn       IOUSBHostCIMessageType = 16
	IOUSBHostCIMessageTypeControllerPowerOff      IOUSBHostCIMessageType = 17
	IOUSBHostCIMessageTypeControllerStart         IOUSBHostCIMessageType = 18
	IOUSBHostCIMessageTypeControllerPause         IOUSBHostCIMessageType = 19
	IOUSBHostCIMessageTypeControllerFrameNumber   IOUSBHostCIMessageType = 20
	IOUSBHostCIMessageTypePortPowerOn             IOUSBHostCIMessageType = 24
	IOUSBHostCIMessageTypePortPowerOff            IOUSBHostCIMessageType = 25
	IOUSBHostCIMessageTypePortResume              IOUSBHostCIMessageType = 26
	IOUSBHostCIMessageTypePortSuspend             IOUSBHostCIMessageType = 27
	IOUSBHostCIMessageTypePortReset               IOUSBHostCIMessageType = 28
	IOUSBHostCIMessageTypePortDisable             IOUSBHostCIMessageType = 29
	IOUSBHostCIMessageTypePortStatus              IOUSBHostCIMessageType = 30
	IOUSBHostCIMessageTypeDeviceCreate            IOUSBHostCIMessageType = 32
	IOUSBHostCIMessageTypeDeviceDestroy           IOUSBHostCIMessageType = 33
	IOUSBHostCIMessageTypeDeviceStart             IOUSBHostCIMessageType = 34
	IOUSBHostCIMessageTypeDevicePause             IOUSBHostCIMessageType = 35
	IOUSBHostCIMessageTypeDeviceUpdate            IOUSBHostCIMessageType = 36
	IOUSBHostCIMessageTypeEndpointCreate          IOUSBHostCIMessageType = 40
	IOUSBHostCIMessageTypeEndpointDestroy         IOUSBHostCIMessageType = 41
	IOUSBHostCIMessageTypeEndpoint_reserved_      IOUSBHostCIMessageType = 42
	IOUSBHostCIMessageTypeEndpointPause           IOUSBHostCIMessageType = 43
	IOUSBHostCIMessageTypeEndpointUpdate          IOUSBHostCIMessageType = 44
	IOUSBHostCIMessageTypeEndpointReset           IOUSBHostCIMessageType = 45
	IOUSBHostCIMessageTypeEndpointSetNextTransfer IOUSBHostCIMessageType = 46
	IOUSBHostCIMessageTypeCommandMax              IOUSBHostCIMessageType = 55
	IOUSBHostCIMessageTypeSetupTransfer           IOUSBHostCIMessageType = 56
	IOUSBHostCIMessageTypeNormalTransfer          IOUSBHostCIMessageType = 57
	IOUSBHostCIMessageTypeStatusTransfer          IOUSBHostCIMessageType = 58
	IOUSBHostCIMessageTypeIsochronousTransfer     IOUSBHostCIMessageType = 59
	IOUSBHostCIMessageTypeLink                    IOUSBHostCIMessageType = 60
	IOUSBHostCIMessageTypeTransferComplete        IOUSBHostCIMessageType = 61
)

func (IOUSBHostCIMessageType) String

func (e IOUSBHostCIMessageType) String() string

type IOUSBHostCIPortState

type IOUSBHostCIPortState int64

@enum IOUSBHostCIPortState @brief Port state managed by IOUSBHostCIPortStateMachine @discussion IOUSBHostCIPortStateOff is the initial state of a newly created IOUSBHostCIPortStateMachine and represents an unpowered port which is unable to detect events such as connections. Downstream devices, if any, must be in the IOUSBHostCIDeviceStateDestroyed state. IOUSBHostCIPortStatePowered represents a powered port which is able to detect events such as connections. Downstream devices, if any, must be in the IOUSBHostCIDeviceStateDestroyed state. IOUSBHostCIPortStateSuspended represents a port with a downstream device that is in a low-power state such as U3 or L2. The port is able to detect events such as remote wakes, and is not actively transmitting data. Downstream devices must be in the IOUSBHostCIDeviceStatePaused state. IOUSBHostCIPortStateActive represents a port with a downstream device that is able to immediately transfer data. The downstream device may be in the IOUSBHostCIDeviceStateActive state.

const (
	IOUSBHostCIPortStateOff       IOUSBHostCIPortState = 0
	IOUSBHostCIPortStatePowered   IOUSBHostCIPortState = 1
	IOUSBHostCIPortStateSuspended IOUSBHostCIPortState = 2
	IOUSBHostCIPortStateActive    IOUSBHostCIPortState = 3
)

func (IOUSBHostCIPortState) String

func (e IOUSBHostCIPortState) String() string

type IOUSBHostCIPortStateMachine

type IOUSBHostCIPortStateMachine struct {
	foundation.NSObject
}

@class IOUSBHostCIPortStateMachine @brief The object representing the state of a user-mode USB host controller root port @details This class assists with tracking internal state transitions of a user-mode USB host controller root port, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. IOUSBHostCIPortStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostciportstatemachine

func IOUSBHostCIPortStateMachineFromID

func IOUSBHostCIPortStateMachineFromID(id objc.ID) *IOUSBHostCIPortStateMachine

func (*IOUSBHostCIPortStateMachine) Connected

func (o *IOUSBHostCIPortStateMachine) Connected() bool

@brief Set the connection state of the port @discussion The connected property cannot be set for an unpowered port, and will read back as NO, just at IOUSBHostCIPortStatusConnected in the port status will always read as 0. For a powered port, writing to the connected property will set IOUSBHostCIPortStatusConnected to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusConnectChange set.

func (*IOUSBHostCIPortStateMachine) ControllerInterface

func (*IOUSBHostCIPortStateMachine) InitWithInterfacePortNumberError

func (o *IOUSBHostCIPortStateMachine) InitWithInterfacePortNumberError(interface_ *IOUSBHostControllerInterface, portNumber uint) (*IOUSBHostCIPortStateMachine, error)

@brief Initializes an IOUSBHostCIPortStateMachine object @discussion The IOUSBHostCIPortStateMachine defaults to the IOUSBHostCIPortStateOff state. @param interface IOUSBHostControllerInterface which will be used to send command responses. @param portNumber NSUInteger for the root port number tracked by this instance @return IOUSBHostCIPortStateMachine instance, to be released by the caller.

func (*IOUSBHostCIPortStateMachine) InspectCommandError

func (o *IOUSBHostCIPortStateMachine) InspectCommandError(command *IOUSBHostCIMessage) (bool, error)

@brief Inspect an IOUSBHostCIMessage command @discussion The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state. @param command IOUSBHostCIMessage command structure received from the kernel driver. @return BOOL YES if the command is targeting a controller, and can be handled in the current state BOOL NO if the command does not target a controller, or cannot be handled in the current state

func (*IOUSBHostCIPortStateMachine) LinkState

func (*IOUSBHostCIPortStateMachine) Overcurrent

func (o *IOUSBHostCIPortStateMachine) Overcurrent() bool

@brief Set the overcurrent state of the port @discussion The overcurrent property cannot be set for an unpowered port, and will read back as NO, just as IOUSBHostCIPortStatusOvercurrent in the port status will always read as 0. For a powered port, writing to the overcurrent property will set IOUSBHostCIPortStatusOvercurrent to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusOvercurrentChange set.

func (*IOUSBHostCIPortStateMachine) PortNumber

func (o *IOUSBHostCIPortStateMachine) PortNumber() uint

func (*IOUSBHostCIPortStateMachine) PortState

func (*IOUSBHostCIPortStateMachine) PortStatus

func (o *IOUSBHostCIPortStateMachine) PortStatus() uint32

func (*IOUSBHostCIPortStateMachine) Powered

func (o *IOUSBHostCIPortStateMachine) Powered() bool

@brief Set the powered state of the port @discussion Before a port can be used, it must be powered on via a IOUSBHostCIMessageTypePortPowerOn command. As part of successfully processing this command the powered property must be set to YES. Similarly, successful processing of the IOUSBHostCIMessageTypePortPowerOff command must set the powered property to NO.

func (*IOUSBHostCIPortStateMachine) RespondToCommandStatusError

func (o *IOUSBHostCIPortStateMachine) RespondToCommandStatusError(command *IOUSBHostCIMessage, status IOUSBHostCIMessageStatus) (bool, error)

@brief Advance the state machine and respond to an IOUSBHostCIMessage command @discussion If the command passes inspectCommand and the client indicates the command was processed successfully, the state machine is advanced, and a properly formatted command response message is sent to the kernel driver. If the client indicates the command was not processed successfully, the state machine is not advanced but a properly formatted command response message is sent to the kernel driver. @param command IOUSBHostCIMessage command structure received from the kernel driver. @param status IOUSBHostCIMessageStatus reported by the user-mode USB host controller implementation for the command response. @return BOOL YES if the command response was sent to the kernel driver BOOL NO if the command response was not sent to the kernel driver

func (*IOUSBHostCIPortStateMachine) SetConnected

func (o *IOUSBHostCIPortStateMachine) SetConnected(connected bool)

func (*IOUSBHostCIPortStateMachine) SetOvercurrent

func (o *IOUSBHostCIPortStateMachine) SetOvercurrent(overcurrent bool)

func (*IOUSBHostCIPortStateMachine) SetPowered

func (o *IOUSBHostCIPortStateMachine) SetPowered(powered bool)

func (*IOUSBHostCIPortStateMachine) Speed

func (*IOUSBHostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChangeError

func (o *IOUSBHostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChangeError(linkState IOUSBHostCILinkState, speed IOUSBHostCIDeviceSpeed, inhibitLinkStateChange bool) (bool, error)

type IOUSBHostCIUserClientVersion

type IOUSBHostCIUserClientVersion int64
const (
	IOUSBHostCIUserClientVersion100 IOUSBHostCIUserClientVersion = 0
)

func (IOUSBHostCIUserClientVersion) String

type IOUSBHostControllerInterface

type IOUSBHostControllerInterface struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostcontrollerinterface

func IOUSBHostControllerInterfaceFromID

func IOUSBHostControllerInterfaceFromID(id objc.ID) *IOUSBHostControllerInterface

func (*IOUSBHostControllerInterface) Capabilities

@brief The capabilities structure passed in during initialization @discussion The capabilities passed into the initializer can be retrieved for reference.

func (*IOUSBHostControllerInterface) CapabilitiesForPort

func (o *IOUSBHostControllerInterface) CapabilitiesForPort(port uint) *IOUSBHostCIMessage

@brief Retrieve a port capabilities structure passed in during initialization

func (*IOUSBHostControllerInterface) ControllerStateMachine

func (*IOUSBHostControllerInterface) DescriptionForMessage

func (o *IOUSBHostControllerInterface) DescriptionForMessage(message *IOUSBHostCIMessage) *foundation.NSString

func (*IOUSBHostControllerInterface) Destroy

func (o *IOUSBHostControllerInterface) Destroy()

@brief Removes underlying allocations of the IOUSBHostControllerInterface object along with user client @discussion When the IOUSBHostControllerInterface is no longer needed, destroy must be called. This will destroy the connection with the user client and de-register interest on the service. If the object is freed, destroy will be called automatically. Calling destroy multiple times has no effect.

func (*IOUSBHostControllerInterface) EnqueueInterruptError

func (o *IOUSBHostControllerInterface) EnqueueInterruptError(interrupt *IOUSBHostCIMessage) (bool, error)

@brief Enqueue an interrupt for delivery to the kernel service @discussion This method enqueues one interrupt message for delivery to the kernel service. interruptRateHz is used to determine when the interrupt message is delivered to the kernel service. @param interrupt An IOUSBHostCIMessage structure representing an interrupt message

func (*IOUSBHostControllerInterface) EnqueueInterruptExpediteError

func (o *IOUSBHostControllerInterface) EnqueueInterruptExpediteError(interrupt *IOUSBHostCIMessage, expedite bool) (bool, error)

@brief Enqueue an interrupt for delivery to the kernel service @discussion This method enqueues one interrupt message for delivery to the kernel service. @param interrupt An IOUSBHostCIMessage structure representing an interrupt message @param expedite Bool NO to use interruptRateHz to determine when the interrupt message is delivered to the kernel service. Bool YES if interruptRateHz should be ignored, sending the message to the kernel driver at the next opportunity while maintaining in-order delivery of all interrupt messages.

func (*IOUSBHostControllerInterface) EnqueueInterruptsCountError

func (o *IOUSBHostControllerInterface) EnqueueInterruptsCountError(interrupts *IOUSBHostCIMessage, count uint) (bool, error)

@brief Enqueue interrupts for delivery to the kernel service @discussion This method enqueues one or more interrupt messages for delivery to the kernel service. interruptRateHz is used to determine when the interrupt message is delivered to the kernel service. @param interrupts An IOUSBHostCIMessage structure representing one or more interrupt messages @param count The number of interrupt messages represented by the interrupts parameter

func (*IOUSBHostControllerInterface) EnqueueInterruptsCountExpediteError

func (o *IOUSBHostControllerInterface) EnqueueInterruptsCountExpediteError(interrupts *IOUSBHostCIMessage, count uint, expedite bool) (bool, error)

@brief Enqueue interrupts for delivery to the kernel service @discussion This method enqueues one or more interrupt messages for delivery to the kernel service. interruptRateHz is used to determine when the interrupt message is delivered to the kernel service. @param interrupts An IOUSBHostCIMessage structure representing one or more interrupt messages @param count The number of interrupt messages represented by the interrupts parameter @param expedite Bool NO to use interruptRateHz to determine when the interrupt message is delivered to the kernel service. Bool YES if interruptRateHz should be ignored, sending the message to the kernel driver at the next opportunity while maintaining in-order delivery of all interrupt messages.

func (*IOUSBHostControllerInterface) GetPortStateMachineForCommandError

func (o *IOUSBHostControllerInterface) GetPortStateMachineForCommandError(command *IOUSBHostCIMessage) (*IOUSBHostCIPortStateMachine, error)

func (*IOUSBHostControllerInterface) GetPortStateMachineForPortError

func (o *IOUSBHostControllerInterface) GetPortStateMachineForPortError(port uint) (*IOUSBHostCIPortStateMachine, error)

func (*IOUSBHostControllerInterface) InitWithCapabilitiesQueueInterruptRateHzErrorCommandHandlerDoorbellHandlerInterestHandler

func (o *IOUSBHostControllerInterface) InitWithCapabilitiesQueueInterruptRateHzErrorCommandHandlerDoorbellHandlerInterestHandler(capabilities *foundation.NSData, queue *foundation.NSObject, interruptRateHz uint, error_ unsafe.Pointer, commandHandler objc.Block, doorbellHandler func(*IOUSBHostControllerInterface, *uint32, uint32), interestHandler unsafe.Pointer) *IOUSBHostControllerInterface

@brief Initializes IOUSBHostControllerInterface object along with a user client @discussion If the user client cannot be created, nil will be returned. When done using the object, destroy must be called on the object. @param capabilities NSData containing an array of IOUSBHostCIMessage structures. The first must have an IOUSBHostCIMessageControlType of IOUSBHostCIMessageTypeControllerCapabilities, followed by at least one message with an IOUSBHostCIMessageControlType of IOUSBHostCIMessageTypePortCapabilities. @param queue A serial queue to service asynchronous operations. If nil, a serial queue will be created on behalf of the client. @param interruptRateHz NSUInteger representing the rate in Hz at which interrupts will be delivered to the kernel driver. A value ot 0 will send all interrupts to the kernel immediately. @param commandHandler IOUSBHostControllerInterfaceCommandHandler used to process IOUSBHostCIMessage messages sent by the kernel driver. @param doorbellHandler IOUSBHostControllerInterfaceDoorbellHandler used to process IOUSBHostCIDoorbell values sent by the kernel driver. @param interestHandler IOServiceInterestCallback used to process service state changes such as termination. See IOServiceAddInterestNotification in IOKitLib for more details. All notifications will be serviced on an internal serial queue separate from command and doorbell handlers. @return An IOUSBHostControllerInterface. The object is to be released by the caller.

func (*IOUSBHostControllerInterface) InterruptRateHz

func (o *IOUSBHostControllerInterface) InterruptRateHz() uint

@brief The interrupt moderation rate for sending interrupt messages to the kernel driver @discussion interruptRateHz will cause submitted interrupt messages to be batched together and submitted to the kernel at the specified rate. A value ot 0 will deliver all interrupts to the kernel driver as soon as possible.

func (*IOUSBHostControllerInterface) Queue

@brief The dispatch queue for asynchronous operations.

func (*IOUSBHostControllerInterface) SetInterruptRateHz

func (o *IOUSBHostControllerInterface) SetInterruptRateHz(interruptRateHz uint)

func (*IOUSBHostControllerInterface) Uuid

@brief A UUID used to identify the host controller interface in this process and the kernel

type IOUSBHostDevice

type IOUSBHostDevice struct {
	IOUSBHostObject
}

The class that claims and configures devices, retrieves descriptors, and sends device requests.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostdevice

func IOUSBHostDeviceFromID

func IOUSBHostDeviceFromID(id objc.ID) *IOUSBHostDevice

func (*IOUSBHostDevice) ConfigurationDescriptor

func (o *IOUSBHostDevice) ConfigurationDescriptor() unsafe.Pointer

@brief Return the currently selected configuration descriptor @discussion This method uses descriptorWithType to return the configuration descriptor currently selected after a successful setConfiguration call @return Pointer to the configuration descriptor if found, or nil if the device is not configured

func (*IOUSBHostDevice) ConfigureWithValueError

func (o *IOUSBHostDevice) ConfigureWithValueError(value uint) (bool, error)

Selects a new configuration for the device and registers the interfaces for matching.

func (*IOUSBHostDevice) ConfigureWithValueMatchInterfacesError

func (o *IOUSBHostDevice) ConfigureWithValueMatchInterfacesError(value uint, matchInterfaces bool) (bool, error)

Selects a new configuration for the device.

func (*IOUSBHostDevice) ResetWithError

func (o *IOUSBHostDevice) ResetWithError() (bool, error)

Terminates the device and attempts to re-enumerate it.

type IOUSBHostIOSource

type IOUSBHostIOSource struct {
	foundation.NSObject
}

This class provides basic functionality for deriving pipe and stream classes.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostiosource

func IOUSBHostIOSourceFromID

func IOUSBHostIOSourceFromID(id objc.ID) *IOUSBHostIOSource

func (*IOUSBHostIOSource) DeviceAddress

func (o *IOUSBHostIOSource) DeviceAddress() uint

@brief Retrieve the device's address @return Current address of the device

func (*IOUSBHostIOSource) EndpointAddress

func (o *IOUSBHostIOSource) EndpointAddress() uint

@brief Retrieve the IOSource's endpoint address @return Current address of the endpoint

func (*IOUSBHostIOSource) HostInterface

func (o *IOUSBHostIOSource) HostInterface() *IOUSBHostInterface

@brief Retrieve the source's IOUSBHostInterface @return IOUSBHostInterface pointer that the IOSource was created from.

type IOUSBHostIOSourceDescriptors

type IOUSBHostIOSourceDescriptors struct {
	BcdUSB                 uint16
	Descriptor             unsafe.Pointer
	SsCompanionDescriptor  unsafe.Pointer
	SspCompanionDescriptor unsafe.Pointer
}

The descriptors for a single endpoint.

type IOUSBHostInterface

type IOUSBHostInterface struct {
	IOUSBHostObject
}

The class for accessing USB-related services.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostinterface

func IOUSBHostInterfaceFromID

func IOUSBHostInterfaceFromID(id objc.ID) *IOUSBHostInterface

func (*IOUSBHostInterface) ConfigurationDescriptor

func (o *IOUSBHostInterface) ConfigurationDescriptor() unsafe.Pointer

@brief Retrieve the configuration descriptor associated with this interface @return IOUSBConfigurationDescriptor pointer

func (*IOUSBHostInterface) CopyPipeWithAddressError

func (o *IOUSBHostInterface) CopyPipeWithAddressError(address uint) (*IOUSBHostPipe, error)

Copies a pipe for a specific endpoint address.

func (*IOUSBHostInterface) IdleTimeout

func (o *IOUSBHostInterface) IdleTimeout() float64

@brief Retrieve the current idle suspend timeout. See @link setIdleTimeout @/link @return The amount of time after all pipes are idle to wait before suspending the device,

func (*IOUSBHostInterface) InitWithIOServiceOptionsQueueErrorInterestHandler

func (o *IOUSBHostInterface) InitWithIOServiceOptionsQueueErrorInterestHandler(ioService uint, options IOUSBHostObjectInitOptions, queue *foundation.NSObject, error_ unsafe.Pointer, interestHandler func(*IOUSBHostObject, uint32, unsafe.Pointer)) *IOUSBHostInterface

@brief Initializes IOUSBHostInterface object along with user client @discussion See IOUSBHostObject for documentation.

func (*IOUSBHostInterface) InterfaceDescriptor

func (o *IOUSBHostInterface) InterfaceDescriptor() unsafe.Pointer

@brief Retrieve the interface descriptor associated with this interface. @return IOUSBInterfaceDescriptor pointer

func (*IOUSBHostInterface) SelectAlternateSettingError

func (o *IOUSBHostInterface) SelectAlternateSettingError(alternateSetting uint) (bool, error)

Selects an alternative setting for the interface.

func (*IOUSBHostInterface) SetIdleTimeoutError

func (o *IOUSBHostInterface) SetIdleTimeoutError(idleTimeout float64) (bool, error)

Sets the desired idle suspend timeout for the interface.

type IOUSBHostIsochronousFrame

type IOUSBHostIsochronousFrame struct {
	Status        int
	RequestCount  uint32
	CompleteCount uint32
	Reserved      uint32
	TimeStamp     uint64
}

A structure that represents a single frame in an isochronous transfer.

type IOUSBHostIsochronousTransaction

type IOUSBHostIsochronousTransaction struct {
	Status        int
	RequestCount  uint32
	Offset        uint32
	CompleteCount uint32
	TimeStamp     uint64
	Options       IOUSBHostIsochronousTransactionOptions
}

@struct IOUSBHostIsochronousTransaction @discussion Structure representing a single frame or microframe in an isochronous transfer. @field status Completion status for this individual transaction. IOUSBHostFamily will initialize this to kIOReturnInvalid and will update the field with a valid status code upon completion of the transaction. @field requestCount The number of bytes requested to transfer for this transaction. This field must be initialized by the caller before the structure is submitted. @field offset The number of bytes between the start of the memory descriptor in which this transaction resides and the start of the transaction. The offset cannot exceed 4GB. @field completeCount The number of bytes actually transferred for this transaction. IOUSBHostFamily will update this field upon completion of the transaction. @field timeStamp The observed IOUSBHostTime for this transaction's completion. Note that interrupt latency and system load may result in more than one transaction completing with the same timestamp. @field options Flags that specify additional transaction behavior. See @link IOUSBHostIsochronousTransactionOptions @/link for more details.

type IOUSBHostIsochronousTransactionOptions

type IOUSBHostIsochronousTransactionOptions int64
const (
	IOUSBHostIsochronousTransactionOptionsNone IOUSBHostIsochronousTransactionOptions = 0
	IOUSBHostIsochronousTransactionOptionsWrap IOUSBHostIsochronousTransactionOptions = 1
)

func (IOUSBHostIsochronousTransactionOptions) String

type IOUSBHostIsochronousTransferOptions

type IOUSBHostIsochronousTransferOptions int64
const (
	IOUSBHostIsochronousTransferOptionsNone IOUSBHostIsochronousTransferOptions = 0
)

func (IOUSBHostIsochronousTransferOptions) String

type IOUSBHostObject

type IOUSBHostObject struct {
	foundation.NSObject
}

This class provides basic functionality for sending device requests and retrieving descriptors.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostobject

func IOUSBHostObjectFromID

func IOUSBHostObjectFromID(id objc.ID) *IOUSBHostObject

func (*IOUSBHostObject) AbortDeviceRequestsWithError

func (o *IOUSBHostObject) AbortDeviceRequestsWithError() (bool, error)

Aborts device requests synchronously.

func (*IOUSBHostObject) AbortDeviceRequestsWithOptionError

func (o *IOUSBHostObject) AbortDeviceRequestsWithOptionError(option IOUSBHostAbortOption) (bool, error)

Aborts device requests.

func (*IOUSBHostObject) CapabilityDescriptors

func (o *IOUSBHostObject) CapabilityDescriptors() unsafe.Pointer

@brief Return the capability descriptors of the device @discussion This method uses descriptorWithType to return the device's BOS descriptors @return Pointer to the BOS descriptor if found, otherwise nil.

func (*IOUSBHostObject) ConfigurationDescriptorWithConfigurationValueError

func (o *IOUSBHostObject) ConfigurationDescriptorWithConfigurationValueError(configurationValue uint) (unsafe.Pointer, error)

@brief Return the configuration descriptor with a specified value @discussion This method uses descriptorWithType to search for a configuration descriptor with a specific <code>bConfigurationValue</code> field. @param configurationValue Value to match @return Pointer of the configuration descriptor if found, otherwise nil. An IOReturn error code will be reported on failure.

func (*IOUSBHostObject) ConfigurationDescriptorWithIndexError

func (o *IOUSBHostObject) ConfigurationDescriptorWithIndexError(index uint) (unsafe.Pointer, error)

@brief Return the configuration descriptor at a specified index @discussion This method uses descriptorWithType to retrieve the configuration descriptor. @param index Descriptor index value @return Pointer of the configuration descriptor if found, otherwise nil. An IOReturn error code will be reported on failure.

func (*IOUSBHostObject) CurrentMicroframeWithTimeError

func (o *IOUSBHostObject) CurrentMicroframeWithTimeError(time_ *uint64) (uint64, error)

@brief Return the current microframe number of the USB controller @discussion This method will return the current microframe number of the USB controller. This is most useful for scheduling future isochronous requests. @param time If not nil, this will be updated with system time associated with the microframe. @return The current microframe number. Returns 0 on failure, with NSError populated with the IOReturn error code.

func (*IOUSBHostObject) DescriptorWithTypeLengthError

func (o *IOUSBHostObject) DescriptorWithTypeLengthError(type_ unsafe.Pointer, length *uint) (unsafe.Pointer, error)

Retrieves a descriptor with default arguments from the cache or the device.

func (*IOUSBHostObject) DescriptorWithTypeLengthIndexLanguageIDError

func (o *IOUSBHostObject) DescriptorWithTypeLengthIndexLanguageIDError(type_ unsafe.Pointer, length *uint, index uint, languageID uint) (unsafe.Pointer, error)

Retrieves a string descriptor from the cache or the device.

func (*IOUSBHostObject) DescriptorWithTypeLengthIndexLanguageIDRequestTypeRequestRecipientError

func (o *IOUSBHostObject) DescriptorWithTypeLengthIndexLanguageIDRequestTypeRequestRecipientError(type_ unsafe.Pointer, length *uint, index uint, languageID uint, requestType unsafe.Pointer, requestRecipient unsafe.Pointer) (unsafe.Pointer, error)

Retrieves a descriptor from the cache or the device.

func (*IOUSBHostObject) Destroy

func (o *IOUSBHostObject) Destroy()

Removes underlying allocations and connections from the USB host object.

func (*IOUSBHostObject) DestroyWithOptions

func (o *IOUSBHostObject) DestroyWithOptions(options IOUSBHostObjectDestroyOptions)

@brief Removes underlying allocations of the IOUSBHostObject object along with user client @discussion Extends <code>destroy</code> to take an options to modify the destroy behavior. Currently only the <code>IOUSBHostObjectDestroyOptionsDeviceSurrender</code> is defined to support surrendering ownersip of the kernel service. To be used when accepting the <code>kUSBHostMessageDeviceIsRequestingClose</code> message.

func (*IOUSBHostObject) DeviceAddress

func (o *IOUSBHostObject) DeviceAddress() uint

@brief Retrieve the current address of the device.

func (*IOUSBHostObject) DeviceDescriptor

func (o *IOUSBHostObject) DeviceDescriptor() unsafe.Pointer

@brief Return the device descriptor @discussion This method uses descriptorWithType to retrieve the device descriptor. @return Pointer to the device descriptor.

func (*IOUSBHostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler

func (o *IOUSBHostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data *foundation.NSMutableData, completionTimeout float64, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on the default control endpoint.

func (*IOUSBHostObject) EnqueueDeviceRequestDataErrorCompletionHandler

func (o *IOUSBHostObject) EnqueueDeviceRequestDataErrorCompletionHandler(request unsafe.Pointer, data *foundation.NSMutableData, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on the default control endpoint with a default completion timeout.

func (*IOUSBHostObject) EnqueueDeviceRequestErrorCompletionHandler

func (o *IOUSBHostObject) EnqueueDeviceRequestErrorCompletionHandler(request unsafe.Pointer, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on the default control endpoint without a data phase and a default timeout.

func (*IOUSBHostObject) FrameNumberWithTime

func (o *IOUSBHostObject) FrameNumberWithTime(time_ *uint64) uint64

Returns the current frame number of the USB controller.

func (*IOUSBHostObject) InitWithIOServiceOptionsQueueErrorInterestHandler

func (o *IOUSBHostObject) InitWithIOServiceOptionsQueueErrorInterestHandler(ioService uint, options IOUSBHostObjectInitOptions, queue *foundation.NSObject, error_ unsafe.Pointer, interestHandler func(*IOUSBHostObject, uint32, unsafe.Pointer)) *IOUSBHostObject

Creates a USB host object and sets up a communication channel to the kernel.

func (*IOUSBHostObject) InitWithIOServiceQueueErrorInterestHandler

func (o *IOUSBHostObject) InitWithIOServiceQueueErrorInterestHandler(ioService uint, queue *foundation.NSObject, error_ unsafe.Pointer, interestHandler func(*IOUSBHostObject, uint32, unsafe.Pointer)) *IOUSBHostObject

Creates a USB host object and sets up a default communication channel to the kernel.

func (*IOUSBHostObject) IoDataWithCapacityError

func (o *IOUSBHostObject) IoDataWithCapacityError(capacity uint) (*foundation.NSMutableData, error)

Allocates a buffer for input/output requests.

func (*IOUSBHostObject) IoService

func (o *IOUSBHostObject) IoService() uint

@brief Retrieve the IOUSBHostObject's io_service_t.

func (*IOUSBHostObject) Queue

func (o *IOUSBHostObject) Queue() *foundation.NSObject

@brief The dispatch queue that all asynchronous io will be serviced.

func (*IOUSBHostObject) ReferenceMicroframeWithTimeError

func (o *IOUSBHostObject) ReferenceMicroframeWithTimeError(time_ *uint64) (uint64, error)

@brief Return a recent microframe number of the USB controller @discussion This method will return a recent microframe number of the USB controller. This is most useful for scheduling future isochronous requests. @param time If not nil, this will be updated with system time associated with the microframe. @return A recent microframe number. Returns 0 on failure, with NSError populated with the IOReturn error code.

func (*IOUSBHostObject) SendDeviceRequestDataBytesTransferredCompletionTimeoutError

func (o *IOUSBHostObject) SendDeviceRequestDataBytesTransferredCompletionTimeoutError(request unsafe.Pointer, data *foundation.NSMutableData, bytesTransferred *uint, completionTimeout float64) (bool, error)

Sends a request on the default control endpoint.

func (*IOUSBHostObject) SendDeviceRequestDataBytesTransferredError

func (o *IOUSBHostObject) SendDeviceRequestDataBytesTransferredError(request unsafe.Pointer, data *foundation.NSMutableData, bytesTransferred *uint) (bool, error)

Sends a request on the default control endpoint with a default completion timeout.

func (*IOUSBHostObject) SendDeviceRequestError

func (o *IOUSBHostObject) SendDeviceRequestError(request unsafe.Pointer) (bool, error)

Sends a request on the default control endpoint without a data phase and default completion timeout.

func (*IOUSBHostObject) StringWithIndexError

func (o *IOUSBHostObject) StringWithIndexError(index uint) (*foundation.NSString, error)

Retrieves an English-language string from a string descriptor.

func (*IOUSBHostObject) StringWithIndexLanguageIDError

func (o *IOUSBHostObject) StringWithIndexLanguageIDError(index uint, languageID uint) (*foundation.NSString, error)

Retrieves a string from a string descriptor.

type IOUSBHostObjectDestroyOptions

type IOUSBHostObjectDestroyOptions uint64
const (
	IOUSBHostObjectDestroyOptionsNone            IOUSBHostObjectDestroyOptions = 0
	IOUSBHostObjectDestroyOptionsDeviceSurrender IOUSBHostObjectDestroyOptions = 1
)

func (IOUSBHostObjectDestroyOptions) String

type IOUSBHostObjectInitOptions

type IOUSBHostObjectInitOptions uint64

Options for initializing the host object.

const (
	// The default argument for initializing the host object.
	IOUSBHostObjectInitOptionsNone IOUSBHostObjectInitOptions = 0
	// The option to capture the device and terminate existing drivers.
	IOUSBHostObjectInitOptionsDeviceCapture IOUSBHostObjectInitOptions = 1
	IOUSBHostObjectInitOptionsDeviceSeize   IOUSBHostObjectInitOptions = 2
)

func (IOUSBHostObjectInitOptions) String

type IOUSBHostPipe

type IOUSBHostPipe struct {
	IOUSBHostIOSource
}

The class that sends control, bulk, interrupt, and isochronous input/output requests for function drivers, and manages stream capabilities.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhostpipe

func IOUSBHostPipeFromID

func IOUSBHostPipeFromID(id objc.ID) *IOUSBHostPipe

func (*IOUSBHostPipe) AbortWithError

func (o *IOUSBHostPipe) AbortWithError() (bool, error)

Aborts pending input/output requests synchronously.

func (*IOUSBHostPipe) AbortWithOptionError

func (o *IOUSBHostPipe) AbortWithOptionError(option IOUSBHostAbortOption) (bool, error)

Aborts pending input/output requests.

func (*IOUSBHostPipe) AdjustPipeWithDescriptorsError

func (o *IOUSBHostPipe) AdjustPipeWithDescriptorsError(descriptors *IOUSBHostIOSourceDescriptors) (bool, error)

Adjusts the behavior of periodic endpoints to consume a different amount of bus bandwidth.

func (*IOUSBHostPipe) ClearStallWithError

func (o *IOUSBHostPipe) ClearStallWithError() (bool, error)

Clears the halt condition of the pipe.

func (*IOUSBHostPipe) CopyStreamWithStreamIDError

func (o *IOUSBHostPipe) CopyStreamWithStreamIDError(streamID uint) (*IOUSBHostStream, error)

Returns the stream for a stream ID.

func (*IOUSBHostPipe) Descriptors

func (o *IOUSBHostPipe) Descriptors() *IOUSBHostIOSourceDescriptors

@brief Retrieve the current descriptor controlling the endpoint. @return IOUSBHostIOSourceDescriptors pointer

func (*IOUSBHostPipe) DisableStreamsWithError

func (o *IOUSBHostPipe) DisableStreamsWithError() (bool, error)

Disables streams for the pipe.

func (*IOUSBHostPipe) EnableStreamsWithError

func (o *IOUSBHostPipe) EnableStreamsWithError() (bool, error)

Enables streams for the pipe.

func (*IOUSBHostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data *foundation.NSMutableData, completionTimeout float64, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on a control endpoint.

func (*IOUSBHostPipe) EnqueueControlRequestDataErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueControlRequestDataErrorCompletionHandler(request unsafe.Pointer, data *foundation.NSMutableData, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on a control endpoint with a default completion timeout.

func (*IOUSBHostPipe) EnqueueControlRequestErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueControlRequestErrorCompletionHandler(request unsafe.Pointer, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues a request on a control endpoint without a data phase and a default completion timeout.

func (*IOUSBHostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler(data *foundation.NSMutableData, completionTimeout float64, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues an input/output request on the pipe.

func (*IOUSBHostPipe) EnqueueIORequestWithDataFrameListFrameListCountFirstFrameNumberErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueIORequestWithDataFrameListFrameListCountFirstFrameNumberErrorCompletionHandler(data *foundation.NSMutableData, frameList *IOUSBHostIsochronousFrame, frameListCount uint, firstFrameNumber uint64, error_ unsafe.Pointer, completionHandler func(int, *IOUSBHostIsochronousFrame)) bool

Enqueues a request on an isochronous endpoint.

func (*IOUSBHostPipe) EnqueueIORequestWithDataTransactionListTransactionListCountFirstFrameNumberOptionsErrorCompletionHandler

func (o *IOUSBHostPipe) EnqueueIORequestWithDataTransactionListTransactionListCountFirstFrameNumberOptionsErrorCompletionHandler(data *foundation.NSMutableData, transactionList *IOUSBHostIsochronousTransaction, transactionListCount uint, firstFrameNumber uint64, options IOUSBHostIsochronousTransferOptions, error_ unsafe.Pointer, completionHandler func(int, *IOUSBHostIsochronousTransaction)) bool

@brief Send a request on an isochronous endpoint @discussion This method is used to issue isochronous requests. The caller allocates and initializes an array of IOUSBHostIsochronousTransaction structures, which is used to describe the frames that will be transferred. See @link IOUSBHostIsochronousTransaction @/link for information regarding structure initialization requirements and usage. @param data An NSMutableData* to be used as the backing store for the I/O. @param transactionList Pointer to the first element in an IOUSBHostIsochronousTransaction array. The array must contain at least transactionListCount elements. @param transactionListCount Number of elements in <code>transactionList</code>. @param firstFrameNumber Frame number which this request should begin on. The current frame number can be queried via <code>[IOUSBHostObject frameNumberWithTime]</code> If 0, the transfer will start on the next available frame (XHCI only). @param options Flags that specify additional behavior for every transaction in this transfer. @param completionHandler an IOUSBHostIsochronousTransactionCompletionHandler @return YES on success, an IOReturn error code will be reported on failure

func (*IOUSBHostPipe) IdleTimeout

func (o *IOUSBHostPipe) IdleTimeout() float64

@brief Retrieve the current idle suspend timeout. See @link setIdleTimeout @/link @return The amount of time after all pipes are idle to wait before suspending the device,

func (*IOUSBHostPipe) OriginalDescriptors

func (o *IOUSBHostPipe) OriginalDescriptors() *IOUSBHostIOSourceDescriptors

@brief Retrieve the Original descriptor used when creating the pipe. @return IOUSBHostIOSourceDescriptors pointer

func (*IOUSBHostPipe) SendControlRequestDataBytesTransferredCompletionTimeoutError

func (o *IOUSBHostPipe) SendControlRequestDataBytesTransferredCompletionTimeoutError(request unsafe.Pointer, data *foundation.NSMutableData, bytesTransferred *uint, completionTimeout float64) (bool, error)

Sends a request on a control endpoint.

func (*IOUSBHostPipe) SendControlRequestDataBytesTransferredError

func (o *IOUSBHostPipe) SendControlRequestDataBytesTransferredError(request unsafe.Pointer, data *foundation.NSMutableData, bytesTransferred *uint) (bool, error)

Sends a request on a control endpoint with a default timeout.

func (*IOUSBHostPipe) SendControlRequestError

func (o *IOUSBHostPipe) SendControlRequestError(request unsafe.Pointer) (bool, error)

Sends a request on a control endpoint without a data phase and a default completion timeout.

func (*IOUSBHostPipe) SendIORequestWithDataBytesTransferredCompletionTimeoutError

func (o *IOUSBHostPipe) SendIORequestWithDataBytesTransferredCompletionTimeoutError(data *foundation.NSMutableData, bytesTransferred *uint, completionTimeout float64) (bool, error)

Sends an input/output request on the pipe.

func (*IOUSBHostPipe) SendIORequestWithDataFrameListFrameListCountFirstFrameNumberError

func (o *IOUSBHostPipe) SendIORequestWithDataFrameListFrameListCountFirstFrameNumberError(data *foundation.NSMutableData, frameList *IOUSBHostIsochronousFrame, frameListCount uint, firstFrameNumber uint64) (bool, error)

Sends a request on an isochronous endpoint.

func (*IOUSBHostPipe) SendIORequestWithDataTransactionListTransactionListCountFirstFrameNumberOptionsError

func (o *IOUSBHostPipe) SendIORequestWithDataTransactionListTransactionListCountFirstFrameNumberOptionsError(data *foundation.NSMutableData, transactionList *IOUSBHostIsochronousTransaction, transactionListCount uint, firstFrameNumber uint64, options IOUSBHostIsochronousTransferOptions) (bool, error)

@brief Send a request on an isochronous endpoint @discussion This method is used to issue isochronous requests. The caller allocates and initializes an array of IOUSBHostIsochronousTransaction structures, which is used to describe the frames that will be transferred. See @link IOUSBHostIsochronousTransaction @/link for information regarding structure initialization requirements and usage. @param data An NSMutableData* to be used as the backing store for the I/O. @param transactionList Pointer to the first element in an IOUSBHostIsochronousTransaction array. The array must contain at least transactionListCount elements. @param transactionListCount Number of elements in <code>transactionList</code>. @param firstFrameNumber Frame number which this request should begin on. The current frame number can be queried via <code>[IOUSBHostObject getFrameNumber]</code> If 0, the transfer will start on the next available frame (XHCI only). @param options Flags that specify additional behavior for every transaction in this transfer. See @link IOUSBHostIsochronousTransferOptions @/link for more details. @return YES on success, an IOReturn error code will be reported on failure

func (*IOUSBHostPipe) SetIdleTimeoutError

func (o *IOUSBHostPipe) SetIdleTimeoutError(idleTimeout float64) (bool, error)

Sets the desired idle suspend timeout for the interface.

type IOUSBHostStream

type IOUSBHostStream struct {
	IOUSBHostIOSource
}

The class responsible for sending stream data for function drivers.

Apple documentation: https://developer.apple.com/documentation/iousbhost/iousbhoststream

func IOUSBHostStreamFromID

func IOUSBHostStreamFromID(id objc.ID) *IOUSBHostStream

func (*IOUSBHostStream) AbortWithError

func (o *IOUSBHostStream) AbortWithError() (bool, error)

Aborts pending input/output requests synchronously.

func (*IOUSBHostStream) AbortWithOptionError

func (o *IOUSBHostStream) AbortWithOptionError(option IOUSBHostAbortOption) (bool, error)

Aborts pending input/output requests.

func (*IOUSBHostStream) EnqueueIORequestWithDataErrorCompletionHandler

func (o *IOUSBHostStream) EnqueueIORequestWithDataErrorCompletionHandler(data *foundation.NSMutableData, error_ unsafe.Pointer, completionHandler func(int, uint)) bool

Enqueues an input/output request on the stream.

func (*IOUSBHostStream) HostPipe

func (o *IOUSBHostStream) HostPipe() *IOUSBHostPipe

@brief Returns the IOUSBHostPipe this stream was created from @return IOUSBHostPipe pointer

func (*IOUSBHostStream) SendIORequestWithDataBytesTransferredError

func (o *IOUSBHostStream) SendIORequestWithDataBytesTransferredError(data *foundation.NSMutableData, bytesTransferred *uint) (bool, error)

Sends an input/output request on the stream.

func (*IOUSBHostStream) StreamID

func (o *IOUSBHostStream) StreamID() uint

@brief Returns streamID associated with this IOUSBHostStream. @return streamID

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL