pub unsafe extern "C-unwind" fn IOUSBGetNextCapabilityDescriptorWithType(
bos_descriptor: *const IOUSBBOSDescriptor,
current_descriptor: *const IOUSBDeviceCapabilityDescriptorHeader,
type: u8,
) -> *const IOUSBDeviceCapabilityDescriptorHeaderAvailable on crate features
AppleUSBDescriptorParsing and objc2-io-kit only.Expand description
Find the next descriptor matching a given type within a BOS descriptor
This method uses getNextCapabilityDescriptor, and further validates that the returned descriptor’s bDevCapabilityType field matches the type parameter.
Parameter bosDescriptor: BOS descriptor that contains the descriptors to iterate through
Parameter currentDescriptor: A descriptor pointer within the bounds of bosDescriptor, or NULL
Parameter type: tDeviceCapabilityType representing the descriptor type to find
Returns: DeviceCapabilityDescriptor pointer, or NULL if no matching descriptor can be found
§Safety
bos_descriptormust be a valid pointer.current_descriptormust be a valid pointer.