iousbhost

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package iousbhost provides a fluent Go API over the macOS IOUSBHost framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

View Source
const (
	HostCICapabilitiesMessageControlPortCount                  = 983040
	HostCICapabilitiesMessageControlPortCountPhase             = 16
	HostCICapabilitiesMessageData0CommandTimeoutThreshold      = 3
	HostCICapabilitiesMessageData0CommandTimeoutThresholdPhase = 0
	HostCICapabilitiesMessageData0ConnectionLatency            = 240
	HostCICapabilitiesMessageData0ConnectionLatencyPhase       = 4
	HostCICommandMessageControlStatus                          = 3840
	HostCICommandMessageControlStatusPhase                     = 8
	HostCICommandMessageData0DeviceAddress                     = 255
	HostCICommandMessageData0DeviceAddressPhase                = 0
	HostCICommandMessageData0EndpointAddress                   = 65280
	HostCICommandMessageData0EndpointAddressPhase              = 8
	HostCICommandMessageData0RootPort                          = 15
	HostCICommandMessageData0RootPortPhase                     = 0
	HostCICommandMessageData0StreamID                          = 4294901760
	HostCICommandMessageData0StreamIDPhase                     = 16
	HostCIDeviceCreateCommandData0RootPort                     = 15
	HostCIDeviceCreateCommandData0RootPortPhase                = 0
	HostCIDeviceCreateCommandData0Route                        = 16777200
	HostCIDeviceCreateCommandData0RoutePhase                   = 4
	HostCIDeviceCreateCommandData1DeviceAddress                = 255
	HostCIDeviceCreateCommandData1DeviceAddressPhase           = 0
	HostCIDeviceUpdateCommandData1DescriptorAddress            = 18446744073709551615
	HostCIDeviceUpdateCommandData1DescriptorAddressPhase       = 0
	HostCIDoorbellDeviceAddress                                = 255
	HostCIDoorbellDeviceAddressPhase                           = 0
	HostCIDoorbellEndpointAddress                              = 65280
	HostCIDoorbellEndpointAddressPhase                         = 8
	HostCIDoorbellStreamID                                     = 4294901760
	HostCIDoorbellStreamIDPhase                                = 16
	HostCIEndpointCreateCommandData1Descriptor                 = 18446744073709551615
	HostCIEndpointCreateCommandData1DescriptorPhase            = 0
	HostCIEndpointResetCommandData1ClearState                  = 1
	HostCIEndpointSetNextTransferCommandData1Address           = 18446744073709551615
	HostCIEndpointSetNextTransferCommandData1AddressPhase      = 0
	HostCIEndpointUpdateCommandData1Descriptor                 = 18446744073709551615
	HostCIEndpointUpdateCommandData1DescriptorPhase            = 0
	HostCIIsochronousTransferControlASAP                       = 16777216
	HostCIIsochronousTransferControlFrameNumber                = 16711680
	HostCIIsochronousTransferControlFrameNumberPhase           = 16
	HostCIIsochronousTransferData0Length                       = 268435455
	HostCIIsochronousTransferData0LengthPhase                  = 0
	HostCIIsochronousTransferData1Buffer                       = 18446744073709551615
	HostCIIsochronousTransferData1BufferPhase                  = 0
	HostCILinkData1TransferStructureAddress                    = 18446744073709551615
	HostCILinkData1TransferStructureAddressPhase               = 0
	HostCIMessageControlNoResponse                             = 16384
	HostCIMessageControlStatus                                 = 3840
	HostCIMessageControlStatusPhase                            = 8
	HostCIMessageControlType                                   = 63
	HostCIMessageControlTypePhase                              = 0
	HostCIMessageControlValid                                  = 32768
	HostCINormalTransferData0Length                            = 268435455
	HostCINormalTransferData0LengthPhase                       = 0
	HostCINormalTransferData1Buffer                            = 18446744073709551615
	HostCINormalTransferData1BufferPhase                       = 0
	HostCIPortCapabilitiesMessageControlConnectorType          = 4278190080
	HostCIPortCapabilitiesMessageControlConnectorTypePhase     = 24
	HostCIPortCapabilitiesMessageControlInternalConnector      = 8388608
	HostCIPortCapabilitiesMessageControlPortNumber             = 983040
	HostCIPortCapabilitiesMessageControlPortNumberPhase        = 16
	HostCIPortCapabilitiesMessageData0MaxPower                 = 255
	HostCIPortCapabilitiesMessageData0MaxPowerPhase            = 0
	HostCIPortEventMessageData0PortNumber                      = 15
	HostCIPortEventMessageData0PortNumberPhase                 = 0
	HostCIPortStatusChangeMask                                 = 1441792
	HostCIPortStatusCommandData1ChangeMask                     = 1441792
	HostCIPortStatusCommandData1ConnectChange                  = 262144
	HostCIPortStatusCommandData1Connected                      = 4
	HostCIPortStatusCommandData1LinkState                      = 240
	HostCIPortStatusCommandData1LinkStateChange                = 1048576
	HostCIPortStatusCommandData1LinkStatePhase                 = 4
	HostCIPortStatusCommandData1Overcurrent                    = 2
	HostCIPortStatusCommandData1OvercurrentChange              = 131072
	HostCIPortStatusCommandData1Powered                        = 1
	HostCIPortStatusCommandData1Speed                          = 1792
	HostCIPortStatusCommandData1SpeedPhase                     = 8
	HostCIPortStatusConnectChange                              = 262144
	HostCIPortStatusConnected                                  = 4
	HostCIPortStatusLinkState                                  = 240
	HostCIPortStatusLinkStateChange                            = 1048576
	HostCIPortStatusLinkStatePhase                             = 4
	HostCIPortStatusOvercurrent                                = 2
	HostCIPortStatusOvercurrentChange                          = 131072
	HostCIPortStatusPowered                                    = 1
	HostCIPortStatusSpeed                                      = 1792
	HostCIPortStatusSpeedPhase                                 = 8
	HostCISetupTransferData1bRequest                           = 65280
	HostCISetupTransferData1bRequestPhase                      = 8
	HostCISetupTransferData1bmRequestType                      = 255
	HostCISetupTransferData1bmRequestTypePhase                 = 0
	HostCISetupTransferData1wIndex                             = 281470681743360
	HostCISetupTransferData1wIndexPhase                        = 32
	HostCISetupTransferData1wLength                            = 18446462598732840960
	HostCISetupTransferData1wLengthPhase                       = 48
	HostCISetupTransferData1wValue                             = 4294901760
	HostCISetupTransferData1wValuePhase                        = 16
	HostCITransferCompletionMessageControlDeviceAddress        = 16711680
	HostCITransferCompletionMessageControlDeviceAddressPhase   = 16
	HostCITransferCompletionMessageControlEndpointAddress      = 4278190080
	HostCITransferCompletionMessageControlEndpointAddressPhase = 24
	HostCITransferCompletionMessageControlStatus               = 3840
	HostCITransferCompletionMessageControlStatusPhase          = 8
	HostCITransferCompletionMessageData0TransferLength         = 268435455
	HostCITransferCompletionMessageData0TransferLengthPhase    = 0
	HostCITransferCompletionMessageData1TransferStructure      = 18446744073709551615
	HostCITransferCompletionMessageData1TransferStructurePhase = 0
)

Variables

This section is empty.

Functions

func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray added in v0.17.0

func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, deviceClass obj.Object, deviceSubclass obj.Object, deviceProtocol obj.Object, speed obj.Object, productIDArray obj.Object) corefoundation.CFMutableDictionaryRef

CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray creates a matching dictionary to find a USB device.

func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray added in v0.17.0

func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, interfaceNumber obj.Object, configurationValue obj.Object, interfaceClass obj.Object, interfaceSubclass obj.Object, interfaceProtocol obj.Object, speed obj.Object, productIDArray obj.Object) corefoundation.CFMutableDictionaryRef

CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray creates a matching dictionary to find a USB interface.

func IOUSBGetBillboardDescriptor

func IOUSBGetBillboardDescriptor(bosDescriptor *IOUSBBOSDescriptor) unsafe.Pointer

IOUSBGetBillboardDescriptor calls the IOUSBHost framework function IOUSBGetBillboardDescriptor.

func IOUSBGetConfigurationMaxPowerMilliAmps

func IOUSBGetConfigurationMaxPowerMilliAmps(usbDeviceSpeed uint32, descriptor *IOUSBConfigurationDescriptor) uint32

IOUSBGetConfigurationMaxPowerMilliAmps calls the IOUSBHost framework function IOUSBGetConfigurationMaxPowerMilliAmps.

func IOUSBGetEndpointAddress

