pub struct IOUSBDeviceStruct320 {Show 44 fields
pub QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub CreateDeviceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
pub GetDeviceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
pub CreateDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut mach_port_t) -> IOReturn>,
pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> mach_port_t>,
pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetDeviceAddress: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
pub GetDeviceBusPowerAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetNumberOfConfigurations: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub GetConfigurationDescriptorPtr: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBConfigurationDescriptorPtr) -> IOReturn>,
pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>,
pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub DeviceRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
pub DeviceRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub CreateInterfaceIterator: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBFindInterfaceRequest, *mut io_iterator_t) -> IOReturn>,
pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub DeviceRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
pub DeviceRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub USBGetManufacturerStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub USBGetProductStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub USBGetSerialNumberStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
pub GetBusMicroFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>,
pub GetIOUSBLibVersion: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut u32) -> IOReturn>,
pub GetBusFrameNumberWithTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>,
pub GetUSBDeviceInformation: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub RequestExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
pub GetExtraPowerAllocated: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
/* private fields */
}AppleUSBDefinitions and IOUSBLib and USB and libc only.Expand description
The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
The functions listed here include all of the functions defined for the IOUSBDeviceInterface, IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300 and some new functions that are available on Mac OS X version 10.5.4 and later. Super: IOUSBDeviceInterface300
See also Apple’s documentation
Fields§
§QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>§AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§CreateDeviceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>§GetDeviceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>§CreateDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut mach_port_t) -> IOReturn>§GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> mach_port_t>§USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetDeviceAddress: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>§GetDeviceBusPowerAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>§GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetNumberOfConfigurations: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>§GetConfigurationDescriptorPtr: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBConfigurationDescriptorPtr) -> IOReturn>§GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>§ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§DeviceRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>§DeviceRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest, IOAsyncCallback1, *mut c_void) -> IOReturn>§CreateInterfaceIterator: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBFindInterfaceRequest, *mut io_iterator_t) -> IOReturn>§USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§DeviceRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>§DeviceRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO, IOAsyncCallback1, *mut c_void) -> IOReturn>§USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§USBGetManufacturerStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§USBGetProductStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§USBGetSerialNumberStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>§GetBusMicroFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>§GetIOUSBLibVersion: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut u32) -> IOReturn>§GetBusFrameNumberWithTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>§GetUSBDeviceInformation: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state.
The device does not have to be open to use this function. Availability: This function is only available with IOUSBDeviceInterface320 and above.
Parameter self: Pointer to the IOUSBDeviceInterface.
Parameter info: Pointer to a buffer that returns a bit field of information on the device (see the USBDeviceInformationBits in USB.h).
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn’t support this function.
RequestExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA).
The device has to be open to use this function. Availability: This function is only available with IOUSBDeviceInterface320 and above.
Parameter self: Pointer to the IOUSBDeviceInterface.
Parameter type: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
Parameter requestedPower: Amount of power desired, in mA
Parameter powerAvailable: Amount of power that was reserved, in mA
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn’t support this function.
ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API.
The device has to be open to use this function. Availability: This function is only available with IOUSBDeviceInterface320 and above.
Parameter self: Pointer to the IOUSBDeviceInterface.
Parameter type: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
Parameter powerReturned: Amount of power to be returned, in mA.
Returns: If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetExtraPowerAllocated: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA).
The device has to be open to use this function. Availability: This function is only available with IOUSBDeviceInterface320 and above.
Parameter self: Pointer to the IOUSBDeviceInterface.
Parameter type: Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
Parameter powerAllocated: Amount of power to be returned, in mA.
Returns: Value returned can be 0 if no power has been allocated. Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
Trait Implementations§
Source§impl Clone for IOUSBDeviceStruct320
Available on crate feature usb only.
impl Clone for IOUSBDeviceStruct320
usb only.Source§fn clone(&self) -> IOUSBDeviceStruct320
fn clone(&self) -> IOUSBDeviceStruct320
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IOUSBDeviceStruct320
Available on crate feature usb only.
impl Debug for IOUSBDeviceStruct320
usb only.Source§impl Encode for IOUSBDeviceStruct320
Available on crate features usb and objc2 only.
impl Encode for IOUSBDeviceStruct320
usb and objc2 only.Source§impl PartialEq for IOUSBDeviceStruct320
Available on crate feature usb only.
impl PartialEq for IOUSBDeviceStruct320
usb only.Source§impl RefEncode for IOUSBDeviceStruct320
Available on crate features usb and objc2 only.
impl RefEncode for IOUSBDeviceStruct320
usb and objc2 only.Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
impl Copy for IOUSBDeviceStruct320
usb only.impl StructuralPartialEq for IOUSBDeviceStruct320
usb only.