func IOUSBGetEndpointAddress(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointAddress calls the IOUSBHost framework function IOUSBGetEndpointAddress.

func IOUSBGetEndpointBurstSize

func IOUSBGetEndpointBurstSize(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor, companionDescriptor *IOUSBSuperSpeedEndpointCompanionDescriptor, sspCompanionDescriptor *IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor) uint32

IOUSBGetEndpointBurstSize calls the IOUSBHost framework function IOUSBGetEndpointBurstSize.

func IOUSBGetEndpointDirection

func IOUSBGetEndpointDirection(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointDirection calls the IOUSBHost framework function IOUSBGetEndpointDirection.

func IOUSBGetEndpointIntervalEncodedMicroframes

func IOUSBGetEndpointIntervalEncodedMicroframes(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor) uint32

IOUSBGetEndpointIntervalEncodedMicroframes calls the IOUSBHost framework function IOUSBGetEndpointIntervalEncodedMicroframes.

func IOUSBGetEndpointIntervalFrames

func IOUSBGetEndpointIntervalFrames(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor) uint32

IOUSBGetEndpointIntervalFrames calls the IOUSBHost framework function IOUSBGetEndpointIntervalFrames.

func IOUSBGetEndpointIntervalMicroframes

func IOUSBGetEndpointIntervalMicroframes(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor) uint32

IOUSBGetEndpointIntervalMicroframes calls the IOUSBHost framework function IOUSBGetEndpointIntervalMicroframes.

func IOUSBGetEndpointMaxPacketSize

func IOUSBGetEndpointMaxPacketSize(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor) uint16

IOUSBGetEndpointMaxPacketSize calls the IOUSBHost framework function IOUSBGetEndpointMaxPacketSize.

func IOUSBGetEndpointMaxStreams

func IOUSBGetEndpointMaxStreams(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor, companionDescriptor *IOUSBSuperSpeedEndpointCompanionDescriptor) uint32

IOUSBGetEndpointMaxStreams calls the IOUSBHost framework function IOUSBGetEndpointMaxStreams.

func IOUSBGetEndpointMaxStreamsEncoded

func IOUSBGetEndpointMaxStreamsEncoded(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor, companionDescriptor *IOUSBSuperSpeedEndpointCompanionDescriptor) uint32

IOUSBGetEndpointMaxStreamsEncoded calls the IOUSBHost framework function IOUSBGetEndpointMaxStreamsEncoded.

func IOUSBGetEndpointMult

func IOUSBGetEndpointMult(usbDeviceSpeed uint32, descriptor *IOUSBEndpointDescriptor, companionDescriptor *IOUSBSuperSpeedEndpointCompanionDescriptor, sspCompanionDescriptor *IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor) uint8

IOUSBGetEndpointMult calls the IOUSBHost framework function IOUSBGetEndpointMult.

func IOUSBGetEndpointNumber

func IOUSBGetEndpointNumber(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointNumber calls the IOUSBHost framework function IOUSBGetEndpointNumber.

func IOUSBGetEndpointSynchronizationType

func IOUSBGetEndpointSynchronizationType(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointSynchronizationType calls the IOUSBHost framework function IOUSBGetEndpointSynchronizationType.

func IOUSBGetEndpointType

func IOUSBGetEndpointType(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointType calls the IOUSBHost framework function IOUSBGetEndpointType.

func IOUSBGetEndpointUsageType

func IOUSBGetEndpointUsageType(descriptor *IOUSBEndpointDescriptor) uint8

IOUSBGetEndpointUsageType calls the IOUSBHost framework function IOUSBGetEndpointUsageType.

func IOUSBGetPlatformCapabilityDescriptor

func IOUSBGetPlatformCapabilityDescriptor(bosDescriptor *IOUSBBOSDescriptor) unsafe.Pointer

IOUSBGetPlatformCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetPlatformCapabilityDescriptor.

func IOUSBGetPlatformCapabilityDescriptorWithUUID

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

IOUSBGetPlatformCapabilityDescriptorWithUUID calls the IOUSBHost framework function IOUSBGetPlatformCapabilityDescriptorWithUUID.

func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor

func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor(bosDescriptor *IOUSBBOSDescriptor) unsafe.Pointer

IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor.

func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor

func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor(bosDescriptor *IOUSBBOSDescriptor) unsafe.Pointer

IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor.

func IOUSBHostCIControllerStateToString

func IOUSBHostCIControllerStateToString(controllerState HostCIControllerState) string

IOUSBHostCIControllerStateToString calls the IOUSBHost framework function IOUSBHostCIControllerStateToString.

func IOUSBHostCIDeviceSpeedToString

func IOUSBHostCIDeviceSpeedToString(speed HostCIDeviceSpeed) string

IOUSBHostCIDeviceSpeedToString calls the IOUSBHost framework function IOUSBHostCIDeviceSpeedToString.

func IOUSBHostCIDeviceStateToString

func IOUSBHostCIDeviceStateToString(deviceState HostCIDeviceState) string

IOUSBHostCIDeviceStateToString calls the IOUSBHost framework function IOUSBHostCIDeviceStateToString.

func IOUSBHostCIEndpointStateToString

func IOUSBHostCIEndpointStateToString(endpointState HostCIEndpointState) string

IOUSBHostCIEndpointStateToString calls the IOUSBHost framework function IOUSBHostCIEndpointStateToString.

func IOUSBHostCIExceptionTypeToString

func IOUSBHostCIExceptionTypeToString(exceptionType HostCIExceptionType) string

IOUSBHostCIExceptionTypeToString calls the IOUSBHost framework function IOUSBHostCIExceptionTypeToString.

func IOUSBHostCILinkStateEnabled

func IOUSBHostCILinkStateEnabled(linkState HostCILinkState) bool

IOUSBHostCILinkStateEnabled calls the IOUSBHost framework function IOUSBHostCILinkStateEnabled.

func IOUSBHostCILinkStateToString

func IOUSBHostCILinkStateToString(linkState HostCILinkState) string

IOUSBHostCILinkStateToString calls the IOUSBHost framework function IOUSBHostCILinkStateToString.

func IOUSBHostCIMessageStatusToIOReturn

func IOUSBHostCIMessageStatusToIOReturn(status HostCIMessageStatus) int

IOUSBHostCIMessageStatusToIOReturn calls the IOUSBHost framework function IOUSBHostCIMessageStatusToIOReturn.

func IOUSBHostCIMessageStatusToString

func IOUSBHostCIMessageStatusToString(status HostCIMessageStatus) string

IOUSBHostCIMessageStatusToString calls the IOUSBHost framework function IOUSBHostCIMessageStatusToString.

func IOUSBHostCIMessageTypeToString

func IOUSBHostCIMessageTypeToString(type_ HostCIMessageType) string

IOUSBHostCIMessageTypeToString calls the IOUSBHost framework function IOUSBHostCIMessageTypeToString.

func IOUSBHostCIPortStateToString

func IOUSBHostCIPortStateToString(portState HostCIPortState) string

IOUSBHostCIPortStateToString calls the IOUSBHost framework function IOUSBHostCIPortStateToString.

func IOUSBHostDefaultControlCompletionTimeout

func IOUSBHostDefaultControlCompletionTimeout() float64

IOUSBHostDefaultControlCompletionTimeout returns the value of the constant IOUSBHostDefaultControlCompletionTimeout.

func IOUSBHostDevicePropertyKeyContainerID

func IOUSBHostDevicePropertyKeyContainerID() obj.Object

IOUSBHostDevicePropertyKeyContainerID returns the string constant IOUSBHostDevicePropertyKeyContainerID, for use as a dictionary key or argument.

func IOUSBHostDevicePropertyKeyCurrentConfiguration

func IOUSBHostDevicePropertyKeyCurrentConfiguration() obj.Object

IOUSBHostDevicePropertyKeyCurrentConfiguration returns the string constant IOUSBHostDevicePropertyKeyCurrentConfiguration, for use as a dictionary key or argument.

func IOUSBHostDevicePropertyKeySerialNumberString

func IOUSBHostDevicePropertyKeySerialNumberString() obj.Object

IOUSBHostDevicePropertyKeySerialNumberString returns the string constant IOUSBHostDevicePropertyKeySerialNumberString, for use as a dictionary key or argument.

func IOUSBHostDevicePropertyKeyVendorString

func IOUSBHostDevicePropertyKeyVendorString() obj.Object

IOUSBHostDevicePropertyKeyVendorString returns the string constant IOUSBHostDevicePropertyKeyVendorString, for use as a dictionary key or argument.

func IOUSBHostDeviceRequestType

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

IOUSBHostDeviceRequestType calls the IOUSBHost framework function IOUSBHostDeviceRequestType.

func IOUSBHostErrorDomain

func IOUSBHostErrorDomain() obj.Object

IOUSBHostErrorDomain returns the string constant IOUSBHostErrorDomain, for use as a dictionary key or argument.

func IOUSBHostInterfacePropertyKeyAlternateSetting

func IOUSBHostInterfacePropertyKeyAlternateSetting() obj.Object

IOUSBHostInterfacePropertyKeyAlternateSetting returns the string constant IOUSBHostInterfacePropertyKeyAlternateSetting, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyConfigurationValue

func IOUSBHostMatchingPropertyKeyConfigurationValue() obj.Object

IOUSBHostMatchingPropertyKeyConfigurationValue returns the string constant IOUSBHostMatchingPropertyKeyConfigurationValue, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyDeviceClass

func IOUSBHostMatchingPropertyKeyDeviceClass() obj.Object

IOUSBHostMatchingPropertyKeyDeviceClass returns the string constant IOUSBHostMatchingPropertyKeyDeviceClass, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyDeviceProtocol

func IOUSBHostMatchingPropertyKeyDeviceProtocol() obj.Object

IOUSBHostMatchingPropertyKeyDeviceProtocol returns the string constant IOUSBHostMatchingPropertyKeyDeviceProtocol, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber

func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber() obj.Object

IOUSBHostMatchingPropertyKeyDeviceReleaseNumber returns the string constant IOUSBHostMatchingPropertyKeyDeviceReleaseNumber, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyDeviceSubClass

func IOUSBHostMatchingPropertyKeyDeviceSubClass() obj.Object

IOUSBHostMatchingPropertyKeyDeviceSubClass returns the string constant IOUSBHostMatchingPropertyKeyDeviceSubClass, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyInterfaceClass

func IOUSBHostMatchingPropertyKeyInterfaceClass() obj.Object

IOUSBHostMatchingPropertyKeyInterfaceClass returns the string constant IOUSBHostMatchingPropertyKeyInterfaceClass, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyInterfaceNumber

func IOUSBHostMatchingPropertyKeyInterfaceNumber() obj.Object

IOUSBHostMatchingPropertyKeyInterfaceNumber returns the string constant IOUSBHostMatchingPropertyKeyInterfaceNumber, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyInterfaceProtocol

func IOUSBHostMatchingPropertyKeyInterfaceProtocol() obj.Object

IOUSBHostMatchingPropertyKeyInterfaceProtocol returns the string constant IOUSBHostMatchingPropertyKeyInterfaceProtocol, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyInterfaceSubClass

func IOUSBHostMatchingPropertyKeyInterfaceSubClass() obj.Object

IOUSBHostMatchingPropertyKeyInterfaceSubClass returns the string constant IOUSBHostMatchingPropertyKeyInterfaceSubClass, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyProductID

func IOUSBHostMatchingPropertyKeyProductID() obj.Object

IOUSBHostMatchingPropertyKeyProductID returns the string constant IOUSBHostMatchingPropertyKeyProductID, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyProductIDArray

func IOUSBHostMatchingPropertyKeyProductIDArray() obj.Object

IOUSBHostMatchingPropertyKeyProductIDArray returns the string constant IOUSBHostMatchingPropertyKeyProductIDArray, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyProductIDMask

func IOUSBHostMatchingPropertyKeyProductIDMask() obj.Object

IOUSBHostMatchingPropertyKeyProductIDMask returns the string constant IOUSBHostMatchingPropertyKeyProductIDMask, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeySpeed

func IOUSBHostMatchingPropertyKeySpeed() obj.Object

IOUSBHostMatchingPropertyKeySpeed returns the string constant IOUSBHostMatchingPropertyKeySpeed, for use as a dictionary key or argument.

func IOUSBHostMatchingPropertyKeyVendorID

func IOUSBHostMatchingPropertyKeyVendorID() obj.Object

IOUSBHostMatchingPropertyKeyVendorID returns the string constant IOUSBHostMatchingPropertyKeyVendorID, for use as a dictionary key or argument.

func IOUSBHostPropertyKeyLocationID

func IOUSBHostPropertyKeyLocationID() obj.Object

IOUSBHostPropertyKeyLocationID returns the string constant IOUSBHostPropertyKeyLocationID, for use as a dictionary key or argument.

func IOUSBHostVersionNumber

func IOUSBHostVersionNumber() float64

IOUSBHostVersionNumber returns the value of the constant IOUSBHostVersionNumber.

func IOUSBHostVersionString

func IOUSBHostVersionString() uintptr

IOUSBHostVersionString returns the address of the symbol IOUSBHostVersionString.

Types

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type HostAbortOption added in v0.17.0

type HostAbortOption uint64

Options for aborting pending input/output requests.

const (
	// The option to abort input/output requests asynchronously.
	HostAbortOptionAsynchronous HostAbortOption = 0
	// The option to abort input/output requests synchronously.
	HostAbortOptionSynchronous HostAbortOption = 1
)

func (HostAbortOption) String added in v0.17.0

func (e HostAbortOption) String() string

String returns the HostAbortOption constant's name, or its numeric form when the value is not a known constant.

type HostCIControllerState added in v0.17.0

type HostCIControllerState int32

Host controller state managed by IOUSBHostCIControllerStateMachine 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 (
	HostCIControllerStateOff    HostCIControllerState = 0
	HostCIControllerStatePaused HostCIControllerState = 1
	HostCIControllerStateActive HostCIControllerState = 2
)

func (HostCIControllerState) String added in v0.17.0

func (e HostCIControllerState) String() string

String returns the HostCIControllerState constant's name, or its numeric form when the value is not a known constant.

type HostCIControllerStateMachine added in v0.17.0

type HostCIControllerStateMachine struct {
	objref.Handle
}

HostCIControllerStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIControllerStateMachine.

The object representing the state of a user-mode USB host controller 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.

func HostCIControllerStateMachineFromID added in v0.17.0

func HostCIControllerStateMachineFromID(id objc.ID) *HostCIControllerStateMachine

HostCIControllerStateMachineFromID adopts an existing Objective-C object as a HostCIControllerStateMachine (nil for 0), retaining it and registering a release finalizer.

func NewHostCIControllerStateMachineWithInterface added in v0.17.0

func NewHostCIControllerStateMachineWithInterface(interface_ *HostControllerInterface) (result *HostCIControllerStateMachine, err error)

NewHostCIControllerStateMachineWithInterface initializes an IOUSBHostCIControllerStateMachine object The IOUSBHostCIControllerStateMachine defaults to the IOUSBHostCIControllerStateOff state.

func (*HostCIControllerStateMachine) ControllerInterface added in v0.17.0

func (hccsm *HostCIControllerStateMachine) ControllerInterface() *HostControllerInterface

ControllerInterface returns the controller interface.

func (*HostCIControllerStateMachine) ControllerState added in v0.17.0

func (hccsm *HostCIControllerStateMachine) ControllerState() HostCIControllerState

ControllerState returns the controller state.

func (*HostCIControllerStateMachine) Description added in v0.17.0

func (hccsm *HostCIControllerStateMachine) Description() string

Description returns the object's -description text.

func (*HostCIControllerStateMachine) EnqueueUpdatedFrameTimestamp added in v0.17.0

func (hccsm *HostCIControllerStateMachine) EnqueueUpdatedFrameTimestamp(frame uint64, timestamp uint64) error

EnqueueUpdatedFrameTimestamp enqueue frame and timestamp messages for delivery to the kernel driver 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.

func (*HostCIControllerStateMachine) InspectCommand added in v0.18.0

func (hccsm *HostCIControllerStateMachine) InspectCommand(command *IOUSBHostCIMessage) error

InspectCommand inspect an IOUSBHostCIMessage command The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state.

func (*HostCIControllerStateMachine) IsEqual added in v0.17.0

func (hccsm *HostCIControllerStateMachine) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostCIControllerStateMachine) IsKind added in v0.17.0

func (hccsm *HostCIControllerStateMachine) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostCIControllerStateMachine) RespondToCommandStatus added in v0.18.0

func (hccsm *HostCIControllerStateMachine) RespondToCommandStatus(command *IOUSBHostCIMessage, status HostCIMessageStatus) error

RespondToCommandStatus advance the state machine and respond to an IOUSBHostCIMessage command 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.

func (*HostCIControllerStateMachine) RespondToCommandStatusFrameTimestamp added in v0.18.0

func (hccsm *HostCIControllerStateMachine) RespondToCommandStatusFrameTimestamp(command *IOUSBHostCIMessage, status HostCIMessageStatus, frame uint64, timestamp uint64) error

RespondToCommandStatusFrameTimestamp advance the state machine and respond to an IOUSBHostCIMessageTypeControllerFrameNumber command 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.

func (*HostCIControllerStateMachine) String added in v0.17.0

func (hccsm *HostCIControllerStateMachine) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type HostCIDeviceSpeed added in v0.17.0

type HostCIDeviceSpeed int32

Values to represent a connected device speed, to be used in IOUSBHostCIMessages and IOUSBHostsCIPortStatus

const (
	HostCIDeviceSpeedNone         HostCIDeviceSpeed = 0
	HostCIDeviceSpeedFull         HostCIDeviceSpeed = 1
	HostCIDeviceSpeedLow          HostCIDeviceSpeed = 2
	HostCIDeviceSpeedHigh         HostCIDeviceSpeed = 3
	HostCIDeviceSpeedSuper        HostCIDeviceSpeed = 4
	HostCIDeviceSpeedSuperPlus    HostCIDeviceSpeed = 5
	HostCIDeviceSpeedSuperPlusBy2 HostCIDeviceSpeed = 6
	HostCIDeviceSpeedOther        HostCIDeviceSpeed = 7
)

func (HostCIDeviceSpeed) String added in v0.17.0

func (e HostCIDeviceSpeed) String() string

String returns the HostCIDeviceSpeed constant's name, or its numeric form when the value is not a known constant.

type HostCIDeviceState added in v0.17.0

type HostCIDeviceState int32

Device state managed by IOUSBHostCIDeviceStateMachine 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 (
	HostCIDeviceStateDestroyed HostCIDeviceState = 0
	HostCIDeviceStatePaused    HostCIDeviceState = 1
	HostCIDeviceStateActive    HostCIDeviceState = 2
)

func (HostCIDeviceState) String added in v0.17.0

func (e HostCIDeviceState) String() string

String returns the HostCIDeviceState constant's name, or its numeric form when the value is not a known constant.

type HostCIDeviceStateMachine added in v0.17.0

type HostCIDeviceStateMachine struct {
	objref.Handle
}

HostCIDeviceStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIDeviceStateMachine.

The object representing the state of a user-mode USB host controller device 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.

func HostCIDeviceStateMachineFromID added in v0.17.0

func HostCIDeviceStateMachineFromID(id objc.ID) *HostCIDeviceStateMachine

HostCIDeviceStateMachineFromID adopts an existing Objective-C object as a HostCIDeviceStateMachine (nil for 0), retaining it and registering a release finalizer.

func NewHostCIDeviceStateMachineWithInterfaceCommand added in v0.18.0

func NewHostCIDeviceStateMachineWithInterfaceCommand(interface_ *HostControllerInterface, command *IOUSBHostCIMessage) (result *HostCIDeviceStateMachine, err error)

NewHostCIDeviceStateMachineWithInterfaceCommand initializes an IOUSBHostCIDeviceStateMachine object The IOUSBHostCIDeviceStateMachine defaults to the IOUSBHostCIDeviceStateActive state.

func (*HostCIDeviceStateMachine) CompleteRoute added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) CompleteRoute() int

CompleteRoute returns the complete route.

func (*HostCIDeviceStateMachine) ControllerInterface added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) ControllerInterface() *HostControllerInterface

ControllerInterface returns the controller interface.

func (*HostCIDeviceStateMachine) Description added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) Description() string

Description returns the object's -description text.

func (*HostCIDeviceStateMachine) DeviceAddress added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) DeviceAddress() int

DeviceAddress returns the device address.

func (*HostCIDeviceStateMachine) DeviceState added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) DeviceState() HostCIDeviceState

DeviceState returns the device state.

func (*HostCIDeviceStateMachine) InspectCommand added in v0.18.0

func (hcdsm *HostCIDeviceStateMachine) InspectCommand(command *IOUSBHostCIMessage) error

InspectCommand inspect an IOUSBHostCIMessage command The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state.

func (*HostCIDeviceStateMachine) IsEqual added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostCIDeviceStateMachine) IsKind added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostCIDeviceStateMachine) RespondToCommandStatus added in v0.18.0

func (hcdsm *HostCIDeviceStateMachine) RespondToCommandStatus(command *IOUSBHostCIMessage, status HostCIMessageStatus) error

RespondToCommandStatus advance the state machine and respond to an IOUSBHostCIMessage command 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.

func (*HostCIDeviceStateMachine) RespondToCommandStatusDeviceAddress added in v0.18.0

func (hcdsm *HostCIDeviceStateMachine) RespondToCommandStatusDeviceAddress(command *IOUSBHostCIMessage, status HostCIMessageStatus, deviceAddress int) error

RespondToCommandStatusDeviceAddress wraps the corresponding Objective-C method.

func (*HostCIDeviceStateMachine) String added in v0.17.0

func (hcdsm *HostCIDeviceStateMachine) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type HostCIEndpointState added in v0.17.0

type HostCIEndpointState int32

Endpoint state managed by IOUSBHostCIEndpointStateMachine 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 (
	HostCIEndpointStateDestroyed HostCIEndpointState = 0
	HostCIEndpointStateHalted    HostCIEndpointState = 1
	HostCIEndpointStatePaused    HostCIEndpointState = 2
	HostCIEndpointStateActive    HostCIEndpointState = 3
)

func (HostCIEndpointState) String added in v0.17.0

func (e HostCIEndpointState) String() string

String returns the HostCIEndpointState constant's name, or its numeric form when the value is not a known constant.

type HostCIEndpointStateMachine added in v0.17.0

type HostCIEndpointStateMachine struct {
	objref.Handle
}

HostCIEndpointStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIEndpointStateMachine.

The object representing the state of a user-mode USB host controller endpoint 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.

func HostCIEndpointStateMachineFromID added in v0.17.0

func HostCIEndpointStateMachineFromID(id objc.ID) *HostCIEndpointStateMachine

HostCIEndpointStateMachineFromID adopts an existing Objective-C object as a HostCIEndpointStateMachine (nil for 0), retaining it and registering a release finalizer.

func NewHostCIEndpointStateMachineWithInterfaceCommand added in v0.18.0

func NewHostCIEndpointStateMachineWithInterfaceCommand(interface_ *HostControllerInterface, command *IOUSBHostCIMessage) (result *HostCIEndpointStateMachine, err error)

NewHostCIEndpointStateMachineWithInterfaceCommand initializes an IOUSBHostCIEndpointStateMachine object The IOUSBHostCIEndpointStateMachine defaults to the IOUSBHostCIEndpointStatePaused state.

func (*HostCIEndpointStateMachine) ControllerInterface added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) ControllerInterface() *HostControllerInterface

ControllerInterface returns the controller interface.

func (*HostCIEndpointStateMachine) CurrentTransferMessage added in v0.18.0

func (hcesm *HostCIEndpointStateMachine) CurrentTransferMessage() *IOUSBHostCIMessage

CurrentTransferMessage returns the current transfer message.

func (*HostCIEndpointStateMachine) Description added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) Description() string

Description returns the object's -description text.

func (*HostCIEndpointStateMachine) DeviceAddress added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) DeviceAddress() int

DeviceAddress returns the device address.

func (*HostCIEndpointStateMachine) EndpointAddress added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) EndpointAddress() int

EndpointAddress returns the endpoint address.

func (*HostCIEndpointStateMachine) EndpointState added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) EndpointState() HostCIEndpointState

EndpointState returns the endpoint state.

func (*HostCIEndpointStateMachine) EnqueueTransferCompletionForMessageStatusTransferLength added in v0.18.0

func (hcesm *HostCIEndpointStateMachine) EnqueueTransferCompletionForMessageStatusTransferLength(message *IOUSBHostCIMessage, status HostCIMessageStatus, transferLength int) error

EnqueueTransferCompletionForMessageStatusTransferLength send an IOUSBHostCIMessage representing a transfer completion to the kernel, and advance the state machine 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.

func (*HostCIEndpointStateMachine) InspectCommand added in v0.18.0

func (hcesm *HostCIEndpointStateMachine) InspectCommand(command *IOUSBHostCIMessage) error

InspectCommand inspect an IOUSBHostCIMessage command The IOUSBHostCIMessage command is inspected to determine if it is handled by this state machine and is appropriate for the current state.

func (*HostCIEndpointStateMachine) IsEqual added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostCIEndpointStateMachine) IsKind added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostCIEndpointStateMachine) ProcessDoorbell added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) ProcessDoorbell(doorbell uint32) error

ProcessDoorbell advance the state machine and process an IOUSBHostCIDoorbell message 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.

func (*HostCIEndpointStateMachine) RespondToCommandStatus added in v0.18.0

func (hcesm *HostCIEndpointStateMachine) RespondToCommandStatus(command *IOUSBHostCIMessage, status HostCIMessageStatus) error

RespondToCommandStatus advance the state machine and respond to an IOUSBHostCIMessage command 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.

func (*HostCIEndpointStateMachine) String added in v0.17.0

func (hcesm *HostCIEndpointStateMachine) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type HostCIExceptionType added in v0.17.0

type HostCIExceptionType int32

Exception specifier included as message argument to <code>kUSBHostMessageControllerException</code> 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 (
	HostCIExceptionTypeUnknown               HostCIExceptionType = 0
	HostCIExceptionTypeCapabilitiesInvalid   HostCIExceptionType = 1
	HostCIExceptionTypeTerminated            HostCIExceptionType = 2
	HostCIExceptionTypeCommandReadCollision  HostCIExceptionType = 3
	HostCIExceptionTypeCommandWriteFailed    HostCIExceptionType = 4
	HostCIExceptionTypeCommandTimeout        HostCIExceptionType = 5
	HostCIExceptionTypeCommandFailure        HostCIExceptionType = 6
	HostCIExceptionTypeInterruptInvalid      HostCIExceptionType = 7
	HostCIExceptionTypeInterruptOverflow     HostCIExceptionType = 8
	HostCIExceptionTypeDoorbellReadCollision HostCIExceptionType = 9
	HostCIExceptionTypeDoorbellOverflow      HostCIExceptionType = 10
	HostCIExceptionTypeProtocolError         HostCIExceptionType = 11
	HostCIExceptionTypeFrameUpdateError      HostCIExceptionType = 12
)

func (HostCIExceptionType) String added in v0.17.0

func (e HostCIExceptionType) String() string

String returns the HostCIExceptionType constant's name, or its numeric form when the value is not a known constant.

type HostCILinkState added in v0.17.0

type HostCILinkState int32

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

const (
	HostCILinkStateU0         HostCILinkState = 0
	HostCILinkStateU1         HostCILinkState = 1
	HostCILinkStateU2         HostCILinkState = 2
	HostCILinkStateU3         HostCILinkState = 3
	HostCILinkStateDisabled   HostCILinkState = 4
	HostCILinkStateRxDetect   HostCILinkState = 5
	HostCILinkStateInactive   HostCILinkState = 6
	HostCILinkStatePolling    HostCILinkState = 7
	HostCILinkStateRecovery   HostCILinkState = 8
	HostCILinkStateReset      HostCILinkState = 9
	HostCILinkStateCompliance HostCILinkState = 10
	HostCILinkStateTest       HostCILinkState = 11
	HostCILinkStateResume     HostCILinkState = 15
)

func (HostCILinkState) String added in v0.17.0

func (e HostCILinkState) String() string

String returns the HostCILinkState constant's name, or its numeric form when the value is not a known constant.

type HostCIMessageStatus added in v0.17.0

type HostCIMessageStatus int32

Values to be populated in IOUSBHostCIMessageControlStatus of an IOUSBHostCIMessage structure

const (
	HostCIMessageStatusReserved           HostCIMessageStatus = 0
	HostCIMessageStatusSuccess            HostCIMessageStatus = 1
	HostCIMessageStatusOffline            HostCIMessageStatus = 2
	HostCIMessageStatusNotPermitted       HostCIMessageStatus = 3
	HostCIMessageStatusBadArgument        HostCIMessageStatus = 4
	HostCIMessageStatusTimeout            HostCIMessageStatus = 5
	HostCIMessageStatusNoResources        HostCIMessageStatus = 6
	HostCIMessageStatusEndpointStopped    HostCIMessageStatus = 7
	HostCIMessageStatusProtocolError      HostCIMessageStatus = 8
	HostCIMessageStatusTransactionError   HostCIMessageStatus = 9
	HostCIMessageStatusOverrunError       HostCIMessageStatus = 10
	HostCIMessageStatusStallError         HostCIMessageStatus = 11
	HostCIMessageStatusMissedServiceError HostCIMessageStatus = 12
	HostCIMessageStatusError              HostCIMessageStatus = 13
)

func IOUSBHostCIMessageStatusFromIOReturn

func IOUSBHostCIMessageStatusFromIOReturn(status int) HostCIMessageStatus

IOUSBHostCIMessageStatusFromIOReturn calls the IOUSBHost framework function IOUSBHostCIMessageStatusFromIOReturn.

func (HostCIMessageStatus) String added in v0.17.0

func (e HostCIMessageStatus) String() string

String returns the HostCIMessageStatus constant's name, or its numeric form when the value is not a known constant.

type HostCIMessageType added in v0.17.0

type HostCIMessageType int32

Values to be populated in IOUSBHostCIMessageControlType of an IOUSBHostCIMessage structure

const (
	HostCIMessageTypeControllerCapabilities  HostCIMessageType = 0
	HostCIMessageTypePortCapabilities        HostCIMessageType = 1
	HostCIMessageTypePortEvent               HostCIMessageType = 8
	HostCIMessageTypeFrameNumberUpdate       HostCIMessageType = 9
	HostCIMessageTypeFrameTimestampUpdate    HostCIMessageType = 10
	HostCIMessageTypeCommandMin              HostCIMessageType = 16
	HostCIMessageTypeControllerPowerOn       HostCIMessageType = 16
	HostCIMessageTypeControllerPowerOff      HostCIMessageType = 17
	HostCIMessageTypeControllerStart         HostCIMessageType = 18
	HostCIMessageTypeControllerPause         HostCIMessageType = 19
	HostCIMessageTypeControllerFrameNumber   HostCIMessageType = 20
	HostCIMessageTypePortPowerOn             HostCIMessageType = 24
	HostCIMessageTypePortPowerOff            HostCIMessageType = 25
	HostCIMessageTypePortResume              HostCIMessageType = 26
	HostCIMessageTypePortSuspend             HostCIMessageType = 27
	HostCIMessageTypePortReset               HostCIMessageType = 28
	HostCIMessageTypePortDisable             HostCIMessageType = 29
	HostCIMessageTypePortStatus              HostCIMessageType = 30
	HostCIMessageTypeDeviceCreate            HostCIMessageType = 32
	HostCIMessageTypeDeviceDestroy           HostCIMessageType = 33
	HostCIMessageTypeDeviceStart             HostCIMessageType = 34
	HostCIMessageTypeDevicePause             HostCIMessageType = 35
	HostCIMessageTypeDeviceUpdate            HostCIMessageType = 36
	HostCIMessageTypeEndpointCreate          HostCIMessageType = 40
	HostCIMessageTypeEndpointDestroy         HostCIMessageType = 41
	HostCIMessageTypeEndpoint_reserved_      HostCIMessageType = 42
	HostCIMessageTypeEndpointPause           HostCIMessageType = 43
	HostCIMessageTypeEndpointUpdate          HostCIMessageType = 44
	HostCIMessageTypeEndpointReset           HostCIMessageType = 45
	HostCIMessageTypeEndpointSetNextTransfer HostCIMessageType = 46
	HostCIMessageTypeCommandMax              HostCIMessageType = 55
	HostCIMessageTypeSetupTransfer           HostCIMessageType = 56
	HostCIMessageTypeNormalTransfer          HostCIMessageType = 57
	HostCIMessageTypeStatusTransfer          HostCIMessageType = 58
	HostCIMessageTypeIsochronousTransfer     HostCIMessageType = 59
	HostCIMessageTypeLink                    HostCIMessageType = 60
	HostCIMessageTypeTransferComplete        HostCIMessageType = 61
)

func (HostCIMessageType) String added in v0.17.0

func (e HostCIMessageType) String() string

String returns the HostCIMessageType constant's name, or its numeric form when the value is not a known constant.

type HostCIPortState added in v0.17.0

type HostCIPortState int32

Port state managed by IOUSBHostCIPortStateMachine 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 (
	HostCIPortStateOff       HostCIPortState = 0
	HostCIPortStatePowered   HostCIPortState = 1
	HostCIPortStateSuspended HostCIPortState = 2
	HostCIPortStateActive    HostCIPortState = 3
)

func (HostCIPortState) String added in v0.17.0

func (e HostCIPortState) String() string

String returns the HostCIPortState constant's name, or its numeric form when the value is not a known constant.

type HostCIPortStateMachine added in v0.17.0

type HostCIPortStateMachine struct {
	objref.Handle
}

HostCIPortStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIPortStateMachine.

The object representing the state of a user-mode USB host controller root port 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.

func HostCIPortStateMachineFromID added in v0.17.0

func HostCIPortStateMachineFromID(id objc.ID) *HostCIPortStateMachine

HostCIPortStateMachineFromID adopts an existing Objective-C object as a HostCIPortStateMachine (nil for 0), retaining it and registering a release finalizer.

func NewHostCIPortStateMachineWithInterfacePortNumber added in v0.17.0

func NewHostCIPortStateMachineWithInterfacePortNumber(interface_ *HostControllerInterface, portNumber int) (result *HostCIPortStateMachine, err error)

NewHostCIPortStateMachineWithInterfacePortNumber initializes an IOUSBHostCIPortStateMachine object The IOUSBHostCIPortStateMachine defaults to the IOUSBHostCIPortStateOff state.

func (*HostCIPortStateMachine) Connected added in v0.17.0

func (hcpsm *HostCIPortStateMachine) Connected() bool

Connected reports whether set the connection state of the port The connected property cannot be set for an unpowered port, and will read back as false, 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 (*HostCIPortStateMachine) ControllerInterface added in v0.17.0

func (hcpsm *HostCIPortStateMachine) ControllerInterface() *HostControllerInterface

ControllerInterface returns the controller interface.

func (*HostCIPortStateMachine) Description added in v0.17.0

func (hcpsm *HostCIPortStateMachine) Description() string

Description returns the object's -description text.

func (*HostCIPortStateMachine) InspectCommand added in v0.18.0

func (hcpsm *HostCIPortStateMachine) InspectCommand(command *IOUSBHostCIMessage) error

InspectCommand inspect an IOUSBHostCIMessage command The IOUSBHostCIMessage command is inspected to determine if it is handled by the state machine, and is appropriate for the current state.

func (*HostCIPortStateMachine) IsEqual added in v0.17.0

func (hcpsm *HostCIPortStateMachine) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostCIPortStateMachine) IsKind added in v0.17.0

func (hcpsm *HostCIPortStateMachine) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostCIPortStateMachine) LinkState added in v0.17.0

func (hcpsm *HostCIPortStateMachine) LinkState() HostCILinkState

LinkState returns the link state.

func (*HostCIPortStateMachine) Overcurrent added in v0.17.0

func (hcpsm *HostCIPortStateMachine) Overcurrent() bool

Overcurrent reports whether set the overcurrent state of the port The overcurrent property cannot be set for an unpowered port, and will read back as false, 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 (*HostCIPortStateMachine) PortNumber added in v0.17.0

func (hcpsm *HostCIPortStateMachine) PortNumber() int

PortNumber returns the port number.

func (*HostCIPortStateMachine) PortState added in v0.17.0

func (hcpsm *HostCIPortStateMachine) PortState() HostCIPortState

PortState returns the port state.

func (*HostCIPortStateMachine) PortStatus added in v0.17.0

func (hcpsm *HostCIPortStateMachine) PortStatus() uint32

PortStatus returns the port status.

func (*HostCIPortStateMachine) Powered added in v0.17.0

func (hcpsm *HostCIPortStateMachine) Powered() bool

Powered reports whether set the powered state of the port 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 true. Similarly, successful processing of the IOUSBHostCIMessageTypePortPowerOff command must set the powered property to false.

func (*HostCIPortStateMachine) RespondToCommandStatus added in v0.18.0

func (hcpsm *HostCIPortStateMachine) RespondToCommandStatus(command *IOUSBHostCIMessage, status HostCIMessageStatus) error

RespondToCommandStatus advance the state machine and respond to an IOUSBHostCIMessage command 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.

func (*HostCIPortStateMachine) Speed added in v0.17.0

Speed returns the speed.

func (*HostCIPortStateMachine) String added in v0.17.0

func (hcpsm *HostCIPortStateMachine) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*HostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChange added in v0.17.0

func (hcpsm *HostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChange(linkState HostCILinkState, speed HostCIDeviceSpeed, inhibitLinkStateChange bool) error

UpdateLinkStateSpeedInhibitLinkStateChange updates link state speed inhibit link state change.

func (*HostCIPortStateMachine) WithConnected added in v0.17.0

func (hcpsm *HostCIPortStateMachine) WithConnected(connected bool) *HostCIPortStateMachine

WithConnected sets set the connection state of the port 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 (*HostCIPortStateMachine) WithOvercurrent added in v0.17.0

func (hcpsm *HostCIPortStateMachine) WithOvercurrent(overcurrent bool) *HostCIPortStateMachine

WithOvercurrent sets set the overcurrent state of the port 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 (*HostCIPortStateMachine) WithPowered added in v0.17.0

func (hcpsm *HostCIPortStateMachine) WithPowered(powered bool) *HostCIPortStateMachine

WithPowered sets set the powered state of the port 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.

type HostCIUserClientVersion added in v0.17.0

type HostCIUserClientVersion int32
const (
	HostCIUserClientVersion100 HostCIUserClientVersion = 0
)

func (HostCIUserClientVersion) String added in v0.17.0

func (e HostCIUserClientVersion) String() string

String returns the HostCIUserClientVersion constant's name, or its numeric form when the value is not a known constant.

type HostControllerInterface added in v0.17.0

type HostControllerInterface struct {
	objref.Handle
}

HostControllerInterface is an idiomatic wrapper over the Objective-C class IOUSBHostControllerInterface.

func HostControllerInterfaceFromID added in v0.17.0

func HostControllerInterfaceFromID(id objc.ID) *HostControllerInterface

HostControllerInterfaceFromID adopts an existing Objective-C object as a HostControllerInterface (nil for 0), retaining it and registering a release finalizer.

func NewHostControllerInterface added in v0.17.0

func NewHostControllerInterface() *HostControllerInterface

NewHostControllerInterface creates a new HostControllerInterface.

func (*HostControllerInterface) Capabilities added in v0.18.0

func (hci *HostControllerInterface) Capabilities() *IOUSBHostCIMessage

Capabilities returns the capabilities structure passed in during initialization The capabilities passed into the initializer can be retrieved for reference.

func (*HostControllerInterface) CapabilitiesForPort added in v0.18.0

func (hci *HostControllerInterface) CapabilitiesForPort(port int) *IOUSBHostCIMessage

CapabilitiesForPort retrieve a port capabilities structure passed in during initialization

func (*HostControllerInterface) ControllerStateMachine added in v0.17.0

func (hci *HostControllerInterface) ControllerStateMachine() *HostCIControllerStateMachine

ControllerStateMachine returns the controller state machine.

func (*HostControllerInterface) Description added in v0.17.0

func (hci *HostControllerInterface) Description() string

Description returns the object's -description text.

func (*HostControllerInterface) DescriptionForMessage added in v0.18.0

func (hci *HostControllerInterface) DescriptionForMessage(message *IOUSBHostCIMessage) string

DescriptionForMessage wraps the corresponding Objective-C method.

func (*HostControllerInterface) Destroy added in v0.17.0

func (hci *HostControllerInterface) Destroy()

Destroy removes underlying allocations of the IOUSBHostControllerInterface object along with user client 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 (*HostControllerInterface) EnqueueInterrupt added in v0.18.0

func (hci *HostControllerInterface) EnqueueInterrupt(interrupt *IOUSBHostCIMessage) error

EnqueueInterrupt enqueue an interrupt for delivery to the kernel service 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.

func (*HostControllerInterface) EnqueueInterruptExpedite added in v0.18.0

func (hci *HostControllerInterface) EnqueueInterruptExpedite(interrupt *IOUSBHostCIMessage, expedite bool) error

EnqueueInterruptExpedite enqueue an interrupt for delivery to the kernel service This method enqueues one interrupt message for delivery to the kernel service.

func (*HostControllerInterface) EnqueueInterruptsCount added in v0.18.0

func (hci *HostControllerInterface) EnqueueInterruptsCount(interrupts *IOUSBHostCIMessage, count int) error

EnqueueInterruptsCount enqueue interrupts for delivery to the kernel service 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.

func (*HostControllerInterface) EnqueueInterruptsCountExpedite added in v0.18.0

func (hci *HostControllerInterface) EnqueueInterruptsCountExpedite(interrupts *IOUSBHostCIMessage, count int, expedite bool) error

EnqueueInterruptsCountExpedite enqueue interrupts for delivery to the kernel service 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.

func (*HostControllerInterface) GetPortStateMachineForCommand added in v0.18.0

func (hci *HostControllerInterface) GetPortStateMachineForCommand(command *IOUSBHostCIMessage) (result *HostCIPortStateMachine, err error)

GetPortStateMachineForCommand wraps the corresponding Objective-C method.

func (*HostControllerInterface) GetPortStateMachineForPort added in v0.17.0

func (hci *HostControllerInterface) GetPortStateMachineForPort(port int) (result *HostCIPortStateMachine, err error)

GetPortStateMachineForPort wraps the corresponding Objective-C method.

func (*HostControllerInterface) InterruptRateHz added in v0.17.0

func (hci *HostControllerInterface) InterruptRateHz() int

InterruptRateHz returns the interrupt moderation rate for sending interrupt messages to the kernel driver 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 (*HostControllerInterface) IsEqual added in v0.17.0

func (hci *HostControllerInterface) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostControllerInterface) IsKind added in v0.17.0

func (hci *HostControllerInterface) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostControllerInterface) Queue added in v0.17.0

Queue returns the dispatch queue for asynchronous operations.

func (*HostControllerInterface) String added in v0.17.0

func (hci *HostControllerInterface) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*HostControllerInterface) UUID added in v0.17.0

UUID returns a UUID used to identify the host controller interface in this process and the kernel

func (*HostControllerInterface) WithInterruptRateHz added in v0.17.0

func (hci *HostControllerInterface) WithInterruptRateHz(interruptRateHz int) *HostControllerInterface

WithInterruptRateHz sets the interrupt moderation rate for sending interrupt messages to the kernel driver 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.

type HostDevice added in v0.17.0

type HostDevice struct {
	HostObject
}

HostDevice is an idiomatic wrapper over the Objective-C class IOUSBHostDevice.

It embeds HostObject, promoting that type's methods.

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

func HostDeviceFromID added in v0.17.0

func HostDeviceFromID(id objc.ID) *HostDevice

HostDeviceFromID adopts an existing Objective-C object as a HostDevice (nil for 0), retaining it and registering a release finalizer.

func NewHostDevice added in v0.17.0

func NewHostDevice() *HostDevice

NewHostDevice creates a new HostDevice.

func (*HostDevice) ConfigurationDescriptor added in v0.18.0

func (hd *HostDevice) ConfigurationDescriptor() *IOUSBConfigurationDescriptor

ConfigurationDescriptor returns the currently selected configuration descriptor This method uses descriptorWithType to return the configuration descriptor currently selected after a successful setConfiguration call

func (*HostDevice) ConfigureWithValue added in v0.17.0

func (hd *HostDevice) ConfigureWithValue(value int) error

ConfigureWithValue selects a new configuration for the device and registers the interfaces for matching.

func (*HostDevice) ConfigureWithValueMatchInterfaces added in v0.17.0

func (hd *HostDevice) ConfigureWithValueMatchInterfaces(value int, matchInterfaces bool) error

ConfigureWithValueMatchInterfaces selects a new configuration for the device.

func (*HostDevice) Reset added in v0.17.0

func (hd *HostDevice) Reset() error

Reset terminates the device and attempts to re-enumerate it.

Reset returns an error if the operation did not succeed.

type HostIOSource added in v0.17.0

type HostIOSource struct {
	objref.Handle
}

HostIOSource is an idiomatic wrapper over the Objective-C class IOUSBHostIOSource.

HostIOSource is an abstract base — you do not construct it directly. Construct one of HostPipe, HostStream and pass it where a HostIOSource is accepted.

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

func HostIOSourceFromID added in v0.17.0

func HostIOSourceFromID(id objc.ID) *HostIOSource

HostIOSourceFromID adopts an existing Objective-C object as a HostIOSource (nil for 0), retaining it and registering a release finalizer.

func (*HostIOSource) Description added in v0.17.0

func (his *HostIOSource) Description() string

Description returns the object's -description text.

func (*HostIOSource) DeviceAddress added in v0.17.0

func (his *HostIOSource) DeviceAddress() int

DeviceAddress returns retrieve the device's address

func (*HostIOSource) EndpointAddress added in v0.17.0

func (his *HostIOSource) EndpointAddress() int

EndpointAddress returns retrieve the IOSource's endpoint address

func (*HostIOSource) HostInterface added in v0.17.0

func (his *HostIOSource) HostInterface() *HostInterface

HostInterface returns retrieve the source's IOUSBHostInterface

func (*HostIOSource) IsEqual added in v0.17.0

func (his *HostIOSource) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostIOSource) IsKind added in v0.17.0

func (his *HostIOSource) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostIOSource) String added in v0.17.0

func (his *HostIOSource) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type HostIOSourceProvider added in v0.17.0

type HostIOSourceProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

HostIOSourceProvider is accepted wherever a IOUSBHostIOSource (or one of its subclasses) is expected.

type HostInterface added in v0.17.0

type HostInterface struct {
	HostObject
}

HostInterface is an idiomatic wrapper over the Objective-C class IOUSBHostInterface.

It embeds HostObject, promoting that type's methods.

The class for accessing USB-related services.

func HostInterfaceFromID added in v0.17.0

func HostInterfaceFromID(id objc.ID) *HostInterface

HostInterfaceFromID adopts an existing Objective-C object as a HostInterface (nil for 0), retaining it and registering a release finalizer.

func NewHostInterfaceWithIOServiceOptionsQueueErrorInterestHandler added in v0.18.0

func NewHostInterfaceWithIOServiceOptionsQueueErrorInterestHandler(ioService int, options HostObjectInitOptions, queue dispatch.Queue, err unsafe.Pointer, interestHandler func(obj.Object, uint32, unsafe.Pointer)) *HostInterface

NewHostInterfaceWithIOServiceOptionsQueueErrorInterestHandler initializes IOUSBHostInterface object along with user client See IOUSBHostObject for documentation.

func (*HostInterface) ConfigurationDescriptor added in v0.18.0

func (hi *HostInterface) ConfigurationDescriptor() *IOUSBConfigurationDescriptor

ConfigurationDescriptor returns retrieve the configuration descriptor associated with this interface

func (*HostInterface) CopyPipeWithAddress added in v0.17.0

func (hi *HostInterface) CopyPipeWithAddress(address int) (result *HostPipe, err error)

CopyPipeWithAddress copies a pipe for a specific endpoint address.

func (*HostInterface) IdleTimeout added in v0.17.0

func (hi *HostInterface) IdleTimeout() float64

IdleTimeout returns retrieve the current idle suspend timeout. See

func (*HostInterface) InterfaceDescriptor added in v0.18.0

func (hi *HostInterface) InterfaceDescriptor() *IOUSBInterfaceDescriptor

InterfaceDescriptor returns retrieve the interface descriptor associated with this interface.

func (*HostInterface) SelectAlternateSetting added in v0.17.0

func (hi *HostInterface) SelectAlternateSetting(alternateSetting int) error

SelectAlternateSetting selects an alternative setting for the interface.

func (*HostInterface) SetIdleTimeout added in v0.17.0

func (hi *HostInterface) SetIdleTimeout(idleTimeout float64) error

SetIdleTimeout sets the desired idle suspend timeout for the interface.

type HostIsochronousTransactionOptions added in v0.17.0

type HostIsochronousTransactionOptions uint32

Bitmask — values may be combined with |.

const (
	HostIsochronousTransactionOptionsNone HostIsochronousTransactionOptions = 0
	HostIsochronousTransactionOptionsWrap HostIsochronousTransactionOptions = 1
)

func (HostIsochronousTransactionOptions) String added in v0.17.0

String returns the HostIsochronousTransactionOptions constant's name, or its numeric form when the value is not a known constant.

type HostIsochronousTransferOptions added in v0.17.0

type HostIsochronousTransferOptions uint32

Bitmask — values may be combined with |.

const (
	HostIsochronousTransferOptionsNone HostIsochronousTransferOptions = 0
)

func (HostIsochronousTransferOptions) String added in v0.17.0

String returns the HostIsochronousTransferOptions constant's name, or its numeric form when the value is not a known constant.

type HostObject added in v0.17.0

type HostObject struct {
	objref.Handle
}

HostObject is an idiomatic wrapper over the Objective-C class IOUSBHostObject.

HostObject is an abstract base — you do not construct it directly. Construct one of HostDevice, HostInterface and pass it where a HostObject is accepted.

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

func HostObjectFromID added in v0.17.0

func HostObjectFromID(id objc.ID) *HostObject

HostObjectFromID adopts an existing Objective-C object as a HostObject (nil for 0), retaining it and registering a release finalizer.

func NewHostObjectWithIOServiceOptionsQueueErrorInterestHandler added in v0.18.0

func NewHostObjectWithIOServiceOptionsQueueErrorInterestHandler(ioService int, options HostObjectInitOptions, queue dispatch.Queue, err unsafe.Pointer, interestHandler func(obj.Object, uint32, unsafe.Pointer)) *HostObject

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

func NewHostObjectWithIOServiceQueueErrorInterestHandler added in v0.18.0

func NewHostObjectWithIOServiceQueueErrorInterestHandler(ioService int, queue dispatch.Queue, err unsafe.Pointer, interestHandler func(obj.Object, uint32, unsafe.Pointer)) *HostObject

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

func (*HostObject) AbortDeviceRequests added in v0.17.0

func (ho *HostObject) AbortDeviceRequests() error

AbortDeviceRequests aborts device requests synchronously.

AbortDeviceRequests returns an error if the operation did not succeed.

func (*HostObject) AbortDeviceRequestsWithOption added in v0.17.0

func (ho *HostObject) AbortDeviceRequestsWithOption(option HostAbortOption) error

AbortDeviceRequestsWithOption aborts device requests.

func (*HostObject) CapabilityDescriptors added in v0.18.0

func (ho *HostObject) CapabilityDescriptors() *IOUSBBOSDescriptor

CapabilityDescriptors returns the capability descriptors of the device This method uses descriptorWithType to return the device's BOS descriptors

func (*HostObject) ConfigurationDescriptorWithConfigurationValue added in v0.18.0

func (ho *HostObject) ConfigurationDescriptorWithConfigurationValue(configurationValue int) (result *IOUSBConfigurationDescriptor, err error)

ConfigurationDescriptorWithConfigurationValue return the configuration descriptor with a specified value This method uses descriptorWithType to search for a configuration descriptor with a specific <code>bConfigurationValue</code> field.

func (*HostObject) ConfigurationDescriptorWithIndex added in v0.18.0

func (ho *HostObject) ConfigurationDescriptorWithIndex(index int) (result *IOUSBConfigurationDescriptor, err error)

ConfigurationDescriptorWithIndex return the configuration descriptor at a specified index This method uses descriptorWithType to retrieve the configuration descriptor.

func (*HostObject) CurrentMicroframeWithTime added in v0.17.0

func (ho *HostObject) CurrentMicroframeWithTime() (result uint64, time_ uint64, err error)

CurrentMicroframeWithTime return the current microframe number of the USB controller This method will return the current microframe number of the USB controller. This is most useful for scheduling future isochronous requests.

func (*HostObject) Description added in v0.17.0

func (ho *HostObject) Description() string

Description returns the object's -description text.

func (*HostObject) DescriptorWithTypeLength added in v0.18.0

func (ho *HostObject) DescriptorWithTypeLength(type_ unsafe.Pointer) (result unsafe.Pointer, length int, err error)

DescriptorWithTypeLength retrieves a descriptor with default arguments from the cache or the device.

func (*HostObject) DescriptorWithTypeLengthIndexLanguageID added in v0.18.0

func (ho *HostObject) DescriptorWithTypeLengthIndexLanguageID(type_ unsafe.Pointer, index int, languageID int) (result unsafe.Pointer, length int, err error)

DescriptorWithTypeLengthIndexLanguageID retrieves a string descriptor from the cache or the device.

func (*HostObject) DescriptorWithTypeLengthIndexLanguageIDRequestTypeRequestRecipient added in v0.18.0

func (ho *HostObject) DescriptorWithTypeLengthIndexLanguageIDRequestTypeRequestRecipient(type_ unsafe.Pointer, index int, languageID int, requestType unsafe.Pointer, requestRecipient unsafe.Pointer) (result unsafe.Pointer, length int, err error)

DescriptorWithTypeLengthIndexLanguageIDRequestTypeRequestRecipient retrieves a descriptor from the cache or the device.

func (*HostObject) Destroy added in v0.17.0

func (ho *HostObject) Destroy()

Destroy removes underlying allocations and connections from the USB host object.

func (*HostObject) DestroyWith added in v0.17.0

func (ho *HostObject) DestroyWith(options HostObjectDestroyOptions)

DestroyWith removes underlying allocations of the IOUSBHostObject object along with user client 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 (*HostObject) DeviceAddress added in v0.17.0

func (ho *HostObject) DeviceAddress() int

DeviceAddress returns retrieve the current address of the device.

func (*HostObject) DeviceDescriptor added in v0.18.0

func (ho *HostObject) DeviceDescriptor() *IOUSBDeviceDescriptor

DeviceDescriptor returns the device descriptor This method uses descriptorWithType to retrieve the device descriptor.

func (*HostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler added in v0.17.0

func (ho *HostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler(request IOUSBDeviceRequest, data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler enqueues a request on the default control endpoint.

func (*HostObject) EnqueueDeviceRequestDataErrorCompletionHandler added in v0.17.0

func (ho *HostObject) EnqueueDeviceRequestDataErrorCompletionHandler(request IOUSBDeviceRequest, data obj.Object, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueDeviceRequestDataErrorCompletionHandler enqueues a request on the default control endpoint with a default completion timeout.

func (*HostObject) EnqueueDeviceRequestErrorCompletionHandler added in v0.17.0

func (ho *HostObject) EnqueueDeviceRequestErrorCompletionHandler(request IOUSBDeviceRequest, err unsafe.Pointer, completionHandler func(int, int)) bool

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

func (*HostObject) FrameNumberWithTime added in v0.17.0

func (ho *HostObject) FrameNumberWithTime() (result uint64, time_ uint64)

FrameNumberWithTime returns the current frame number of the USB controller.

func (*HostObject) IODataWithCapacity added in v0.17.0

func (ho *HostObject) IODataWithCapacity(capacity int) (result *foundation.MutableData, err error)

IODataWithCapacity allocates a buffer for input/output requests.

func (*HostObject) IOService added in v0.17.0

func (ho *HostObject) IOService() int

IOService returns retrieve the IOUSBHostObject's io_service_t.

func (*HostObject) IsEqual added in v0.17.0

func (ho *HostObject) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*HostObject) IsKind added in v0.17.0

func (ho *HostObject) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*HostObject) Queue added in v0.17.0

func (ho *HostObject) Queue() *foundation.Object

Queue returns the dispatch queue that all asynchronous io will be serviced.

func (*HostObject) ReferenceMicroframeWithTime added in v0.17.0

func (ho *HostObject) ReferenceMicroframeWithTime() (result uint64, time_ uint64, err error)

ReferenceMicroframeWithTime return a recent microframe number of the USB controller This method will return a recent microframe number of the USB controller. This is most useful for scheduling future isochronous requests.

func (*HostObject) SendDeviceRequest added in v0.17.0

func (ho *HostObject) SendDeviceRequest(request IOUSBDeviceRequest) error

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

func (*HostObject) SendDeviceRequestDataBytesTransferred added in v0.17.0

func (ho *HostObject) SendDeviceRequestDataBytesTransferred(request IOUSBDeviceRequest, data obj.Object) (bytesTransferred int, err error)

SendDeviceRequestDataBytesTransferred sends a request on the default control endpoint with a default completion timeout.

func (*HostObject) SendDeviceRequestDataBytesTransferredCompletionTimeout added in v0.17.0

func (ho *HostObject) SendDeviceRequestDataBytesTransferredCompletionTimeout(request IOUSBDeviceRequest, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)

SendDeviceRequestDataBytesTransferredCompletionTimeout sends a request on the default control endpoint.

func (*HostObject) String added in v0.17.0

func (ho *HostObject) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*HostObject) StringWithIndex added in v0.17.0

func (ho *HostObject) StringWithIndex(index int) (result *foundation.String, err error)

StringWithIndex retrieves an English-language string from a string descriptor.

func (*HostObject) StringWithIndexLanguageID added in v0.17.0

func (ho *HostObject) StringWithIndexLanguageID(index int, languageID int) (result *foundation.String, err error)

StringWithIndexLanguageID retrieves a string from a string descriptor.

type HostObjectDestroyOptions added in v0.17.0

type HostObjectDestroyOptions uint64

Bitmask — values may be combined with |.

const (
	HostObjectDestroyOptionsNone            HostObjectDestroyOptions = 0
	HostObjectDestroyOptionsDeviceSurrender HostObjectDestroyOptions = 1
)

func (HostObjectDestroyOptions) String added in v0.17.0

func (e HostObjectDestroyOptions) String() string

String returns the HostObjectDestroyOptions constant's name, or its numeric form when the value is not a known constant.

type HostObjectInitOptions added in v0.17.0

type HostObjectInitOptions uint64

Options for initializing the host object. Bitmask — values may be combined with |.

const (
	// The default argument for initializing the host object.
	HostObjectInitOptionsNone HostObjectInitOptions = 0
	// The option to capture the device and terminate existing drivers.
	HostObjectInitOptionsDeviceCapture HostObjectInitOptions = 1
	HostObjectInitOptionsDeviceSeize   HostObjectInitOptions = 2
)

func (HostObjectInitOptions) String added in v0.17.0

func (e HostObjectInitOptions) String() string

String returns the HostObjectInitOptions constant's name, or its numeric form when the value is not a known constant.

type HostObjectProvider added in v0.17.0

type HostObjectProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

HostObjectProvider is accepted wherever a IOUSBHostObject (or one of its subclasses) is expected.

type HostPipe added in v0.17.0

type HostPipe struct {
	HostIOSource
}

HostPipe is an idiomatic wrapper over the Objective-C class IOUSBHostPipe.

It embeds HostIOSource, promoting that type's methods.

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

func HostPipeFromID added in v0.17.0

func HostPipeFromID(id objc.ID) *HostPipe

HostPipeFromID adopts an existing Objective-C object as a HostPipe (nil for 0), retaining it and registering a release finalizer.

func NewHostPipe added in v0.17.0

func NewHostPipe() *HostPipe

NewHostPipe creates a new HostPipe.

func (*HostPipe) Abort added in v0.17.0

func (hp *HostPipe) Abort() error

Abort aborts pending input/output requests synchronously.

Abort returns an error if the operation did not succeed.

func (*HostPipe) AbortWithOption added in v0.17.0

func (hp *HostPipe) AbortWithOption(option HostAbortOption) error

AbortWithOption aborts pending input/output requests.

func (*HostPipe) AdjustPipeWithDescriptors added in v0.18.0

func (hp *HostPipe) AdjustPipeWithDescriptors(descriptors *IOUSBHostIOSourceDescriptors) error

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

func (*HostPipe) ClearStall added in v0.17.0

func (hp *HostPipe) ClearStall() error

ClearStall clears the halt condition of the pipe.

ClearStall returns an error if the operation did not succeed.

func (*HostPipe) CopyStreamWithStreamID added in v0.17.0

func (hp *HostPipe) CopyStreamWithStreamID(streamID int) (result *HostStream, err error)

CopyStreamWithStreamID returns the stream for a stream ID.

func (*HostPipe) Descriptors added in v0.18.0

func (hp *HostPipe) Descriptors() *IOUSBHostIOSourceDescriptors

Descriptors returns retrieve the current descriptor controlling the endpoint.

func (*HostPipe) DisableStreams added in v0.17.0

func (hp *HostPipe) DisableStreams() error

DisableStreams disables streams for the pipe.

DisableStreams returns an error if the operation did not succeed.

func (*HostPipe) EnableStreams added in v0.17.0

func (hp *HostPipe) EnableStreams() error

EnableStreams enables streams for the pipe.

EnableStreams returns an error if the operation did not succeed.

func (*HostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler added in v0.17.0

func (hp *HostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler(request IOUSBDeviceRequest, data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler enqueues a request on a control endpoint.

func (*HostPipe) EnqueueControlRequestDataErrorCompletionHandler added in v0.17.0

func (hp *HostPipe) EnqueueControlRequestDataErrorCompletionHandler(request IOUSBDeviceRequest, data obj.Object, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueControlRequestDataErrorCompletionHandler enqueues a request on a control endpoint with a default completion timeout.

func (*HostPipe) EnqueueControlRequestErrorCompletionHandler added in v0.17.0

func (hp *HostPipe) EnqueueControlRequestErrorCompletionHandler(request IOUSBDeviceRequest, err unsafe.Pointer, completionHandler func(int, int)) bool

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

func (*HostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler added in v0.17.0

func (hp *HostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler(data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler enqueues an input/output request on the pipe.

func (*HostPipe) IdleTimeout added in v0.17.0

func (hp *HostPipe) IdleTimeout() float64

IdleTimeout returns retrieve the current idle suspend timeout. See

func (*HostPipe) OriginalDescriptors added in v0.18.0

func (hp *HostPipe) OriginalDescriptors() *IOUSBHostIOSourceDescriptors

OriginalDescriptors returns retrieve the Original descriptor used when creating the pipe.

func (*HostPipe) SendControlRequest added in v0.17.0

func (hp *HostPipe) SendControlRequest(request IOUSBDeviceRequest) error

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

func (*HostPipe) SendControlRequestDataBytesTransferred added in v0.17.0

func (hp *HostPipe) SendControlRequestDataBytesTransferred(request IOUSBDeviceRequest, data obj.Object) (bytesTransferred int, err error)

SendControlRequestDataBytesTransferred sends a request on a control endpoint with a default timeout.

func (*HostPipe) SendControlRequestDataBytesTransferredCompletionTimeout added in v0.17.0

func (hp *HostPipe) SendControlRequestDataBytesTransferredCompletionTimeout(request IOUSBDeviceRequest, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)

SendControlRequestDataBytesTransferredCompletionTimeout sends a request on a control endpoint.

func (*HostPipe) SendIORequestWithDataBytesTransferredCompletionTimeout added in v0.17.0

func (hp *HostPipe) SendIORequestWithDataBytesTransferredCompletionTimeout(data obj.Object, completionTimeout float64) (bytesTransferred int, err error)

SendIORequestWithDataBytesTransferredCompletionTimeout sends an input/output request on the pipe.

func (*HostPipe) SendIORequestWithDataFrameListFrameListCountFirstFrameNumber added in v0.18.0

func (hp *HostPipe) SendIORequestWithDataFrameListFrameListCountFirstFrameNumber(data obj.Object, frameList *IOUSBHostIsochronousFrame, frameListCount int, firstFrameNumber uint64) error

SendIORequestWithDataFrameListFrameListCountFirstFrameNumber sends a request on an isochronous endpoint.

func (*HostPipe) SetIdleTimeout added in v0.17.0

func (hp *HostPipe) SetIdleTimeout(idleTimeout float64) error

SetIdleTimeout sets the desired idle suspend timeout for the interface.

type HostStream added in v0.17.0

type HostStream struct {
	HostIOSource
}

HostStream is an idiomatic wrapper over the Objective-C class IOUSBHostStream.

It embeds HostIOSource, promoting that type's methods.

The class responsible for sending stream data for function drivers.

func HostStreamFromID added in v0.17.0

func HostStreamFromID(id objc.ID) *HostStream

HostStreamFromID adopts an existing Objective-C object as a HostStream (nil for 0), retaining it and registering a release finalizer.

func NewHostStream added in v0.17.0

func NewHostStream() *HostStream

NewHostStream creates a new HostStream.

func (*HostStream) Abort added in v0.17.0

func (hs *HostStream) Abort() error

Abort aborts pending input/output requests synchronously.

Abort returns an error if the operation did not succeed.

func (*HostStream) AbortWithOption added in v0.17.0

func (hs *HostStream) AbortWithOption(option HostAbortOption) error

AbortWithOption aborts pending input/output requests.

func (*HostStream) EnqueueIORequestWithDataErrorCompletionHandler added in v0.17.0

func (hs *HostStream) EnqueueIORequestWithDataErrorCompletionHandler(data obj.Object, err unsafe.Pointer, completionHandler func(int, int)) bool

EnqueueIORequestWithDataErrorCompletionHandler enqueues an input/output request on the stream.

func (*HostStream) HostPipe added in v0.17.0

func (hs *HostStream) HostPipe() *HostPipe

HostPipe returns the IOUSBHostPipe this stream was created from

func (*HostStream) SendIORequestWithDataBytesTransferred added in v0.17.0

func (hs *HostStream) SendIORequestWithDataBytesTransferred(data obj.Object) (bytesTransferred int, err error)

SendIORequestWithDataBytesTransferred sends an input/output request on the stream.

func (*HostStream) StreamID added in v0.17.0

func (hs *HostStream) StreamID() int

StreamID returns streamID associated with this IOUSBHostStream.

type IOUSBBOSDescriptor added in v0.18.0

type IOUSBBOSDescriptor struct {
	BLength         uint8
	BDescriptorType uint8
	WTotalLength    uint16
	BNumDeviceCaps  uint8
}

USB BOS descriptor. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 3.0 9.6.2: Binary Device Object Store (BOS)

type IOUSBConfigurationDescriptor added in v0.18.0

type IOUSBConfigurationDescriptor struct {
	BLength             uint8
	BDescriptorType     uint8
	WTotalLength        uint16
	BNumInterfaces      uint8
	BConfigurationValue uint8
	IConfiguration      uint8
	BmAttributes        uint8
	MaxPower            uint8
}

Standard USB Configuration Descriptor. It is variable length, so this only specifies the known fields. We use the wTotalLength field to read the whole descriptor. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 2.0 9.6.3: Configuration

type IOUSBDescriptorHeader added in v0.18.0

type IOUSBDescriptorHeader struct {
	BLength         uint8
	BDescriptorType uint8
}

Base descriptor defined by USB 2.0 9.5 IOUSBDescriptorDefinitions declares structs to represent a variety of USB standard descriptors.

func IOUSBGetNextAssociatedDescriptor

func IOUSBGetNextAssociatedDescriptor(configurationDescriptor *IOUSBConfigurationDescriptor, parentDescriptor *IOUSBDescriptorHeader, currentDescriptor *IOUSBDescriptorHeader) *IOUSBDescriptorHeader

IOUSBGetNextAssociatedDescriptor calls the IOUSBHost framework function IOUSBGetNextAssociatedDescriptor.

func IOUSBGetNextAssociatedDescriptorWithType

func IOUSBGetNextAssociatedDescriptorWithType(configurationDescriptor *IOUSBConfigurationDescriptor, parentDescriptor *IOUSBDescriptorHeader, currentDescriptor *IOUSBDescriptorHeader, type_ uint8) *IOUSBDescriptorHeader

IOUSBGetNextAssociatedDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextAssociatedDescriptorWithType.

func IOUSBGetNextDescriptor

func IOUSBGetNextDescriptor(configurationDescriptor *IOUSBConfigurationDescriptor, currentDescriptor *IOUSBDescriptorHeader) *IOUSBDescriptorHeader

IOUSBGetNextDescriptor calls the IOUSBHost framework function IOUSBGetNextDescriptor.

func IOUSBGetNextDescriptorWithType

func IOUSBGetNextDescriptorWithType(configurationDescriptor *IOUSBConfigurationDescriptor, currentDescriptor *IOUSBDescriptorHeader, type_ uint8) *IOUSBDescriptorHeader

IOUSBGetNextDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextDescriptorWithType.

type IOUSBDeviceCapabilityContainerID added in v0.18.0

type IOUSBDeviceCapabilityContainerID struct {
	BLength            uint8
	BDescriptorType    uint8
	BDevCapabilityType uint8
	BReservedID        uint8
	ContainerID        [16]uint8
}

Device Capability Container ID. USB 3.0 9.6.2.3: Container ID

func IOUSBGetContainerIDDescriptor

func IOUSBGetContainerIDDescriptor(bosDescriptor *IOUSBBOSDescriptor) *IOUSBDeviceCapabilityContainerID

IOUSBGetContainerIDDescriptor calls the IOUSBHost framework function IOUSBGetContainerIDDescriptor.

type IOUSBDeviceCapabilityDescriptorHeader added in v0.18.0

type IOUSBDeviceCapabilityDescriptorHeader struct {
	BLength            uint8
	BDescriptorType    uint8
	BDevCapabilityType uint8
}

Device Capability descriptor. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 3.0 9.6.2: Binary Device Object Store (BOS)

func IOUSBGetNextCapabilityDescriptor

func IOUSBGetNextCapabilityDescriptor(bosDescriptor *IOUSBBOSDescriptor, currentDescriptor *IOUSBDeviceCapabilityDescriptorHeader) *IOUSBDeviceCapabilityDescriptorHeader

IOUSBGetNextCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetNextCapabilityDescriptor.

func IOUSBGetNextCapabilityDescriptorWithType

func IOUSBGetNextCapabilityDescriptorWithType(bosDescriptor *IOUSBBOSDescriptor, currentDescriptor *IOUSBDeviceCapabilityDescriptorHeader, type_ uint8) *IOUSBDeviceCapabilityDescriptorHeader

IOUSBGetNextCapabilityDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextCapabilityDescriptorWithType.

type IOUSBDeviceCapabilitySuperSpeedUSB added in v0.18.0

type IOUSBDeviceCapabilitySuperSpeedUSB struct {
	BLength               uint8
	BDescriptorType       uint8
	BDevCapabilityType    uint8
	BmAttributes          uint8
	WSpeedsSupported      uint16
	BFunctionalitySupport uint8
	BU1DevExitLat         uint8
	WU2DevExitLat         uint16
}

Device Capability SuperSpeed USB. USB 3.0 9.6.2.2: SuperSpeed USB Device Capability

func IOUSBGetSuperSpeedDeviceCapabilityDescriptor

func IOUSBGetSuperSpeedDeviceCapabilityDescriptor(bosDescriptor *IOUSBBOSDescriptor) *IOUSBDeviceCapabilitySuperSpeedUSB

IOUSBGetSuperSpeedDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetSuperSpeedDeviceCapabilityDescriptor.

type IOUSBDeviceDescriptor added in v0.18.0

type IOUSBDeviceDescriptor struct {
	BLength            uint8
	BDescriptorType    uint8
	BcdUSB             uint16
	BDeviceClass       uint8
	BDeviceSubClass    uint8
	BDeviceProtocol    uint8
	BMaxPacketSize0    uint8
	IDVendor           uint16
	IDProduct          uint16
	BcdDevice          uint16
	IManufacturer      uint8
	IProduct           uint8
	ISerialNumber      uint8
	BNumConfigurations uint8
}

Descriptor for a USB Device. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>.

type IOUSBDeviceRequest added in v0.18.0

type IOUSBDeviceRequest struct {
	BmRequestType uint8
	BRequest      uint8
	WValue        uint16
	WIndex        uint16
	WLength       uint16
}

Standard device request. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. USB 2.0 9.3: USB Device Requests

type IOUSBEndpointDescriptor added in v0.18.0

type IOUSBEndpointDescriptor struct {
	BLength          uint8
	BDescriptorType  uint8
	BEndpointAddress uint8
	BmAttributes     uint8
	WMaxPacketSize   uint16
	BInterval        uint8
}

Descriptor for a USB Endpoint. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 2.0 9.6.6: Endpoint

func IOUSBGetNextEndpointDescriptor

func IOUSBGetNextEndpointDescriptor(configurationDescriptor *IOUSBConfigurationDescriptor, interfaceDescriptor *IOUSBInterfaceDescriptor, currentDescriptor *IOUSBDescriptorHeader) *IOUSBEndpointDescriptor

IOUSBGetNextEndpointDescriptor calls the IOUSBHost framework function IOUSBGetNextEndpointDescriptor.

type IOUSBHostCIMessage

type IOUSBHostCIMessage struct {
	Control uint32
	Data0   uint32
	Data1   uint64
}

Foundational IOUSBHostControllerInterface message structure used for commands, transfers, and interrupts 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 IOUSBHostIOSourceDescriptors

type IOUSBHostIOSourceDescriptors struct {
	BcdUSB                 uint16
	Descriptor             IOUSBEndpointDescriptor
	SsCompanionDescriptor  IOUSBSuperSpeedEndpointCompanionDescriptor
	SspCompanionDescriptor IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor
}

The descriptors for a single endpoint.

type IOUSBHostIsochronousFrame

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

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

type IOUSBHostIsochronousTransaction

type IOUSBHostIsochronousTransaction struct {
	// contains filtered or unexported fields
}

Structure representing a single frame or microframe in an isochronous transfer. The C layout cannot be reproduced as a plain Go value struct, so it is held as its exact-size bytes and read through the typed As* accessors below. It is pointer-only: never pass it by value.

func (*IOUSBHostIsochronousTransaction) AsCompleteCount added in v0.18.0

func (u *IOUSBHostIsochronousTransaction) AsCompleteCount() uint32

AsCompleteCount returns the completeCount field, read from the backing bytes at offset 12.

func (*IOUSBHostIsochronousTransaction) AsOffset added in v0.18.0

AsOffset returns the offset field, read from the backing bytes at offset 8.

func (*IOUSBHostIsochronousTransaction) AsRequestCount added in v0.18.0

func (u *IOUSBHostIsochronousTransaction) AsRequestCount() uint32

AsRequestCount returns the requestCount field, read from the backing bytes at offset 4.

func (*IOUSBHostIsochronousTransaction) AsStatus added in v0.18.0

func (u *IOUSBHostIsochronousTransaction) AsStatus() int32

AsStatus returns the status field, read from the backing bytes at offset 0.

func (*IOUSBHostIsochronousTransaction) AsTimeStamp added in v0.18.0

func (u *IOUSBHostIsochronousTransaction) AsTimeStamp() uint64

AsTimeStamp returns the timeStamp field, read from the backing bytes at offset 16.

type IOUSBInterfaceAssociationDescriptor added in v0.18.0

type IOUSBInterfaceAssociationDescriptor struct {
	BLength           uint8
	BDescriptorType   uint8
	BFirstInterface   uint8
	BInterfaceCount   uint8
	BFunctionClass    uint8
	BFunctionSubClass uint8
	BFunctionProtocol uint8
	IFunction         uint8
}

USB Inerface Association Descriptor. ECN to the USB 2.0 Spec. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 3.0 9.6.4: Interface Association

func IOUSBGetNextInterfaceAssociationDescriptor

func IOUSBGetNextInterfaceAssociationDescriptor(configurationDescriptor *IOUSBConfigurationDescriptor, currentDescriptor *IOUSBDescriptorHeader) *IOUSBInterfaceAssociationDescriptor

IOUSBGetNextInterfaceAssociationDescriptor calls the IOUSBHost framework function IOUSBGetNextInterfaceAssociationDescriptor.

type IOUSBInterfaceDescriptor added in v0.18.0

type IOUSBInterfaceDescriptor struct {
	BLength            uint8
	BDescriptorType    uint8
	BInterfaceNumber   uint8
	BAlternateSetting  uint8
	BNumEndpoints      uint8
	BInterfaceClass    uint8
	BInterfaceSubClass uint8
	BInterfaceProtocol uint8
	IInterface         uint8
}

Descriptor for a USB Interface. See the USB Specification at <a href="http://www.usb.org" target="_blank">http://www.usb.org</a>. USB 2.0 9.6.5: Interface

func IOUSBGetNextInterfaceDescriptor

func IOUSBGetNextInterfaceDescriptor(configurationDescriptor *IOUSBConfigurationDescriptor, currentDescriptor *IOUSBDescriptorHeader) *IOUSBInterfaceDescriptor

IOUSBGetNextInterfaceDescriptor calls the IOUSBHost framework function IOUSBGetNextInterfaceDescriptor.

type IOUSBSuperSpeedEndpointCompanionDescriptor added in v0.18.0

type IOUSBSuperSpeedEndpointCompanionDescriptor struct {
	BLength           uint8
	BDescriptorType   uint8
	BMaxBurst         uint8
	BmAttributes      uint8
	WBytesPerInterval uint16
}

Descriptor for a SuperSpeed USB Endpoint Companion. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. USB 3.1 9.6.7: SuperSpeed Endpoint Companion

type IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor added in v0.18.0

type IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor struct {
	BLength            uint8
	BDescriptorType    uint8
	WReserved          uint16
	DwBytesPerInterval uint32
}

Descriptor for a SuperSpeedPlus Isochronout USB Endpoint Companion. See the USB Specification at <a href="http://www.usb.org"TARGET="_blank">http://www.usb.org</a>. USB 3.1 9.6.8: SuperSpeedPlus Isochronous Endpoint Companion

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

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

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

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

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

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

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

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

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

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