objc2_io_kit/generated/usb/
IOUSBLib.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7use objc2_core_foundation::*;
8
9use crate::*;
10
11/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdeviceclassname?language=objc)
12pub const kIOUSBDeviceClassName: &CStr =
13    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOUSBDevice\0") };
14/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfaceclassname?language=objc)
15pub const kIOUSBInterfaceClassName: &CStr =
16    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOUSBInterface\0") };
17/// The object you use to access USB devices from user space, returned by all versions of the IOUSBFamily
18/// currently shipping.
19///
20/// The functions listed here will work with any version of the IOUSBDeviceInterface, including
21/// the one shipped with Mac OS X version 10.0.
22///
23/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct100?language=objc)
24#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
25#[repr(C)]
26#[allow(unpredictable_function_pointer_comparisons)]
27#[derive(Clone, Copy, Debug, PartialEq)]
28pub struct IOUSBDeviceStruct100 {
29    pub(crate) _reserved: *mut c_void,
30    pub QueryInterface:
31        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
32    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
33    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
34    /// Creates a run loop source for delivery of all asynchronous notifications on this device.
35    ///
36    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers
37    /// completion notifications (see
38    ///
39    /// ```text
40    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/CreateInterfaceAsyncPort/ CreateInterfaceAsyncPort
41    /// ```
42    ///
43    /// ). This routine
44    /// wraps that port with the appropriate routing code so that the completion notifications can be
45    /// automatically routed through the client's CFRunLoop.
46    ///
47    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
48    ///
49    /// Parameter `source`: Pointer to a CFRunLoopSourceRef to return the newly created run loop event source.
50    ///
51    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
52    pub CreateDeviceAsyncEventSource:
53        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
54    /// Returns the CFRunLoopSourceRef for this IOService instance.
55    ///
56    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
57    ///
58    /// Returns: Returns the run loop source if one has been created, 0 otherwise.
59    pub GetDeviceAsyncEventSource:
60        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
61    /// Creates and registers a mach_port_t for asynchronous communications.
62    ///
63    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers
64    /// completion notifications on this mach port. After receiving a message on this port the
65    /// client is obliged to call the IOKitLib.h IODispatchCalloutFromMessage() function for
66    /// decoding the notification message.
67    ///
68    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
69    ///
70    /// Parameter `port`: Pointer to a mach_port_t to return the newly created port.
71    ///
72    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
73    pub CreateDeviceAsyncPort:
74        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
75    /// Returns the mach_port_t port for this IOService instance.
76    ///
77    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
78    ///
79    /// Returns: Returns the port if one exists, 0 otherwise.
80    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
81    /// Opens the IOUSBDevice for exclusive access.
82    ///
83    /// Before the client can issue commands that change the state of the device, it
84    /// must have succeeded in opening the device. This establishes an exclusive link
85    /// between the client's task and the actual device.
86    ///
87    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
88    ///
89    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already,
90    /// kIOReturnError if the connection with the kernel cannot be established or kIOReturnSuccess if successful.
91    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
92    /// Closes the task's connection to the IOUSBDevice.
93    ///
94    /// Releases the client's exclusive access to the IOUSBDevice.
95    ///
96    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
97    ///
98    /// Returns: Returns kIOReturnSuccess if successful, some other mach error if the connection is no longer valid.
99    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
100    /// Returns the USB Class (bDeviceClass) of the device.
101    ///
102    /// The device does not have to be open to use this function.
103    ///
104    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
105    ///
106    /// Parameter `devClass`: Pointer to UInt8 to hold the device Class.
107    ///
108    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
109    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
110    /// Returns the USB Subclass (bDeviceSubClass) of the device.
111    ///
112    /// The device does not have to be open to use this function.
113    ///
114    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
115    ///
116    /// Parameter `devSubClass`: Pointer to UInt8 to hold the device Subclass.
117    ///
118    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
119    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
120    /// Returns the USB Protocol (bDeviceProtocol) of the interface.
121    ///
122    /// The device does not have to be open to use this function.
123    ///
124    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
125    ///
126    /// Parameter `devProtocol`: Pointer to UInt8 to hold the device Protocol.
127    ///
128    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
129    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
130    /// Returns the USB Vendor ID (idVendor) of the device.
131    ///
132    /// The device does not have to be open to use this function.
133    ///
134    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
135    ///
136    /// Parameter `devVendor`: Pointer to UInt16 to hold the vendorID.
137    ///
138    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
139    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
140    /// Returns the USB Product ID (idProduct) of the device.
141    ///
142    /// The device does not have to be open to use this function.
143    ///
144    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
145    ///
146    /// Parameter `devProduct`: Pointer to UInt16 to hold the ProductID.
147    ///
148    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
149    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
150    /// Returns the Device Release Number (bcdDevice) of the device.
151    ///
152    /// The device does not have to be open to use this function.
153    ///
154    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
155    ///
156    /// Parameter `devRelNum`: Pointer to UInt16 to hold the Device Release Number.
157    ///
158    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
159    pub GetDeviceReleaseNumber:
160        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
161    /// Returns the address of the device on its bus.
162    ///
163    /// The device does not have to be open to use this function.
164    ///
165    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
166    ///
167    /// Parameter `addr`: Pointer to USBDeviceAddress to hold the result.
168    ///
169    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
170    pub GetDeviceAddress:
171        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
172    /// Returns the power available to the device.
173    ///
174    /// The device does not have to be open to use this function.
175    ///
176    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
177    ///
178    /// Parameter `powerAvailable`: Pointer to UInt32 to hold the power available (in 2 mA increments).
179    ///
180    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
181    pub GetDeviceBusPowerAvailable:
182        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
183    /// Returns the speed of the device.
184    ///
185    /// The device does not have to be open to use this function.
186    ///
187    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
188    ///
189    /// Parameter `devSpeed`: Pointer to UInt8 to hold the speed (kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh, or kUSBDeviceSpeedSuper).
190    ///
191    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
192    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
193    /// Returns the number of supported configurations in this device.
194    ///
195    /// The device does not have to be open to use this function.
196    ///
197    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
198    ///
199    /// Parameter `numConfig`: Pointer to UInt8 to hold the number of configurations.
200    ///
201    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
202    pub GetNumberOfConfigurations:
203        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
204    /// Returns the location ID.
205    ///
206    /// The location ID is a 32 bit number which is unique among all USB devices in the system, and
207    /// which will not change on a system reboot unless the topology of the bus itself changes. The
208    /// device does not have to be open to use this function.
209    ///
210    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
211    ///
212    /// Parameter `locationID`: Pointer to UInt32 to hold the location ID.
213    ///
214    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
215    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
216    /// Returns a pointer to a configuration descriptor for a given index.
217    ///
218    /// Note that this will point to the data as received from the USB bus and hence will be in USB bus
219    /// order (i.e. little endian).  The device does not have to be open to use this function.
220    ///
221    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
222    ///
223    /// Parameter `configIndex`: The index (zero based) of the desired config descriptor.
224    ///
225    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
226    pub GetConfigurationDescriptorPtr: Option<
227        unsafe extern "C-unwind" fn(
228            *mut c_void,
229            u8,
230            *mut IOUSBConfigurationDescriptorPtr,
231        ) -> IOReturn,
232    >,
233    /// Returns the currently selected configuration in the device.
234    ///
235    /// The device does not have to be open to use this function.
236    ///
237    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
238    ///
239    /// Parameter `configNum`: Pointer to UInt8 to hold the configuration value.
240    ///
241    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
242    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
243    /// Sets the configuration in the device.
244    ///
245    /// Note that setting the configuration causes any existing IOUSBInterface objects attached to the
246    /// IOUSBDevice to be destroyed, and all of the interfaces in the new configuration to be instantiated
247    /// as new IOUSBInterface objects.  The device must be open to use this function.
248    ///
249    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
250    ///
251    /// Parameter `configNum`: The value of the desired configuration (from IOUSBConfigurationDescriptor.bConfigurationValue).
252    ///
253    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
254    /// or kIOReturnNotOpen if the device is not open for exclusive access.
255    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
256    /// Gets the current frame number of the bus to which the device is attached.
257    ///
258    /// The device does not have to be open to use this function.
259    ///
260    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
261    ///
262    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
263    ///
264    /// Parameter `atTime`: Pointer to a returned AbsoluteTime, which is the system time ("wall time") when the frame number register was read. This
265    /// system time could be the time at the beginning, middle, or end of the given frame.
266    ///
267    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
268    pub GetBusFrameNumber:
269        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
270    /// Tells the IOUSBFamily to issue a reset to the device.
271    ///
272    /// It will not reenumerate the device, which means that the cached device descriptor values will not
273    /// be updated after the reset. (If you want the IOUSBFamily to reload the cached values, use the call
274    /// USBDeviceReEnumerate). Prior to version 1.8.5 of the IOUSBFamily, this call also sent a message to
275    /// all clients of the IOUSBDevice (IOUSBInterfaces and their drivers).  The device must be open to use
276    /// this function.
277    ///
278    /// This behavior was eliminated in version 1.8.5 of the IOUSBFamily.
279    ///
280    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
281    ///
282    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
283    /// or kIOReturnNotOpen if the device is not open for exclusive access.
284    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
285    /// Sends a USB request on the default control pipe.
286    ///
287    /// The device does not have to be open to use this function, but standard requests that change the state of the device
288    /// may require that the device is opened first.
289    ///
290    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
291    ///
292    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
293    ///
294    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
295    /// kIOReturnAborted if the thread is interrupted before the call completes,
296    /// or kIOReturnNotOpen if the device is not open for exclusive access.
297    pub DeviceRequest:
298        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
299    /// Sends an asynchronous USB request on the default control pipe.
300    ///
301    /// The device does not have to be open to use this function, but standard requests that change the state of the device
302    /// may require that the device is opened first.
303    ///
304    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
305    ///
306    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
307    ///
308    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred.  A message addressed to this callback is posted to the Async port upon completion.
309    ///
310    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
311    ///
312    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
313    /// kIOReturnNotOpen if the device is not open for exclusive access, or kIOUSBNoAsyncPortErr if no Async
314    /// port has been created for this interface.
315    pub DeviceRequestAsync: Option<
316        unsafe extern "C-unwind" fn(
317            *mut c_void,
318            *mut IOUSBDevRequest,
319            IOAsyncCallback1,
320            *mut c_void,
321        ) -> IOReturn,
322    >,
323    /// Creates an iterator to iterate over some or all of the interfaces of a device.
324    ///
325    /// The device does not have to be open to use this function.
326    ///
327    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
328    ///
329    /// Parameter `req`: Pointer an IOUSBFindInterfaceRequest structure describing the desired interfaces.
330    ///
331    /// Parameter `iter`: Pointer to a an io_iterator_t to contain the new iterator.
332    ///
333    /// Returns: Returns kIOReturnSuccess if successful or kIOReturnNoDevice if there is no connection to an IOService.
334    pub CreateInterfaceIterator: Option<
335        unsafe extern "C-unwind" fn(
336            *mut c_void,
337            *mut IOUSBFindInterfaceRequest,
338            *mut io_iterator_t,
339        ) -> IOReturn,
340    >,
341}
342
343#[cfg(all(
344    feature = "AppleUSBDefinitions",
345    feature = "USB",
346    feature = "libc",
347    feature = "objc2"
348))]
349unsafe impl Encode for IOUSBDeviceStruct100 {
350    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct100", &[
351        <*mut c_void>::ENCODING,
352        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
353        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
354        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
355        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
356        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
357        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
358        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
359        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
360        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
361        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
362        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
363        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
364        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
365        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
366        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
367        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
368        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
369        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
370        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
371        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
372        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
373        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
374        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
375        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
376        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
377        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
378        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
379        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
380    ]);
381}
382
383#[cfg(all(
384    feature = "AppleUSBDefinitions",
385    feature = "USB",
386    feature = "libc",
387    feature = "objc2"
388))]
389unsafe impl RefEncode for IOUSBDeviceStruct100 {
390    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
391}
392
393/// The object you use to access USB devices from user space, returned by all versions of the IOUSBFamily
394/// currently shipping.
395///
396/// The functions listed here will work with any version of the IOUSBDeviceInterface, including
397/// the one shipped with Mac OS X version 10.0.
398///
399/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface100?language=objc)
400#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
401pub type IOUSBDeviceInterface100 = IOUSBDeviceStruct100;
402
403/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
404/// 1.8.2 and above.
405///
406/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface and
407/// some new functions that are available on Mac OS X version 10.0.4 and later.
408/// Super: IOUSBDeviceInterface
409///
410/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct182?language=objc)
411#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
412#[repr(C)]
413#[allow(unpredictable_function_pointer_comparisons)]
414#[derive(Clone, Copy, Debug, PartialEq)]
415pub struct IOUSBDeviceStruct182 {
416    pub(crate) _reserved: *mut c_void,
417    pub QueryInterface:
418        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
419    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
420    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
421    pub CreateDeviceAsyncEventSource:
422        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
423    pub GetDeviceAsyncEventSource:
424        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
425    pub CreateDeviceAsyncPort:
426        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
427    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
428    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
429    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
430    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
431    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
432    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
433    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
434    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
435    pub GetDeviceReleaseNumber:
436        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
437    pub GetDeviceAddress:
438        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
439    pub GetDeviceBusPowerAvailable:
440        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
441    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
442    pub GetNumberOfConfigurations:
443        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
444    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
445    pub GetConfigurationDescriptorPtr: Option<
446        unsafe extern "C-unwind" fn(
447            *mut c_void,
448            u8,
449            *mut IOUSBConfigurationDescriptorPtr,
450        ) -> IOReturn,
451    >,
452    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
453    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
454    pub GetBusFrameNumber:
455        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
456    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
457    pub DeviceRequest:
458        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
459    pub DeviceRequestAsync: Option<
460        unsafe extern "C-unwind" fn(
461            *mut c_void,
462            *mut IOUSBDevRequest,
463            IOAsyncCallback1,
464            *mut c_void,
465        ) -> IOReturn,
466    >,
467    pub CreateInterfaceIterator: Option<
468        unsafe extern "C-unwind" fn(
469            *mut c_void,
470            *mut IOUSBFindInterfaceRequest,
471            *mut io_iterator_t,
472        ) -> IOReturn,
473    >,
474    /// Opens the IOUSBDevice for exclusive access.
475    ///
476    /// This function opens the IOUSBDevice for exclusive access. If another client
477    /// has the device opened, an attempt is made to get that client to close it before
478    /// returning.  Before the client can issue commands that change the state of the device,
479    /// it must have succeeded in opening the device. This establishes an exclusive
480    /// link between the client's task and the actual device.
481    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
482    ///
483    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
484    ///
485    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already and refuses
486    /// to close it, kIOReturnError if the connection with the kernel can not be established or kIOReturnSuccess if successful.
487    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
488    /// Sends a USB request on the default control pipe.
489    ///
490    /// The device does not have to be open to use this function, but standard requests that change the state of the device may require that the device is opened first. This function sends a USB request on the default control pipe. The IOUSBDevRequestTO structure allows the client to specify timeout values for this request.
491    ///
492    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
493    ///
494    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
495    ///
496    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
497    ///
498    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
499    /// kIOReturnAborted if the thread is interrupted before the call completes,
500    /// or kIOReturnNotOpen if the device is not open for exclusive access.
501    pub DeviceRequestTO:
502        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
503    /// Sends an asynchronous USB request on the default control pipe.
504    ///
505    /// The device does not have to be open to use this function, but standard requests that change the state of the device may require that the device is opened first. This function sends an asynchronous USB request on the default control pipe.  The IOUSBDevRequestTO structure allows the client to specify timeout values for this request.
506    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
507    ///
508    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
509    ///
510    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
511    ///
512    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred
513    /// in the DeviceRequest. A message addressed to this callback is posted to the
514    /// Async port upon completion.
515    ///
516    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
517    ///
518    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
519    /// kIOReturnNotOpen if the device is not open for exclusive access, orkIOUSBNoAsyncPortErr if no Async
520    /// port has been created for this interface.
521    pub DeviceRequestAsyncTO: Option<
522        unsafe extern "C-unwind" fn(
523            *mut c_void,
524            *mut IOUSBDevRequestTO,
525            IOAsyncCallback1,
526            *mut c_void,
527        ) -> IOReturn,
528    >,
529    /// Tells the USB Family to either suspend or resume the port to which a device is attached.
530    ///
531    /// The device must be open to use this function.
532    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
533    ///
534    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
535    ///
536    /// Parameter `suspend`: TRUE to cause the port to be suspended, FALSE to cause it to be resumed.
537    ///
538    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
539    /// or kIOReturnNotOpen if the device is not open for exclusive access.
540    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
541    /// Aborts a transaction on the default control pipe.
542    ///
543    /// The device does not have to be open to use this function.
544    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
545    ///
546    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
547    ///
548    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
549    /// or kIOReturnNotOpen if the device is not open for exclusive access.
550    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
551    /// Returns the manufacturer string index in the device descriptor.
552    ///
553    /// The device does not have to be open to use this function.
554    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
555    ///
556    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
557    ///
558    /// Parameter `msi`: Pointer to UInt8 to hold the string index.
559    ///
560    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
561    pub USBGetManufacturerStringIndex:
562        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
563    /// Returns the product string index in the device descriptor.
564    ///
565    /// The device does not have to be open to use this function.
566    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
567    ///
568    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
569    ///
570    /// Parameter `psi`: Pointer to UInt8 to hold the string index.
571    ///
572    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
573    pub USBGetProductStringIndex:
574        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
575    /// Returns the serial number string index in the device descriptor.
576    ///
577    /// The device does not have to be open to use this function.
578    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
579    ///
580    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
581    ///
582    /// Parameter `snsi`: Pointer to UInt8 to hold the string index.
583    ///
584    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
585    pub USBGetSerialNumberStringIndex:
586        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
587}
588
589#[cfg(all(
590    feature = "AppleUSBDefinitions",
591    feature = "USB",
592    feature = "libc",
593    feature = "objc2"
594))]
595unsafe impl Encode for IOUSBDeviceStruct182 {
596    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct182", &[
597        <*mut c_void>::ENCODING,
598        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
599        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
600        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
601        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
602        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
603        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
604        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
605        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
606        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
607        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
608        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
609        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
610        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
611        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
612        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
613        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
614        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
615        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
616        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
617        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
620        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
621        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
622        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
623        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
624        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
625        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
626        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
627        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
628        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
629        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
630        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
631        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
632        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
633        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
634    ]);
635}
636
637#[cfg(all(
638    feature = "AppleUSBDefinitions",
639    feature = "USB",
640    feature = "libc",
641    feature = "objc2"
642))]
643unsafe impl RefEncode for IOUSBDeviceStruct182 {
644    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
645}
646
647/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
648/// 1.8.2 and above.
649///
650/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface and
651/// some new functions that are available on Mac OS X version 10.0.4 and later.
652/// Super: IOUSBDeviceInterface
653///
654/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface182?language=objc)
655#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
656pub type IOUSBDeviceInterface182 = IOUSBDeviceStruct182;
657
658/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
659/// 10.8.7 and above.
660///
661/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
662/// IOUSBDeviceInterface182, and some new functions that are available on Mac OS X version 10.1.2 and later.
663/// Super: IOUSBDeviceInterface182
664///
665/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct187?language=objc)
666#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
667#[repr(C)]
668#[allow(unpredictable_function_pointer_comparisons)]
669#[derive(Clone, Copy, Debug, PartialEq)]
670pub struct IOUSBDeviceStruct187 {
671    pub(crate) _reserved: *mut c_void,
672    pub QueryInterface:
673        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
674    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
675    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
676    pub CreateDeviceAsyncEventSource:
677        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
678    pub GetDeviceAsyncEventSource:
679        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
680    pub CreateDeviceAsyncPort:
681        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
682    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
683    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
684    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
685    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
686    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
687    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
688    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
689    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
690    pub GetDeviceReleaseNumber:
691        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
692    pub GetDeviceAddress:
693        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
694    pub GetDeviceBusPowerAvailable:
695        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
696    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
697    pub GetNumberOfConfigurations:
698        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
699    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
700    pub GetConfigurationDescriptorPtr: Option<
701        unsafe extern "C-unwind" fn(
702            *mut c_void,
703            u8,
704            *mut IOUSBConfigurationDescriptorPtr,
705        ) -> IOReturn,
706    >,
707    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
708    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
709    pub GetBusFrameNumber:
710        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
711    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
712    pub DeviceRequest:
713        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
714    pub DeviceRequestAsync: Option<
715        unsafe extern "C-unwind" fn(
716            *mut c_void,
717            *mut IOUSBDevRequest,
718            IOAsyncCallback1,
719            *mut c_void,
720        ) -> IOReturn,
721    >,
722    pub CreateInterfaceIterator: Option<
723        unsafe extern "C-unwind" fn(
724            *mut c_void,
725            *mut IOUSBFindInterfaceRequest,
726            *mut io_iterator_t,
727        ) -> IOReturn,
728    >,
729    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
730    pub DeviceRequestTO:
731        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
732    pub DeviceRequestAsyncTO: Option<
733        unsafe extern "C-unwind" fn(
734            *mut c_void,
735            *mut IOUSBDevRequestTO,
736            IOAsyncCallback1,
737            *mut c_void,
738        ) -> IOReturn,
739    >,
740    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
741    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
742    pub USBGetManufacturerStringIndex:
743        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
744    pub USBGetProductStringIndex:
745        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
746    pub USBGetSerialNumberStringIndex:
747        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
748    /// Tells the IOUSBFamily to reenumerate the device.
749    ///
750    /// This function will send a terminate message to all clients of the IOUSBDevice (such as
751    /// IOUSBInterfaces and their drivers, as well as the current User Client), emulating an unplug
752    /// of the device. The IOUSBFamily will then enumerate the device as if it had just
753    /// been plugged in. This call should be used by clients wishing to take advantage
754    /// of the Device Firmware Update Class specification.  The device must be open to use this function, except when you are passing the kUSBReEnumerateCaptureDeviceBit or
755    /// kUSBReEnumerateReleaseDeviceBit options.  In those cases you either need to (1) have the "com.apple.vm.device-access" entitlement set and the IOUSBDevice needs to have successfully been authorized by
756    /// the IOKit's IOServiceAuthorize() APIs or (2) run with root privileges.
757    /// Availability: This function is only available with IOUSBDeviceInterface187 and above.
758    ///
759    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
760    ///
761    /// Parameter `options`: A UInt32 with a bit mask of options.  See USB.h and the USBReEnumerateOptions enum.  If the kUSBReEnumerateCaptureDeviceBit is used
762    /// the client needs to either (1) have the "com.apple.vm.device-access" entitlement set and the IOUSBDevice needs to have successfully been authorized by
763    /// the IOKit's IOServiceAuthorize() APIs or (2) run with root privileges.  Using that bit will terminate any kernel drivers for all non-mass storage interfaces
764    /// attached to the device, as well as for any kernel driver that is attached to the device.  Specifying the kUSBReEnumerateReleaseDeviceBit will cause the IOUSBDevice to
765    /// be returned to the OS and the driver for that device to be reloaded.
766    ///
767    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
768    /// or kIOReturnNotOpen if the device is not open for exclusive access.
769    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
770}
771
772#[cfg(all(
773    feature = "AppleUSBDefinitions",
774    feature = "USB",
775    feature = "libc",
776    feature = "objc2"
777))]
778unsafe impl Encode for IOUSBDeviceStruct187 {
779    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct187", &[
780        <*mut c_void>::ENCODING,
781        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
782        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
783        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
784        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
785        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
786        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
787        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
788        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
789        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
790        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
791        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
792        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
793        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
794        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
795        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
796        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
797        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
798        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
799        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
800        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
801        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
802        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
803        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
804        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
805        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
806        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
807        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
808        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
809        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
810        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
811        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
812        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
813        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
814        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
815        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
816        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
817        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
818    ]);
819}
820
821#[cfg(all(
822    feature = "AppleUSBDefinitions",
823    feature = "USB",
824    feature = "libc",
825    feature = "objc2"
826))]
827unsafe impl RefEncode for IOUSBDeviceStruct187 {
828    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
829}
830
831/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
832/// 10.8.7 and above.
833///
834/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
835/// IOUSBDeviceInterface182, and some new functions that are available on Mac OS X version 10.1.2 and later.
836/// Super: IOUSBDeviceInterface182
837///
838/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface187?language=objc)
839#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
840pub type IOUSBDeviceInterface187 = IOUSBDeviceStruct187;
841
842/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
843/// 1.9.7 and above.
844///
845/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
846/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, and some new functions that are available
847/// on Mac OS X version 10.2.3 and later.
848/// Super: IOUSBDeviceInterface187
849///
850/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct197?language=objc)
851#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
852#[repr(C)]
853#[allow(unpredictable_function_pointer_comparisons)]
854#[derive(Clone, Copy, Debug, PartialEq)]
855pub struct IOUSBDeviceStruct197 {
856    pub(crate) _reserved: *mut c_void,
857    pub QueryInterface:
858        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
859    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
860    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
861    pub CreateDeviceAsyncEventSource:
862        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
863    pub GetDeviceAsyncEventSource:
864        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
865    pub CreateDeviceAsyncPort:
866        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
867    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
868    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
869    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
870    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
871    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
872    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
873    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
874    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
875    pub GetDeviceReleaseNumber:
876        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
877    pub GetDeviceAddress:
878        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
879    pub GetDeviceBusPowerAvailable:
880        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
881    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
882    pub GetNumberOfConfigurations:
883        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
884    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
885    pub GetConfigurationDescriptorPtr: Option<
886        unsafe extern "C-unwind" fn(
887            *mut c_void,
888            u8,
889            *mut IOUSBConfigurationDescriptorPtr,
890        ) -> IOReturn,
891    >,
892    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
893    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
894    pub GetBusFrameNumber:
895        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
896    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
897    pub DeviceRequest:
898        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
899    pub DeviceRequestAsync: Option<
900        unsafe extern "C-unwind" fn(
901            *mut c_void,
902            *mut IOUSBDevRequest,
903            IOAsyncCallback1,
904            *mut c_void,
905        ) -> IOReturn,
906    >,
907    pub CreateInterfaceIterator: Option<
908        unsafe extern "C-unwind" fn(
909            *mut c_void,
910            *mut IOUSBFindInterfaceRequest,
911            *mut io_iterator_t,
912        ) -> IOReturn,
913    >,
914    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
915    pub DeviceRequestTO:
916        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
917    pub DeviceRequestAsyncTO: Option<
918        unsafe extern "C-unwind" fn(
919            *mut c_void,
920            *mut IOUSBDevRequestTO,
921            IOAsyncCallback1,
922            *mut c_void,
923        ) -> IOReturn,
924    >,
925    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
926    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
927    pub USBGetManufacturerStringIndex:
928        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
929    pub USBGetProductStringIndex:
930        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
931    pub USBGetSerialNumberStringIndex:
932        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
933    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
934    /// Gets the current micro frame number of the bus to which the device is attached.
935    ///
936    /// The device does not have to be open to use this function.
937    /// Availability: This function is only available with IOUSBDeviceInterface197 and above.
938    ///
939    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
940    ///
941    /// Parameter `microFrame`: Pointer to UInt64 to hold the microframe number.
942    ///
943    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus
944    /// frame number was acquired.
945    ///
946    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
947    pub GetBusMicroFrameNumber:
948        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
949    /// Returns the version of the IOUSBLib and the version of the IOUSBFamily.
950    ///
951    /// The device does not have to be open to use this function.
952    /// Availability: This function is only available with IOUSBDeviceInterface197 and above.
953    ///
954    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
955    ///
956    /// Parameter `ioUSBLibVersion`: Pointer to a NumVersion structure that on return will contain the version of
957    /// the IOUSBLib.
958    ///
959    /// Parameter `usbFamilyVersion`: Pointer to a NumVersion structure that on return will contain the version of
960    /// the IOUSBFamily.
961    ///
962    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
963    pub GetIOUSBLibVersion: Option<
964        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
965    >,
966}
967
968#[cfg(all(
969    feature = "AppleUSBDefinitions",
970    feature = "USB",
971    feature = "libc",
972    feature = "objc2"
973))]
974unsafe impl Encode for IOUSBDeviceStruct197 {
975    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct197", &[
976        <*mut c_void>::ENCODING,
977        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
978        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
979        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
980        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
981        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
982        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
983        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
984        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
985        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
986        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
987        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
988        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
989        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
990        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
991        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
992        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
993        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
994        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
995        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
996        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
997        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
998        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
999        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1000        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1001        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1002        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1003        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1004        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1005        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1006        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1007        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1008        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1009        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1010        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1011        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1012        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1013        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1014        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1015        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1016    ]);
1017}
1018
1019#[cfg(all(
1020    feature = "AppleUSBDefinitions",
1021    feature = "USB",
1022    feature = "libc",
1023    feature = "objc2"
1024))]
1025unsafe impl RefEncode for IOUSBDeviceStruct197 {
1026    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1027}
1028
1029/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1030/// 1.9.7 and above.
1031///
1032/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1033/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, and some new functions that are available
1034/// on Mac OS X version 10.2.3 and later.
1035/// Super: IOUSBDeviceInterface187
1036///
1037/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface197?language=objc)
1038#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1039pub type IOUSBDeviceInterface197 = IOUSBDeviceStruct197;
1040
1041/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1042/// 2.4.5 and above.
1043///
1044/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1045/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, and some new functions that are available
1046/// on Mac OS X version 10.2.3 and later.
1047/// Super: IOUSBDeviceInterface197
1048///
1049/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct245?language=objc)
1050#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1051#[repr(C)]
1052#[allow(unpredictable_function_pointer_comparisons)]
1053#[derive(Clone, Copy, Debug, PartialEq)]
1054pub struct IOUSBDeviceStruct245 {
1055    pub(crate) _reserved: *mut c_void,
1056    pub QueryInterface:
1057        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1058    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1059    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1060    pub CreateDeviceAsyncEventSource:
1061        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1062    pub GetDeviceAsyncEventSource:
1063        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1064    pub CreateDeviceAsyncPort:
1065        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1066    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1067    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1068    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1069    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1070    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1071    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1072    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1073    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1074    pub GetDeviceReleaseNumber:
1075        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1076    pub GetDeviceAddress:
1077        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1078    pub GetDeviceBusPowerAvailable:
1079        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1080    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1081    pub GetNumberOfConfigurations:
1082        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1083    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1084    pub GetConfigurationDescriptorPtr: Option<
1085        unsafe extern "C-unwind" fn(
1086            *mut c_void,
1087            u8,
1088            *mut IOUSBConfigurationDescriptorPtr,
1089        ) -> IOReturn,
1090    >,
1091    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1092    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1093    pub GetBusFrameNumber:
1094        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1095    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1096    pub DeviceRequest:
1097        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1098    pub DeviceRequestAsync: Option<
1099        unsafe extern "C-unwind" fn(
1100            *mut c_void,
1101            *mut IOUSBDevRequest,
1102            IOAsyncCallback1,
1103            *mut c_void,
1104        ) -> IOReturn,
1105    >,
1106    pub CreateInterfaceIterator: Option<
1107        unsafe extern "C-unwind" fn(
1108            *mut c_void,
1109            *mut IOUSBFindInterfaceRequest,
1110            *mut io_iterator_t,
1111        ) -> IOReturn,
1112    >,
1113    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1114    pub DeviceRequestTO:
1115        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1116    pub DeviceRequestAsyncTO: Option<
1117        unsafe extern "C-unwind" fn(
1118            *mut c_void,
1119            *mut IOUSBDevRequestTO,
1120            IOAsyncCallback1,
1121            *mut c_void,
1122        ) -> IOReturn,
1123    >,
1124    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1125    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1126    pub USBGetManufacturerStringIndex:
1127        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1128    pub USBGetProductStringIndex:
1129        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1130    pub USBGetSerialNumberStringIndex:
1131        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1132    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1133    pub GetBusMicroFrameNumber:
1134        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1135    pub GetIOUSBLibVersion: Option<
1136        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1137    >,
1138}
1139
1140#[cfg(all(
1141    feature = "AppleUSBDefinitions",
1142    feature = "USB",
1143    feature = "libc",
1144    feature = "objc2"
1145))]
1146unsafe impl Encode for IOUSBDeviceStruct245 {
1147    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct245", &[
1148        <*mut c_void>::ENCODING,
1149        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1150        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1151        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1152        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1153        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1154        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1155        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1156        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1157        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1158        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1159        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1160        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1161        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1162        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1163        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1164        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1165        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1166        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1167        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1168        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1169        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1170        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1171        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1172        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1173        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1174        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1175        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1176        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1177        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1178        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1179        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1180        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1181        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1182        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1183        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1184        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1185        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1186        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1187        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1188    ]);
1189}
1190
1191#[cfg(all(
1192    feature = "AppleUSBDefinitions",
1193    feature = "USB",
1194    feature = "libc",
1195    feature = "objc2"
1196))]
1197unsafe impl RefEncode for IOUSBDeviceStruct245 {
1198    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1199}
1200
1201/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1202/// 2.4.5 and above.
1203///
1204/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1205/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, and some new functions that are available
1206/// on Mac OS X version 10.2.3 and later.
1207/// Super: IOUSBDeviceInterface197
1208///
1209/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface245?language=objc)
1210#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1211pub type IOUSBDeviceInterface245 = IOUSBDeviceStruct245;
1212
1213/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.0.0 and above.
1214///
1215/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1216/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245,
1217/// and some new functions that are available on Mac OS X version 10.5 and later.
1218/// Super: IOUSBDeviceInterface245
1219///
1220/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct300?language=objc)
1221#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1222#[repr(C)]
1223#[allow(unpredictable_function_pointer_comparisons)]
1224#[derive(Clone, Copy, Debug, PartialEq)]
1225pub struct IOUSBDeviceStruct300 {
1226    pub(crate) _reserved: *mut c_void,
1227    pub QueryInterface:
1228        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1229    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1230    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1231    pub CreateDeviceAsyncEventSource:
1232        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1233    pub GetDeviceAsyncEventSource:
1234        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1235    pub CreateDeviceAsyncPort:
1236        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1237    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1238    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1239    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1240    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1241    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1242    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1243    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1244    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1245    pub GetDeviceReleaseNumber:
1246        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1247    pub GetDeviceAddress:
1248        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1249    pub GetDeviceBusPowerAvailable:
1250        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1251    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1252    pub GetNumberOfConfigurations:
1253        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1254    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1255    pub GetConfigurationDescriptorPtr: Option<
1256        unsafe extern "C-unwind" fn(
1257            *mut c_void,
1258            u8,
1259            *mut IOUSBConfigurationDescriptorPtr,
1260        ) -> IOReturn,
1261    >,
1262    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1263    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1264    pub GetBusFrameNumber:
1265        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1266    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1267    pub DeviceRequest:
1268        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1269    pub DeviceRequestAsync: Option<
1270        unsafe extern "C-unwind" fn(
1271            *mut c_void,
1272            *mut IOUSBDevRequest,
1273            IOAsyncCallback1,
1274            *mut c_void,
1275        ) -> IOReturn,
1276    >,
1277    pub CreateInterfaceIterator: Option<
1278        unsafe extern "C-unwind" fn(
1279            *mut c_void,
1280            *mut IOUSBFindInterfaceRequest,
1281            *mut io_iterator_t,
1282        ) -> IOReturn,
1283    >,
1284    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1285    pub DeviceRequestTO:
1286        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1287    pub DeviceRequestAsyncTO: Option<
1288        unsafe extern "C-unwind" fn(
1289            *mut c_void,
1290            *mut IOUSBDevRequestTO,
1291            IOAsyncCallback1,
1292            *mut c_void,
1293        ) -> IOReturn,
1294    >,
1295    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1296    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1297    pub USBGetManufacturerStringIndex:
1298        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1299    pub USBGetProductStringIndex:
1300        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1301    pub USBGetSerialNumberStringIndex:
1302        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1303    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1304    pub GetBusMicroFrameNumber:
1305        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1306    pub GetIOUSBLibVersion: Option<
1307        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1308    >,
1309    /// Gets a recent frame number of the bus to which the device is attached, along with a system time corresponding to the start of that frame
1310    ///
1311    /// The device does not have to be open to use this function.
1312    /// Availability: This function is only available with IOUSBDeviceInterface300 and above.
1313    ///
1314    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1315    ///
1316    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
1317    ///
1318    /// Parameter `atTime`: Pointer to a returned AbsoluteTime, which is the system time ("wall time") as close as possible to the beginning of that USB frame. The jitter on this value may be as much as 200 microseconds.
1319    ///
1320    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1321    pub GetBusFrameNumberWithTime:
1322        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1323}
1324
1325#[cfg(all(
1326    feature = "AppleUSBDefinitions",
1327    feature = "USB",
1328    feature = "libc",
1329    feature = "objc2"
1330))]
1331unsafe impl Encode for IOUSBDeviceStruct300 {
1332    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct300", &[
1333        <*mut c_void>::ENCODING,
1334        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1335        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1336        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1337        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1338        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1339        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1340        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1341        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1342        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1343        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1344        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1345        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1346        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1347        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1348        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1349        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1350        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1351        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1352        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1353        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1354        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1355        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1356        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1357        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1358        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1359        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1360        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1361        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1362        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1363        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1364        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1365        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1366        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1367        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1368        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1369        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1370        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1371        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1372        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1373        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1374    ]);
1375}
1376
1377#[cfg(all(
1378    feature = "AppleUSBDefinitions",
1379    feature = "USB",
1380    feature = "libc",
1381    feature = "objc2"
1382))]
1383unsafe impl RefEncode for IOUSBDeviceStruct300 {
1384    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1385}
1386
1387/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.0.0 and above.
1388///
1389/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1390/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245,
1391/// and some new functions that are available on Mac OS X version 10.5 and later.
1392/// Super: IOUSBDeviceInterface245
1393///
1394/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface300?language=objc)
1395#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1396pub type IOUSBDeviceInterface300 = IOUSBDeviceStruct300;
1397
1398/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
1399///
1400/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1401/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300
1402/// and some new functions that are available on Mac OS X version 10.5.4 and later.
1403/// Super: IOUSBDeviceInterface300
1404///
1405/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct320?language=objc)
1406#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1407#[repr(C)]
1408#[allow(unpredictable_function_pointer_comparisons)]
1409#[derive(Clone, Copy, Debug, PartialEq)]
1410pub struct IOUSBDeviceStruct320 {
1411    pub(crate) _reserved: *mut c_void,
1412    pub QueryInterface:
1413        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1414    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1415    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1416    pub CreateDeviceAsyncEventSource:
1417        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1418    pub GetDeviceAsyncEventSource:
1419        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1420    pub CreateDeviceAsyncPort:
1421        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1422    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1423    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1424    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1425    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1426    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1427    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1428    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1429    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1430    pub GetDeviceReleaseNumber:
1431        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1432    pub GetDeviceAddress:
1433        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1434    pub GetDeviceBusPowerAvailable:
1435        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1436    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1437    pub GetNumberOfConfigurations:
1438        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1439    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1440    pub GetConfigurationDescriptorPtr: Option<
1441        unsafe extern "C-unwind" fn(
1442            *mut c_void,
1443            u8,
1444            *mut IOUSBConfigurationDescriptorPtr,
1445        ) -> IOReturn,
1446    >,
1447    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1448    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1449    pub GetBusFrameNumber:
1450        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1451    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1452    pub DeviceRequest:
1453        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1454    pub DeviceRequestAsync: Option<
1455        unsafe extern "C-unwind" fn(
1456            *mut c_void,
1457            *mut IOUSBDevRequest,
1458            IOAsyncCallback1,
1459            *mut c_void,
1460        ) -> IOReturn,
1461    >,
1462    pub CreateInterfaceIterator: Option<
1463        unsafe extern "C-unwind" fn(
1464            *mut c_void,
1465            *mut IOUSBFindInterfaceRequest,
1466            *mut io_iterator_t,
1467        ) -> IOReturn,
1468    >,
1469    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1470    pub DeviceRequestTO:
1471        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1472    pub DeviceRequestAsyncTO: Option<
1473        unsafe extern "C-unwind" fn(
1474            *mut c_void,
1475            *mut IOUSBDevRequestTO,
1476            IOAsyncCallback1,
1477            *mut c_void,
1478        ) -> IOReturn,
1479    >,
1480    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1481    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1482    pub USBGetManufacturerStringIndex:
1483        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1484    pub USBGetProductStringIndex:
1485        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1486    pub USBGetSerialNumberStringIndex:
1487        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1488    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1489    pub GetBusMicroFrameNumber:
1490        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1491    pub GetIOUSBLibVersion: Option<
1492        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1493    >,
1494    pub GetBusFrameNumberWithTime:
1495        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1496    /// Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state.
1497    ///
1498    /// The device does not have to be open to use this function.
1499    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1500    ///
1501    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1502    ///
1503    /// Parameter `info`: Pointer to a buffer that returns a bit field of information on the device (see the USBDeviceInformationBits in USB.h).
1504    ///
1505    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1506    pub GetUSBDeviceInformation:
1507        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1508    /// 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).
1509    ///
1510    /// The device has to be open to use this function.
1511    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1512    ///
1513    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1514    ///
1515    /// Parameter `type`: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1516    ///
1517    /// Parameter `requestedPower`: Amount of power desired, in mA
1518    ///
1519    /// Parameter `powerAvailable`: Amount of power that was reserved, in mA
1520    ///
1521    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1522    pub RequestExtraPower:
1523        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1524    /// Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API.
1525    ///
1526    /// The device has to be open to use this function.
1527    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1528    ///
1529    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1530    ///
1531    /// Parameter `type`: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1532    ///
1533    /// Parameter `powerReturned`: Amount of power to be returned, in mA.
1534    ///
1535    /// 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.
1536    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1537    /// Clients can use this API to ask how much extra power has already been reserved by this device.  Units are milliAmps (mA).
1538    ///
1539    /// The device has to be open to use this function.
1540    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1541    ///
1542    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1543    ///
1544    /// Parameter `type`: Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1545    ///
1546    /// Parameter `powerAllocated`: Amount of power to be returned, in mA.
1547    ///
1548    /// 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.
1549    pub GetExtraPowerAllocated:
1550        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1551}
1552
1553#[cfg(all(
1554    feature = "AppleUSBDefinitions",
1555    feature = "USB",
1556    feature = "libc",
1557    feature = "objc2"
1558))]
1559unsafe impl Encode for IOUSBDeviceStruct320 {
1560    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct320", &[
1561        <*mut c_void>::ENCODING,
1562        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1563        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1564        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1565        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1566        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1567        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1568        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1569        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1570        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1571        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1572        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1573        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1574        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1575        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1576        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1577        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1578        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1579        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1580        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1581        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1582        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1583        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1584        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1585        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1586        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1587        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1588        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1589        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1590        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1591        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1592        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1593        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1594        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1595        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1596        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1597        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1598        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1599        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1600        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1601        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1602        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1603        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1604        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1605        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1606    ]);
1607}
1608
1609#[cfg(all(
1610    feature = "AppleUSBDefinitions",
1611    feature = "USB",
1612    feature = "libc",
1613    feature = "objc2"
1614))]
1615unsafe impl RefEncode for IOUSBDeviceStruct320 {
1616    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1617}
1618
1619/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
1620///
1621/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1622/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300
1623/// and some new functions that are available on Mac OS X version 10.5.4 and later.
1624/// Super: IOUSBDeviceInterface300
1625///
1626/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface320?language=objc)
1627#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1628pub type IOUSBDeviceInterface320 = IOUSBDeviceStruct320;
1629
1630/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 4.0.0 and above.
1631///
1632/// This object is functionally identical to IOUSBDeviceInterface320 on macOS, and includes some new functions that are only available on iOS.
1633/// Super: IOUSBDeviceInterface320
1634///
1635/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct400?language=objc)
1636#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1637#[repr(C)]
1638#[allow(unpredictable_function_pointer_comparisons)]
1639#[derive(Clone, Copy, Debug, PartialEq)]
1640pub struct IOUSBDeviceStruct400 {
1641    pub(crate) _reserved: *mut c_void,
1642    pub QueryInterface:
1643        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1644    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1645    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1646    pub CreateDeviceAsyncEventSource:
1647        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1648    pub GetDeviceAsyncEventSource:
1649        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1650    pub CreateDeviceAsyncPort:
1651        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1652    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1653    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1654    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1655    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1656    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1657    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1658    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1659    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1660    pub GetDeviceReleaseNumber:
1661        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1662    pub GetDeviceAddress:
1663        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1664    pub GetDeviceBusPowerAvailable:
1665        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1666    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1667    pub GetNumberOfConfigurations:
1668        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1669    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1670    pub GetConfigurationDescriptorPtr: Option<
1671        unsafe extern "C-unwind" fn(
1672            *mut c_void,
1673            u8,
1674            *mut IOUSBConfigurationDescriptorPtr,
1675        ) -> IOReturn,
1676    >,
1677    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1678    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1679    pub GetBusFrameNumber:
1680        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1681    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1682    pub DeviceRequest:
1683        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1684    pub DeviceRequestAsync: Option<
1685        unsafe extern "C-unwind" fn(
1686            *mut c_void,
1687            *mut IOUSBDevRequest,
1688            IOAsyncCallback1,
1689            *mut c_void,
1690        ) -> IOReturn,
1691    >,
1692    pub CreateInterfaceIterator: Option<
1693        unsafe extern "C-unwind" fn(
1694            *mut c_void,
1695            *mut IOUSBFindInterfaceRequest,
1696            *mut io_iterator_t,
1697        ) -> IOReturn,
1698    >,
1699    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1700    pub DeviceRequestTO:
1701        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1702    pub DeviceRequestAsyncTO: Option<
1703        unsafe extern "C-unwind" fn(
1704            *mut c_void,
1705            *mut IOUSBDevRequestTO,
1706            IOAsyncCallback1,
1707            *mut c_void,
1708        ) -> IOReturn,
1709    >,
1710    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1711    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1712    pub USBGetManufacturerStringIndex:
1713        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1714    pub USBGetProductStringIndex:
1715        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1716    pub USBGetSerialNumberStringIndex:
1717        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1718    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1719    pub GetBusMicroFrameNumber:
1720        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1721    pub GetIOUSBLibVersion: Option<
1722        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1723    >,
1724    pub GetBusFrameNumberWithTime:
1725        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1726    pub GetUSBDeviceInformation:
1727        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1728    pub RequestExtraPower:
1729        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1730    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1731    pub GetExtraPowerAllocated:
1732        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1733}
1734
1735#[cfg(all(
1736    feature = "AppleUSBDefinitions",
1737    feature = "USB",
1738    feature = "libc",
1739    feature = "objc2"
1740))]
1741unsafe impl Encode for IOUSBDeviceStruct400 {
1742    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct400", &[
1743        <*mut c_void>::ENCODING,
1744        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1745        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1746        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1747        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1748        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1749        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1750        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1751        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1752        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1753        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1754        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1755        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1756        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1757        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1758        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1759        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1760        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1761        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1762        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1763        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1764        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1765        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1766        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1767        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1768        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1769        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1770        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1771        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1772        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1773        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1774        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1775        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1776        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1777        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1778        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1779        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1780        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1781        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1782        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1783        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1784        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1785        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1786        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1787        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1788    ]);
1789}
1790
1791#[cfg(all(
1792    feature = "AppleUSBDefinitions",
1793    feature = "USB",
1794    feature = "libc",
1795    feature = "objc2"
1796))]
1797unsafe impl RefEncode for IOUSBDeviceStruct400 {
1798    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1799}
1800
1801/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 4.0.0 and above.
1802///
1803/// This object is functionally identical to IOUSBDeviceInterface320 on macOS, and includes some new functions that are only available on iOS.
1804/// Super: IOUSBDeviceInterface320
1805///
1806/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface400?language=objc)
1807#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1808pub type IOUSBDeviceInterface400 = IOUSBDeviceStruct400;
1809
1810/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 5.0.0 and above.
1811///
1812/// The functions listed here include all of the functions defined for IOUSBDeviceInterface400, and some new functions that are available on Mac OS X version 10.7.3 and later.
1813/// Super: IOUSBDeviceInterface400
1814///
1815/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct500?language=objc)
1816#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1817#[repr(C)]
1818#[allow(unpredictable_function_pointer_comparisons)]
1819#[derive(Clone, Copy, Debug, PartialEq)]
1820pub struct IOUSBDeviceStruct500 {
1821    pub(crate) _reserved: *mut c_void,
1822    pub QueryInterface:
1823        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1824    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1825    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1826    pub CreateDeviceAsyncEventSource:
1827        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1828    pub GetDeviceAsyncEventSource:
1829        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1830    pub CreateDeviceAsyncPort:
1831        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1832    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1833    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1834    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1835    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1836    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1837    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1838    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1839    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1840    pub GetDeviceReleaseNumber:
1841        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1842    pub GetDeviceAddress:
1843        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1844    pub GetDeviceBusPowerAvailable:
1845        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1846    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1847    pub GetNumberOfConfigurations:
1848        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1849    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1850    pub GetConfigurationDescriptorPtr: Option<
1851        unsafe extern "C-unwind" fn(
1852            *mut c_void,
1853            u8,
1854            *mut IOUSBConfigurationDescriptorPtr,
1855        ) -> IOReturn,
1856    >,
1857    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1858    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1859    pub GetBusFrameNumber:
1860        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1861    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1862    pub DeviceRequest:
1863        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1864    pub DeviceRequestAsync: Option<
1865        unsafe extern "C-unwind" fn(
1866            *mut c_void,
1867            *mut IOUSBDevRequest,
1868            IOAsyncCallback1,
1869            *mut c_void,
1870        ) -> IOReturn,
1871    >,
1872    pub CreateInterfaceIterator: Option<
1873        unsafe extern "C-unwind" fn(
1874            *mut c_void,
1875            *mut IOUSBFindInterfaceRequest,
1876            *mut io_iterator_t,
1877        ) -> IOReturn,
1878    >,
1879    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1880    pub DeviceRequestTO:
1881        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1882    pub DeviceRequestAsyncTO: Option<
1883        unsafe extern "C-unwind" fn(
1884            *mut c_void,
1885            *mut IOUSBDevRequestTO,
1886            IOAsyncCallback1,
1887            *mut c_void,
1888        ) -> IOReturn,
1889    >,
1890    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1891    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1892    pub USBGetManufacturerStringIndex:
1893        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1894    pub USBGetProductStringIndex:
1895        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1896    pub USBGetSerialNumberStringIndex:
1897        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1898    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1899    pub GetBusMicroFrameNumber:
1900        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1901    pub GetIOUSBLibVersion: Option<
1902        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1903    >,
1904    pub GetBusFrameNumberWithTime:
1905        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1906    pub GetUSBDeviceInformation:
1907        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1908    pub RequestExtraPower:
1909        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1910    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1911    pub GetExtraPowerAllocated:
1912        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1913    /// Returns the amount of bandwidth available on the bus for allocation to
1914    /// periodic pipes.  If the device is a high or super speed device, it will be the number of bytes per microframe (125 �secs). If it is a full
1915    /// speed device, it will be the number of bytes per frame (1ms)
1916    ///
1917    /// This function is useful for determining the correct AltInterface setting as well as for using
1918    /// SetPipePolicy. The interface does not have to be open to use this function.
1919    /// Availability: This function is only available with IOUSBDeviceInterface500 and above.
1920    ///
1921    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1922    ///
1923    /// Parameter `bandwidth`: Pointer to UInt32 to hold the amount of bandwidth available (in bytes per frame or microframe).
1924    ///
1925    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
1926    pub GetBandwidthAvailableForDevice:
1927        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1928}
1929
1930#[cfg(all(
1931    feature = "AppleUSBDefinitions",
1932    feature = "USB",
1933    feature = "libc",
1934    feature = "objc2"
1935))]
1936unsafe impl Encode for IOUSBDeviceStruct500 {
1937    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct500", &[
1938        <*mut c_void>::ENCODING,
1939        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1940        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1941        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1942        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1943        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1944        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1945        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1946        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1947        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1948        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1949        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1950        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1951        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1952        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1953        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1954        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1955        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1956        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1957        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1958        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1959        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1960        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1961        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1962        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1963        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1964        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1966        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1967        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1968        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1969        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1970        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1971        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1972        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1973        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1974        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1975        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1976        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1977        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1978        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1979        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1980        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1981        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1982        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1983        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1984    ]);
1985}
1986
1987#[cfg(all(
1988    feature = "AppleUSBDefinitions",
1989    feature = "USB",
1990    feature = "libc",
1991    feature = "objc2"
1992))]
1993unsafe impl RefEncode for IOUSBDeviceStruct500 {
1994    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1995}
1996
1997/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 5.0.0 and above.
1998///
1999/// The functions listed here include all of the functions defined for IOUSBDeviceInterface400, and some new functions that are available on Mac OS X version 10.7.3 and later.
2000/// Super: IOUSBDeviceInterface400
2001///
2002/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface500?language=objc)
2003#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2004pub type IOUSBDeviceInterface500 = IOUSBDeviceStruct500;
2005
2006/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 650.4.0 and above.
2007///
2008/// The functions listed here include all of the functions defined for IOUSBDeviceInterface500, and some new functions that are available on Mac OS X version 10.9 and later.
2009/// Super: IOUSBDeviceInterface500
2010///
2011/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct650?language=objc)
2012#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2013#[repr(C)]
2014#[allow(unpredictable_function_pointer_comparisons)]
2015#[derive(Clone, Copy, Debug, PartialEq)]
2016pub struct IOUSBDeviceStruct650 {
2017    pub(crate) _reserved: *mut c_void,
2018    pub QueryInterface:
2019        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2020    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2021    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2022    pub CreateDeviceAsyncEventSource:
2023        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2024    pub GetDeviceAsyncEventSource:
2025        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2026    pub CreateDeviceAsyncPort:
2027        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2028    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2029    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2030    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2031    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2032    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2033    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2034    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2035    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2036    pub GetDeviceReleaseNumber:
2037        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2038    pub GetDeviceAddress:
2039        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
2040    pub GetDeviceBusPowerAvailable:
2041        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2042    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2043    pub GetNumberOfConfigurations:
2044        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2045    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2046    pub GetConfigurationDescriptorPtr: Option<
2047        unsafe extern "C-unwind" fn(
2048            *mut c_void,
2049            u8,
2050            *mut IOUSBConfigurationDescriptorPtr,
2051        ) -> IOReturn,
2052    >,
2053    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2054    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2055    pub GetBusFrameNumber:
2056        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2057    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2058    pub DeviceRequest:
2059        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
2060    pub DeviceRequestAsync: Option<
2061        unsafe extern "C-unwind" fn(
2062            *mut c_void,
2063            *mut IOUSBDevRequest,
2064            IOAsyncCallback1,
2065            *mut c_void,
2066        ) -> IOReturn,
2067    >,
2068    pub CreateInterfaceIterator: Option<
2069        unsafe extern "C-unwind" fn(
2070            *mut c_void,
2071            *mut IOUSBFindInterfaceRequest,
2072            *mut io_iterator_t,
2073        ) -> IOReturn,
2074    >,
2075    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2076    pub DeviceRequestTO:
2077        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
2078    pub DeviceRequestAsyncTO: Option<
2079        unsafe extern "C-unwind" fn(
2080            *mut c_void,
2081            *mut IOUSBDevRequestTO,
2082            IOAsyncCallback1,
2083            *mut c_void,
2084        ) -> IOReturn,
2085    >,
2086    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
2087    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2088    pub USBGetManufacturerStringIndex:
2089        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2090    pub USBGetProductStringIndex:
2091        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2092    pub USBGetSerialNumberStringIndex:
2093        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2094    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
2095    pub GetBusMicroFrameNumber:
2096        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2097    pub GetIOUSBLibVersion: Option<
2098        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
2099    >,
2100    pub GetBusFrameNumberWithTime:
2101        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2102    pub GetUSBDeviceInformation:
2103        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2104    pub RequestExtraPower:
2105        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
2106    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
2107    pub GetExtraPowerAllocated:
2108        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
2109    pub GetBandwidthAvailableForDevice:
2110        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2111    /// Sets the configuration in the device.
2112    ///
2113    /// Note that setting the configuration causes any existing IOUSBInterface objects attached to the
2114    /// IOUSBDevice to be destroyed, and all of the interfaces in the new configuration to be instantiated
2115    /// as new IOUSBInterface objects.  The device must be open to use this function.
2116    ///
2117    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2118    ///
2119    /// Parameter `configNum`: The value of the desired configuration (from IOUSBConfigurationDescriptor.bConfigurationValue)
2120    ///
2121    /// Parameter `startInterfaceMatching`: true if IOUSBFamily should call IOKit to match the IOUSBInterface nubs.  If false is set, the client
2122    /// needs to either (1) have the "com.apple.vm.device-access" entitlement and have the IOUSBDevice authorized
2123    /// via the IOKit's IOServiceAuthorize() API or (1) have root privileges.
2124    ///
2125    /// Parameter `issueRemoteWakeup`: true if IOUSBFamily should send the command to enable remote wakeup in the device
2126    ///
2127    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2128    /// or kIOReturnNotOpen if the device is not open for exclusive access.
2129    pub SetConfigurationV2:
2130        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, bool, bool) -> IOReturn>,
2131    /// Registers a callback routine to be invoked when certain events occur in the kernel.
2132    ///
2133    /// The callback function will be called, for example when the underlying IOUSBDevice is
2134    /// going to be suspended due to some kind of kernel activity. It will also be called when
2135    /// the underlying IOUSBDevice is resumed.
2136    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2137    ///
2138    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2139    ///
2140    /// Parameter `notificationMask`: Specifies the desired type of notification
2141    ///
2142    /// Parameter `callback`: An IOAsyncCallback2 method. Upon completion, the arg0 argument of the AsyncCallback2 will contain the
2143    /// notification type, and arg1 will contain a notificationToken which should be used when calling AcknowledgeNotification
2144    ///
2145    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2146    ///
2147    /// Parameter `pRegistrationToken`: A pointer to a UInt64 which will contain a registration token if the function is
2148    /// successful. This registration token can then later be used to call UnregisterNotification.
2149    ///
2150    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2151    pub RegisterForNotification: Option<
2152        unsafe extern "C-unwind" fn(
2153            *mut c_void,
2154            u64,
2155            IOAsyncCallback2,
2156            *mut c_void,
2157            *mut u64,
2158        ) -> IOReturn,
2159    >,
2160    /// Unregisters a previously registered callback routine
2161    ///
2162    /// The callback routine will no longer be invoked when events occur
2163    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2164    ///
2165    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2166    ///
2167    /// Parameter `registrationToken`: The registration token which was obtained in the call to RegisterForNotification
2168    ///
2169    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2170    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2171    /// Acknowledges a notification event
2172    ///
2173    /// Some events in the kernel will wait for an acknowledgement from all interested parties before proceeding.
2174    /// For example, if an IOUSBDevice is about to be suspended, any User Code which has registered to receive
2175    /// that event will be notified and should acknowledge the notification when it is ready for the IOUSBDevice
2176    /// to be suspended.
2177    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2178    ///
2179    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2180    ///
2181    /// Parameter `notificationToken`: The notification token which was passed in to the callback routine
2182    ///
2183    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2184    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2185}
2186
2187#[cfg(all(
2188    feature = "AppleUSBDefinitions",
2189    feature = "USB",
2190    feature = "libc",
2191    feature = "objc2"
2192))]
2193unsafe impl Encode for IOUSBDeviceStruct650 {
2194    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct650", &[
2195        <*mut c_void>::ENCODING,
2196        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
2197        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2198        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2199        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
2200        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
2201        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
2202        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
2203        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2204        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2205        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2206        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2207        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2208        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2209        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2210        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2211        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
2212        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2213        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2214        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2215        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2216        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
2217        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2218        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
2219        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2220        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2221        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
2222        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2223        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
2224        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2225        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
2226        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2227        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
2228        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2229        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2230        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2231        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2232        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
2233        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2234        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
2235        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2236        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2237        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
2238        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
2239        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
2240        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2241        Encoding::Pointer(&Encoding::Unknown),
2242        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
2243        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2244        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2245    ]);
2246}
2247
2248#[cfg(all(
2249    feature = "AppleUSBDefinitions",
2250    feature = "USB",
2251    feature = "libc",
2252    feature = "objc2"
2253))]
2254unsafe impl RefEncode for IOUSBDeviceStruct650 {
2255    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2256}
2257
2258/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 650.4.0 and above.
2259///
2260/// The functions listed here include all of the functions defined for IOUSBDeviceInterface500, and some new functions that are available on Mac OS X version 10.9 and later.
2261/// Super: IOUSBDeviceInterface500
2262///
2263/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface650?language=objc)
2264#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2265pub type IOUSBDeviceInterface650 = IOUSBDeviceStruct650;
2266
2267/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 900.4.2 and above.
2268///
2269/// The functions listed here include all of the functions defined for IOUSBDeviceInterface650, and some new functions that are available on macOS 10.14 and later.
2270/// Super: IOUSBDeviceInterface650
2271///
2272/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct942?language=objc)
2273#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2274#[repr(C)]
2275#[allow(unpredictable_function_pointer_comparisons)]
2276#[derive(Clone, Copy, Debug, PartialEq)]
2277pub struct IOUSBDeviceStruct942 {
2278    pub(crate) _reserved: *mut c_void,
2279    pub QueryInterface:
2280        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2281    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2282    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2283    pub CreateDeviceAsyncEventSource:
2284        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2285    pub GetDeviceAsyncEventSource:
2286        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2287    pub CreateDeviceAsyncPort:
2288        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2289    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2290    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2291    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2292    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2293    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2294    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2295    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2296    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2297    pub GetDeviceReleaseNumber:
2298        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2299    pub GetDeviceAddress:
2300        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
2301    pub GetDeviceBusPowerAvailable:
2302        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2303    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2304    pub GetNumberOfConfigurations:
2305        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2306    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2307    pub GetConfigurationDescriptorPtr: Option<
2308        unsafe extern "C-unwind" fn(
2309            *mut c_void,
2310            u8,
2311            *mut IOUSBConfigurationDescriptorPtr,
2312        ) -> IOReturn,
2313    >,
2314    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2315    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2316    pub GetBusFrameNumber:
2317        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2318    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2319    pub DeviceRequest:
2320        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
2321    pub DeviceRequestAsync: Option<
2322        unsafe extern "C-unwind" fn(
2323            *mut c_void,
2324            *mut IOUSBDevRequest,
2325            IOAsyncCallback1,
2326            *mut c_void,
2327        ) -> IOReturn,
2328    >,
2329    pub CreateInterfaceIterator: Option<
2330        unsafe extern "C-unwind" fn(
2331            *mut c_void,
2332            *mut IOUSBFindInterfaceRequest,
2333            *mut io_iterator_t,
2334        ) -> IOReturn,
2335    >,
2336    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2337    pub DeviceRequestTO:
2338        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
2339    pub DeviceRequestAsyncTO: Option<
2340        unsafe extern "C-unwind" fn(
2341            *mut c_void,
2342            *mut IOUSBDevRequestTO,
2343            IOAsyncCallback1,
2344            *mut c_void,
2345        ) -> IOReturn,
2346    >,
2347    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
2348    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2349    pub USBGetManufacturerStringIndex:
2350        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2351    pub USBGetProductStringIndex:
2352        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2353    pub USBGetSerialNumberStringIndex:
2354        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2355    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
2356    pub GetBusMicroFrameNumber:
2357        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2358    pub GetIOUSBLibVersion: Option<
2359        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
2360    >,
2361    pub GetBusFrameNumberWithTime:
2362        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2363    pub GetUSBDeviceInformation:
2364        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2365    pub RequestExtraPower:
2366        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
2367    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
2368    pub GetExtraPowerAllocated:
2369        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
2370    pub GetBandwidthAvailableForDevice:
2371        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2372    pub SetConfigurationV2:
2373        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, bool, bool) -> IOReturn>,
2374    pub RegisterForNotification: Option<
2375        unsafe extern "C-unwind" fn(
2376            *mut c_void,
2377            u64,
2378            IOAsyncCallback2,
2379            *mut c_void,
2380            *mut u64,
2381        ) -> IOReturn,
2382    >,
2383    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2384    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2385    /// Returns the IONotificationPort for this IOService instance.
2386    /// Availability: This function is only available with IOUSBDeviceInterface942 and above.
2387    ///
2388    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2389    ///
2390    /// Returns: Returns the IONotificationPortRef if one exists, MACH_PORT_NULL otherwise.
2391    pub GetDeviceAsyncNotificationPort:
2392        Option<unsafe extern "C-unwind" fn(*mut c_void) -> IONotificationPortRef>,
2393}
2394
2395#[cfg(all(
2396    feature = "AppleUSBDefinitions",
2397    feature = "USB",
2398    feature = "libc",
2399    feature = "objc2"
2400))]
2401unsafe impl Encode for IOUSBDeviceStruct942 {
2402    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct942", &[
2403        <*mut c_void>::ENCODING,
2404        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
2405        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2406        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2407        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
2408        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
2409        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
2410        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
2411        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2412        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2413        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2414        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2415        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2416        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2417        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2418        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2419        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
2420        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2421        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2422        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2423        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2424        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
2425        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2426        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
2427        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2428        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2429        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
2430        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2431        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
2432        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2433        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
2434        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2435        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
2436        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2437        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2438        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2439        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2440        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
2441        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2442        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
2443        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2444        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2445        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
2446        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
2447        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
2448        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2449        Encoding::Pointer(&Encoding::Unknown),
2450        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
2451        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2452        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2453        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IONotificationPortRef>>::ENCODING,
2454    ]);
2455}
2456
2457#[cfg(all(
2458    feature = "AppleUSBDefinitions",
2459    feature = "USB",
2460    feature = "libc",
2461    feature = "objc2"
2462))]
2463unsafe impl RefEncode for IOUSBDeviceStruct942 {
2464    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2465}
2466
2467/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 900.4.2 and above.
2468///
2469/// The functions listed here include all of the functions defined for IOUSBDeviceInterface650, and some new functions that are available on macOS 10.14 and later.
2470/// Super: IOUSBDeviceInterface650
2471///
2472/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface942?language=objc)
2473#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2474pub type IOUSBDeviceInterface942 = IOUSBDeviceStruct942;
2475
2476/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface?language=objc)
2477#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2478pub type IOUSBDeviceInterface = IOUSBDeviceInterface942;
2479
2480/// The object you use to access a USB device interface from user space, returned by all versions
2481/// of the IOUSBFamily currently shipping.
2482///
2483/// The functions listed here will work with any version of the IOUSBInterfaceInterface, including
2484/// the one shipped with Mac OS X version 10.0.
2485///
2486/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct100?language=objc)
2487#[cfg(all(feature = "USB", feature = "libc"))]
2488#[repr(C)]
2489#[allow(unpredictable_function_pointer_comparisons)]
2490#[derive(Clone, Copy, Debug, PartialEq)]
2491pub struct IOUSBInterfaceStruct100 {
2492    pub(crate) _reserved: *mut c_void,
2493    pub QueryInterface:
2494        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2495    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2496    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2497    /// Creates a run loop source for delivery of all asynchronous notifications on this device.
2498    ///
2499    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead
2500    /// it delivers completion notifications on a Mach port (see {
2501    ///
2502    /// ```text
2503    ///  CreateInterfaceAsyncPort}). This
2504    ///                 routine wraps that port with the appropriate routing code so that
2505    ///                 the completion notifications can be automatically routed through the client's
2506    ///                 CFRunLoop.
2507    ///        @param      self Pointer to the IOUSBInterfaceInterface.
2508    ///        @param      source Pointer to a CFRunLoopSourceRef to return the newly created run loop event source.
2509    ///        @result     Returns kIOReturnSuccess if successful or a kern_return_t if failed.
2510    ///      
2511    ///
2512    /// ```
2513    pub CreateInterfaceAsyncEventSource:
2514        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2515    /// Returns the CFRunLoopSourceRef for this IOService instance.
2516    ///
2517    /// (description)
2518    ///
2519    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2520    ///
2521    /// Returns: Returns the run loop source if one has been created, 0 otherwise.
2522    pub GetInterfaceAsyncEventSource:
2523        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2524    /// Creates and registers a mach_port_t for asynchronous communications.
2525    ///
2526    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead
2527    /// it delivers completion notifications on this Mach port. After receiving a message
2528    /// on this port the client is obliged to call the IOKitLib.h: IODispatchCalloutFromMessage()
2529    /// function for decoding the notification message.
2530    ///
2531    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2532    ///
2533    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if failed.
2534    pub CreateInterfaceAsyncPort:
2535        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2536    /// Returns the mach_port_t port for this IOService instance.
2537    ///
2538    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2539    ///
2540    /// Returns: Returns the port if one exists, 0 otherwise.
2541    pub GetInterfaceAsyncPort:
2542        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2543    /// Opensthe IOUSBInterface for exclusive access.
2544    ///
2545    /// Before the client can transfer data to and from the interface, it must have
2546    /// succeeded in opening the interface. This establishes an exclusive link between
2547    /// the client's task and the actual interface device. Opening the interface causes
2548    /// pipes to be created on each endpoint contained in the interface. If the interface
2549    /// contains isochronous endpoints, an attempt is made to allocate bandwidth on
2550    /// the bus for each of those pipes. If there is not enough bandwidth available,
2551    /// an isochronous pipe may be created with a bandwidth of zero. The software must
2552    /// then call SetPipePolicy to change the size of that pipe before it can be used
2553    /// for I/O.
2554    ///
2555    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2556    ///
2557    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already,
2558    /// kIOReturnError if the connection with the kernel cannot be established or
2559    /// kIOReturnSuccess if successful.
2560    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2561    /// Closes the task's connection to the IOUSBInterface.
2562    ///
2563    /// Releases the client's exclusive access to the IOUSBInterface.
2564    ///
2565    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2566    ///
2567    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2568    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2569    /// Returns the USB Class of the interface  (bInterfaceClass).
2570    ///
2571    /// The interface does not have to be open to use this function.
2572    ///
2573    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2574    ///
2575    /// Parameter `intfClass`: Pointer to UInt8 to hold the interface Class.
2576    ///
2577    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2578    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2579    /// Returns the USB Subclass of the interface (bInterfaceSubClass).
2580    ///
2581    /// The interface does not have to be open to use this function.
2582    ///
2583    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2584    ///
2585    /// Parameter `intfSubClass`: Pointer to UInt8 to hold the interface Subclass.
2586    ///
2587    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2588    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2589    /// Returns the USB Protocol of the interface (bInterfaceProtocol).
2590    ///
2591    /// The interface does not have to be open to use this function.
2592    ///
2593    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2594    ///
2595    /// Parameter `intfProtocol`: Pointer to UInt8 to hold the interface Protocol.
2596    ///
2597    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2598    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2599    /// Returns the USB Vendor ID (idVendor) of the device of which this interface is a part.
2600    ///
2601    /// The interface does not have to be open to use this function.
2602    ///
2603    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2604    ///
2605    /// Parameter `devVendor`: Pointer to UInt16 to hold the vendorID.
2606    ///
2607    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2608    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2609    /// Returns the USB Product ID (idProduct) of the device of which this interface is a part.
2610    ///
2611    /// The interface does not have to be open to use this function.
2612    ///
2613    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2614    ///
2615    /// Parameter `devProduct`: Pointer to UInt16 to hold the ProductID.
2616    ///
2617    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2618    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2619    /// Returns the Device Release Number (bcdDevice) of the device of which this interface is a part.
2620    ///
2621    /// The interface does not have to be open to use this function.
2622    ///
2623    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2624    ///
2625    /// Parameter `devRelNum`: Pointer to UInt16 to hold the Release Number.
2626    ///
2627    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2628    pub GetDeviceReleaseNumber:
2629        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2630    /// Returns the current configuration value set in the device (the interface will be part of that configuration.)
2631    ///
2632    /// The interface does not have to be open to use this function.
2633    ///
2634    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2635    ///
2636    /// Parameter `configVal`: Pointer to UInt8 to hold the configuration value.
2637    ///
2638    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2639    pub GetConfigurationValue:
2640        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2641    /// Returns the interface number (zero-based index) of this interface within the current configuration of the device.
2642    ///
2643    /// The interface does not have to be open to use this function.
2644    ///
2645    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2646    ///
2647    /// Parameter `intfNumber`: Pointer to UInt8 to hold the interface number.
2648    ///
2649    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2650    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2651    /// Returns the alternate setting currently selected in this interface.
2652    ///
2653    /// The interface does not have to be open to use this function.
2654    ///
2655    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2656    ///
2657    /// Parameter `intfAltSetting`: Pointer to UInt8 to hold the alternate setting value.
2658    ///
2659    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2660    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2661    /// Returns the number of endpoints in this interface.
2662    ///
2663    /// The interface does not have to be open to use this function.
2664    ///
2665    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2666    ///
2667    /// Parameter `intfNumEndpoints`: Pointer to UInt8 to hold the number of endpoints.
2668    ///
2669    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2670    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2671    /// Returns the location ID.
2672    ///
2673    /// The location ID is a 32 bit number which is unique among all USB devices in the system, and which
2674    /// will not change on a system reboot unless the topology of the bus itself changes.  The interface
2675    /// does not have to be open to use this function.
2676    ///
2677    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2678    ///
2679    /// Parameter `locationID`: Pointer to UInt32 to hold the location ID.
2680    ///
2681    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2682    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2683    /// Returns the device of which this interface is part.
2684    ///
2685    /// The interface does not have to be open to use this function. The returned device can be used to
2686    /// create a CFPlugin to talk to the device.
2687    ///
2688    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2689    ///
2690    /// Parameter `device`: Pointer to io_service_t to hold the result.
2691    ///
2692    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2693    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
2694    /// Changes the AltInterface setting.
2695    ///
2696    /// The interface must be open to use this function.
2697    ///
2698    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2699    ///
2700    /// Parameter `alternateSetting`: The new alternate setting for the interface.
2701    ///
2702    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2703    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2704    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2705    /// Gets the current frame number of the bus to which the interface and its device are attached.
2706    ///
2707    /// The interface does not have to be open to use this function.
2708    ///
2709    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2710    ///
2711    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
2712    ///
2713    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus frame
2714    /// number was attained.
2715    ///
2716    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2717    pub GetBusFrameNumber:
2718        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2719    /// Sends a USB request on a control pipe.
2720    ///
2721    /// If the request is a standard request which will change the state of the device, the device must
2722    /// be open, which means you should be using the IOUSBDeviceInterface for this command.
2723    ///
2724    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2725    ///
2726    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
2727    ///
2728    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
2729    ///
2730    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2731    /// kIOReturnAborted if the thread is interrupted before the call completes,
2732    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2733    pub ControlRequest:
2734        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
2735    /// Sends an asynchronous USB request on a control pipe.
2736    ///
2737    /// Use pipeRef=0 for the default device control pipe.  If the request is a standard request which will
2738    /// change the state of the device, the device must be open, which means you should be using the
2739    /// IOUSBDeviceInterface for this command.
2740    ///
2741    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2742    ///
2743    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
2744    ///
2745    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
2746    ///
2747    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred. A message addressed to this callback is posted to the Async port upon completion.
2748    ///
2749    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2750    ///
2751    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2752    /// kIOReturnNotOpen if the interface is not open for exclusive access, or kIOUSBNoAsyncPortErr if no
2753    /// Async port has been created for this interface.
2754    pub ControlRequestAsync: Option<
2755        unsafe extern "C-unwind" fn(
2756            *mut c_void,
2757            u8,
2758            *mut IOUSBDevRequest,
2759            IOAsyncCallback1,
2760            *mut c_void,
2761        ) -> IOReturn,
2762    >,
2763    /// Gets the properties for a pipe.
2764    ///
2765    /// Once an interface is opened, all of the pipes in that interface get created by the kernel. The number
2766    /// of pipes can be retrieved by GetNumEndpoints. The client can then get the properties of any pipe
2767    /// using an index of 1 to GetNumEndpoints. Pipe 0 is the default control pipe in the device.
2768    ///
2769    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2770    ///
2771    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2772    ///
2773    /// Parameter `direction`: Pointer to an UInt8 to get the direction of the pipe.
2774    ///
2775    /// Parameter `number`: Pointer to an UInt8 to get the pipe number.
2776    ///
2777    /// Parameter `transferType`: Pointer to an UInt8 to get the transfer type of the pipe.
2778    ///
2779    /// Parameter `maxPacketSize`: Pointer to an UInt16 to get the maxPacketSize of the pipe. This maxPacketSize is the FULL maxPacketSize, which takes into account the multipler for HS Isoc pipes
2780    /// and the burst and the multiplier for SS Isoc pipes. It could also have been adjusted by SetPipePolicy.
2781    ///
2782    /// Parameter `interval`: Pointer to an UInt8 to get the interval for polling the pipe for data (in milliseconds).
2783    ///
2784    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2785    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2786    pub GetPipeProperties: Option<
2787        unsafe extern "C-unwind" fn(
2788            *mut c_void,
2789            u8,
2790            *mut u8,
2791            *mut u8,
2792            *mut u8,
2793            *mut u16,
2794            *mut u8,
2795        ) -> IOReturn,
2796    >,
2797    /// Gets the current status of a pipe.
2798    ///
2799    /// The interface must be open for the pipe to exist.
2800    ///
2801    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2802    ///
2803    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2804    ///
2805    /// Returns: Returns kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen
2806    /// if the interface is not open for exclusive access. Otherwise, the status of the pipe is returned.
2807    /// Returns kIOUSBPipeStalled if the pipe is stalled. See
2808    ///
2809    /// ```text
2810    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
2811    /// ```
2812    ///
2813    /// or
2814    ///
2815    /// ```text
2816    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2817    /// ```
2818    ///
2819    /// for
2820    /// more information.
2821    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2822    /// Aborts any outstanding transactions on the pipe with status kIOReturnAborted.
2823    ///
2824    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen.
2825    /// Note that this command will also clear the halted bit on the endpoint
2826    /// in the controller, but will NOT clear the data toggle bit.  If you want to clear the data toggle bit as well, see
2827    ///
2828    /// ```text
2829    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
2830    /// ```
2831    ///
2832    /// or
2833    ///
2834    /// ```text
2835    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2836    /// ```
2837    ///
2838    /// for more information.  The interface must be open for the pipe to exist.
2839    ///
2840    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2841    ///
2842    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2843    ///
2844    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2845    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2846    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2847    /// Equivalent to ClearPipeStall.
2848    ///
2849    /// The interface must be open for the pipe to exist.
2850    ///
2851    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2852    ///
2853    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2854    ///
2855    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2856    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2857    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2858    /// Clears the halted bit and the data toggle bit on the pipe's endpoint in the controller.
2859    ///
2860    /// This function also returns any outstanding transactions on the pipe with status kIOUSBTransactionReturned.
2861    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen. The data
2862    /// toggle may need to be resynchronized. The driver may handle this by sending a ClearFeature(ENDPOINT_HALT)
2863    /// to the default control pipe, specifying the device's endpoint for this pipe. See also
2864    ///
2865    /// ```text
2866    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2867    /// ```
2868    ///
2869    /// .
2870    ///
2871    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2872    ///
2873    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2874    ///
2875    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2876    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2877    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2878    /// Reads data on a
2879    /// <b>
2880    /// BULK IN
2881    /// </b>
2882    /// or an
2883    /// <b>
2884    /// INTERRUPT
2885    /// </b>
2886    /// pipe.
2887    ///
2888    /// The interface must be open for the pipe to exist.
2889    ///
2890    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2891    ///
2892    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2893    ///
2894    /// Parameter `buf`: Buffer to hold the data.
2895    ///
2896    /// Parameter `size`: On entry: a pointer to the size of the buffer pointed to by buf.
2897    /// On exit: a pointer to the number of bytes actually read from the device.
2898    ///
2899    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2900    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2901    pub ReadPipe:
2902        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
2903    /// Writes data on a
2904    /// <b>
2905    /// BULK OUT
2906    /// </b>
2907    /// or
2908    /// <b>
2909    /// INTERRUPT OUT
2910    /// </b>
2911    /// pipe.
2912    ///
2913    /// The interface must be open for the pipe to exist.
2914    ///
2915    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2916    ///
2917    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2918    ///
2919    /// Parameter `buf`: Buffer to hold the data.
2920    ///
2921    /// Parameter `size`: The size of the data buffer.
2922    ///
2923    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2924    /// kIOReturnAborted if the thread is interrupted before the call completes,
2925    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2926    pub WritePipe:
2927        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
2928    /// Performs an asynchronous read on a
2929    /// <b>
2930    /// BULK IN
2931    /// </b>
2932    /// or an
2933    /// <b>
2934    /// INTERRUPT
2935    /// </b>
2936    /// pipe.
2937    ///
2938    /// The interface must be open for the pipe to exist.
2939    ///
2940    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2941    ///
2942    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2943    ///
2944    /// Parameter `buf`: Buffer to hold the data.
2945    ///
2946    /// Parameter `size`: The size of the buffer pointed to by buf.
2947    ///
2948    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually read. A message addressed to this callback is posted to the Async
2949    /// port upon completion.
2950    ///
2951    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2952    ///
2953    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2954    /// kIOReturnAborted if the thread is interrupted before the call completes,
2955    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2956    pub ReadPipeAsync: Option<
2957        unsafe extern "C-unwind" fn(
2958            *mut c_void,
2959            u8,
2960            *mut c_void,
2961            u32,
2962            IOAsyncCallback1,
2963            *mut c_void,
2964        ) -> IOReturn,
2965    >,
2966    /// Performs an asynchronous write on a
2967    /// <b>
2968    /// BULK OUT
2969    /// </b>
2970    /// or
2971    /// <b>
2972    /// INTERRUPT OUT
2973    /// </b>
2974    /// pipe.
2975    ///
2976    /// The interface must be open for the pipe to exist.
2977    ///
2978    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2979    ///
2980    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2981    ///
2982    /// Parameter `buf`: Buffer to hold the data.
2983    ///
2984    /// Parameter `size`: The size of the buffer pointed to by buf.
2985    ///
2986    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually written. A message addressed to this callback is posted to the Async
2987    /// port upon completion.
2988    ///
2989    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2990    ///
2991    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2992    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2993    pub WritePipeAsync: Option<
2994        unsafe extern "C-unwind" fn(
2995            *mut c_void,
2996            u8,
2997            *mut c_void,
2998            u32,
2999            IOAsyncCallback1,
3000            *mut c_void,
3001        ) -> IOReturn,
3002    >,
3003    /// Performs a read on an
3004    /// <b>
3005    /// ISOCHRONOUS
3006    /// </b>
3007    /// pipe.
3008    ///
3009    /// The interface must be open for the pipe to exist.
3010    ///
3011    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3012    ///
3013    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3014    ///
3015    /// Parameter `buf`: Buffer to hold the data.
3016    ///
3017    /// Parameter `frameStart`: The bus frame number on which to start the read (obtained from GetBusFrameNumber).
3018    ///
3019    /// Parameter `numFrames`: The number of frames for which to transfer data.
3020    ///
3021    /// Parameter `frameList`: A pointer to an array of IOUSBIsocFrame structures describing the frames.
3022    ///
3023    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. A message addressed to this callback is posted to the Async
3024    /// port upon completion.
3025    ///
3026    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3027    ///
3028    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3029    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
3030    pub ReadIsochPipeAsync: Option<
3031        unsafe extern "C-unwind" fn(
3032            *mut c_void,
3033            u8,
3034            *mut c_void,
3035            u64,
3036            u32,
3037            *mut IOUSBIsocFrame,
3038            IOAsyncCallback1,
3039            *mut c_void,
3040        ) -> IOReturn,
3041    >,
3042    /// Performs an asynchronous write on an
3043    /// <b>
3044    /// ISOCHRONOUS
3045    /// </b>
3046    /// pipe.
3047    ///
3048    /// The interface must be open for the pipe to exist.
3049    ///
3050    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3051    ///
3052    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3053    ///
3054    /// Parameter `buf`: Buffer to hold the data.
3055    ///
3056    /// Parameter `frameStart`: The bus frame number on which to start the write (obtained from GetBusFrameNumber).
3057    ///
3058    /// Parameter `numFrames`: The number of frames for which to transfer data.
3059    ///
3060    /// Parameter `frameList`: A pointer to an array of IOUSBIsocFrame structures describing the frames.
3061    ///
3062    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. A message addressed to this callback is posted to the Async
3063    /// port upon completion.
3064    ///
3065    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3066    ///
3067    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3068    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
3069    pub WriteIsochPipeAsync: Option<
3070        unsafe extern "C-unwind" fn(
3071            *mut c_void,
3072            u8,
3073            *mut c_void,
3074            u64,
3075            u32,
3076            *mut IOUSBIsocFrame,
3077            IOAsyncCallback1,
3078            *mut c_void,
3079        ) -> IOReturn,
3080    >,
3081}
3082
3083#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3084unsafe impl Encode for IOUSBInterfaceStruct100 {
3085    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct100", &[
3086        <*mut c_void>::ENCODING,
3087        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3088        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3089        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3090        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3091        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3092        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3093        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3094        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3095        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3096        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3097        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3098        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3099        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3100        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3101        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3102        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3103        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3104        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3105        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3106        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3107        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3108        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3109        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3110        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3111        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3112        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3113        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3114        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3115        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3116        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3117        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3118        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3119        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3120        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3121        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3122        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3123    ]);
3124}
3125
3126#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3127unsafe impl RefEncode for IOUSBInterfaceStruct100 {
3128    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3129}
3130
3131/// The object you use to access a USB device interface from user space, returned by all versions
3132/// of the IOUSBFamily currently shipping.
3133///
3134/// The functions listed here will work with any version of the IOUSBInterfaceInterface, including
3135/// the one shipped with Mac OS X version 10.0.
3136///
3137/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface100?language=objc)
3138#[cfg(all(feature = "USB", feature = "libc"))]
3139pub type IOUSBInterfaceInterface100 = IOUSBInterfaceStruct100;
3140
3141/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3142/// version 1.8.2 and above.
3143///
3144/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface and
3145/// some new functions that are available on Mac OS X version 10.0.4 and later.
3146/// Super: IOUSBInterfaceInterface
3147///
3148/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct182?language=objc)
3149#[cfg(all(feature = "USB", feature = "libc"))]
3150#[repr(C)]
3151#[allow(unpredictable_function_pointer_comparisons)]
3152#[derive(Clone, Copy, Debug, PartialEq)]
3153pub struct IOUSBInterfaceStruct182 {
3154    pub(crate) _reserved: *mut c_void,
3155    pub QueryInterface:
3156        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3157    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3158    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3159    pub CreateInterfaceAsyncEventSource:
3160        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3161    pub GetInterfaceAsyncEventSource:
3162        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3163    pub CreateInterfaceAsyncPort:
3164        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3165    pub GetInterfaceAsyncPort:
3166        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3167    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3168    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3169    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3170    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3171    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3172    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3173    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3174    pub GetDeviceReleaseNumber:
3175        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3176    pub GetConfigurationValue:
3177        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3178    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3179    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3180    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3181    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3182    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3183    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3184    pub GetBusFrameNumber:
3185        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3186    pub ControlRequest:
3187        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3188    pub ControlRequestAsync: Option<
3189        unsafe extern "C-unwind" fn(
3190            *mut c_void,
3191            u8,
3192            *mut IOUSBDevRequest,
3193            IOAsyncCallback1,
3194            *mut c_void,
3195        ) -> IOReturn,
3196    >,
3197    pub GetPipeProperties: Option<
3198        unsafe extern "C-unwind" fn(
3199            *mut c_void,
3200            u8,
3201            *mut u8,
3202            *mut u8,
3203            *mut u8,
3204            *mut u16,
3205            *mut u8,
3206        ) -> IOReturn,
3207    >,
3208    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3209    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3210    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3211    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3212    pub ReadPipe:
3213        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3214    pub WritePipe:
3215        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3216    pub ReadPipeAsync: Option<
3217        unsafe extern "C-unwind" fn(
3218            *mut c_void,
3219            u8,
3220            *mut c_void,
3221            u32,
3222            IOAsyncCallback1,
3223            *mut c_void,
3224        ) -> IOReturn,
3225    >,
3226    pub WritePipeAsync: Option<
3227        unsafe extern "C-unwind" fn(
3228            *mut c_void,
3229            u8,
3230            *mut c_void,
3231            u32,
3232            IOAsyncCallback1,
3233            *mut c_void,
3234        ) -> IOReturn,
3235    >,
3236    pub ReadIsochPipeAsync: Option<
3237        unsafe extern "C-unwind" fn(
3238            *mut c_void,
3239            u8,
3240            *mut c_void,
3241            u64,
3242            u32,
3243            *mut IOUSBIsocFrame,
3244            IOAsyncCallback1,
3245            *mut c_void,
3246        ) -> IOReturn,
3247    >,
3248    pub WriteIsochPipeAsync: Option<
3249        unsafe extern "C-unwind" fn(
3250            *mut c_void,
3251            u8,
3252            *mut c_void,
3253            u64,
3254            u32,
3255            *mut IOUSBIsocFrame,
3256            IOAsyncCallback1,
3257            *mut c_void,
3258        ) -> IOReturn,
3259    >,
3260    /// Sends a USB request on a control pipe.
3261    ///
3262    /// The IOUSBDevRequestTO structure allows the client to specify timeout values for this request.  If
3263    /// the request is a standard request which will change the state of the device, the device must be open,
3264    /// which means you should be using the IOUSBDeviceInterface for this command.
3265    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3266    ///
3267    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3268    ///
3269    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
3270    ///
3271    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
3272    ///
3273    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3274    /// kIOReturnAborted if the thread is interrupted before the call completes,
3275    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3276    pub ControlRequestTO:
3277        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3278    /// Sends an asynchronous USB request on a control pipe.
3279    ///
3280    /// The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. Use
3281    /// pipeRef=0 for the default device control pipe.  If the request is a standard request which will
3282    /// change the state of the device, the device must be open, which means you should be using the
3283    /// IOUSBDeviceInterface for this command.
3284    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3285    ///
3286    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3287    ///
3288    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
3289    ///
3290    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
3291    ///
3292    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred. A message addressed to this callback is posted to the Async
3293    /// port upon completion.
3294    ///
3295    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3296    ///
3297    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3298    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3299    pub ControlRequestAsyncTO: Option<
3300        unsafe extern "C-unwind" fn(
3301            *mut c_void,
3302            u8,
3303            *mut IOUSBDevRequestTO,
3304            IOAsyncCallback1,
3305            *mut c_void,
3306        ) -> IOReturn,
3307    >,
3308    /// Performs a read on a
3309    /// <b>
3310    /// BULK IN
3311    /// </b>
3312    /// pipe, specifying timeout values.
3313    ///
3314    /// The interface must be open for the pipe to exist.
3315    ///
3316    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3317    /// toggle. See
3318    ///
3319    /// ```text
3320    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3321    /// ```
3322    ///
3323    /// or
3324    ///
3325    /// ```text
3326    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3327    /// ```
3328    ///
3329    /// .
3330    ///
3331    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipe API to perform a read from
3332    /// an interrupt pipe.
3333    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3334    ///
3335    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3336    ///
3337    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3338    ///
3339    /// Parameter `buf`: Buffer to hold the data.
3340    ///
3341    /// Parameter `size`: Pointer to the size of the buffer pointed to by buf.
3342    ///
3343    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3344    /// data is transferred in this amount of time, the request will be aborted and returned.
3345    ///
3346    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3347    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3348    ///
3349    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3350    /// kIOReturnAborted if the thread is interrupted before the call completes, or
3351    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
3352    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
3353    /// NOT contain any valid data.
3354    pub ReadPipeTO: Option<
3355        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3356    >,
3357    /// Performs a write on a
3358    /// <b>
3359    /// BULK OUT
3360    /// </b>
3361    /// pipe, with specified timeout values.
3362    ///
3363    /// The interface must be open for the pipe to exist.
3364    ///
3365    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3366    /// toggle. See
3367    ///
3368    /// ```text
3369    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3370    /// ```
3371    ///
3372    /// or
3373    ///
3374    /// ```text
3375    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3376    /// ```
3377    ///
3378    /// .
3379    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3380    ///
3381    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3382    ///
3383    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3384    ///
3385    /// Parameter `buf`: Buffer to hold the data.
3386    ///
3387    /// Parameter `size`: The size of the buffer pointed to by buf.
3388    ///
3389    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3390    /// data is transferred in this amount of time, the request will be aborted and returned.
3391    ///
3392    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3393    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3394    ///
3395    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3396    /// kIOReturnAborted if the thread is interrupted before the call completes, or
3397    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3398    pub WritePipeTO: Option<
3399        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3400    >,
3401    /// Performs an asynchronous read on a
3402    /// <b>
3403    /// BULK IN
3404    /// </b>
3405    /// pipe, with specified timeout values.
3406    ///
3407    /// The interface must be open for the pipe to exist.
3408    ///
3409    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3410    /// toggle. See
3411    ///
3412    /// ```text
3413    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3414    /// ```
3415    ///
3416    /// or
3417    ///
3418    /// ```text
3419    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3420    /// ```
3421    ///
3422    /// .
3423    ///
3424    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync API to perform an
3425    /// asynchronous read from an interrupt pipe.
3426    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3427    ///
3428    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3429    ///
3430    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3431    ///
3432    /// Parameter `buf`: Buffer to hold the data.
3433    ///
3434    /// Parameter `size`: The size of the buffer pointed to by buf.
3435    ///
3436    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3437    /// data is transferred in this amount of time, the request will be aborted and returned.
3438    ///
3439    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3440    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3441    ///
3442    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually read. A message addressed to this callback is posted to the Async port
3443    /// upon completion.
3444    ///
3445    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3446    ///
3447    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3448    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
3449    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
3450    /// NOT contain any valid data.
3451    pub ReadPipeAsyncTO: Option<
3452        unsafe extern "C-unwind" fn(
3453            *mut c_void,
3454            u8,
3455            *mut c_void,
3456            u32,
3457            u32,
3458            u32,
3459            IOAsyncCallback1,
3460            *mut c_void,
3461        ) -> IOReturn,
3462    >,
3463    /// Performs an asynchronous write on a
3464    /// <b>
3465    /// BULK OUT
3466    /// </b>
3467    /// pipe, with specified timeout values.
3468    ///
3469    /// The interface must be open for the pipe to exist.
3470    ///
3471    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3472    /// toggle. See
3473    ///
3474    /// ```text
3475    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3476    /// ```
3477    ///
3478    /// or
3479    ///
3480    /// ```text
3481    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3482    /// ```
3483    ///
3484    /// .
3485    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3486    ///
3487    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3488    ///
3489    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3490    ///
3491    /// Parameter `buf`: Buffer to hold the data.
3492    ///
3493    /// Parameter `size`: The size of the buffer pointed to by buf.
3494    ///
3495    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3496    /// data is transferred in this amount of time, the request will be aborted and returned.
3497    ///
3498    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3499    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3500    ///
3501    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually written. A message addressed to this callback is posted to the Async port
3502    /// upon completion.
3503    ///
3504    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3505    ///
3506    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3507    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3508    pub WritePipeAsyncTO: Option<
3509        unsafe extern "C-unwind" fn(
3510            *mut c_void,
3511            u8,
3512            *mut c_void,
3513            u32,
3514            u32,
3515            u32,
3516            IOAsyncCallback1,
3517            *mut c_void,
3518        ) -> IOReturn,
3519    >,
3520    /// Returns the string index in the interface descriptor.
3521    ///
3522    /// The interface does not have to be open to use this function.
3523    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3524    ///
3525    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3526    ///
3527    /// Parameter `si`: Pointer to UInt8 to hold the string index.
3528    ///
3529    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
3530    pub USBInterfaceGetStringIndex:
3531        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3532}
3533
3534#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3535unsafe impl Encode for IOUSBInterfaceStruct182 {
3536    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct182", &[
3537        <*mut c_void>::ENCODING,
3538        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3539        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3540        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3541        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3542        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3543        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3544        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3545        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3546        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3547        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3548        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3549        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3550        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3551        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3552        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3553        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3554        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3555        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3556        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3557        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3558        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3559        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3560        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3561        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3562        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3563        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3564        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3565        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3566        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3567        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3568        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3569        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3570        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3571        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3572        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3573        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3574        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
3575        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3576        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
3577        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
3578        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3579        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3580        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3581    ]);
3582}
3583
3584#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3585unsafe impl RefEncode for IOUSBInterfaceStruct182 {
3586    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3587}
3588
3589/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3590/// version 1.8.2 and above.
3591///
3592/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface and
3593/// some new functions that are available on Mac OS X version 10.0.4 and later.
3594/// Super: IOUSBInterfaceInterface
3595///
3596/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface182?language=objc)
3597#[cfg(all(feature = "USB", feature = "libc"))]
3598pub type IOUSBInterfaceInterface182 = IOUSBInterfaceStruct182;
3599
3600/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3601/// version 1.8.3 and above.
3602///
3603/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3604/// IOUSBInterfaceInterface182, and some new functions that are available on Mac OS X version 10.1
3605/// and later.
3606/// Super: IOUSBInterfaceInterface182
3607///
3608/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct183?language=objc)
3609#[cfg(all(feature = "USB", feature = "libc"))]
3610#[repr(C)]
3611#[allow(unpredictable_function_pointer_comparisons)]
3612#[derive(Clone, Copy, Debug, PartialEq)]
3613pub struct IOUSBInterfaceStruct183 {
3614    pub(crate) _reserved: *mut c_void,
3615    pub QueryInterface:
3616        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3617    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3618    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3619    pub CreateInterfaceAsyncEventSource:
3620        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3621    pub GetInterfaceAsyncEventSource:
3622        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3623    pub CreateInterfaceAsyncPort:
3624        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3625    pub GetInterfaceAsyncPort:
3626        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3627    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3628    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3629    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3630    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3631    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3632    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3633    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3634    pub GetDeviceReleaseNumber:
3635        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3636    pub GetConfigurationValue:
3637        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3638    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3639    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3640    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3641    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3642    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3643    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3644    pub GetBusFrameNumber:
3645        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3646    pub ControlRequest:
3647        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3648    pub ControlRequestAsync: Option<
3649        unsafe extern "C-unwind" fn(
3650            *mut c_void,
3651            u8,
3652            *mut IOUSBDevRequest,
3653            IOAsyncCallback1,
3654            *mut c_void,
3655        ) -> IOReturn,
3656    >,
3657    pub GetPipeProperties: Option<
3658        unsafe extern "C-unwind" fn(
3659            *mut c_void,
3660            u8,
3661            *mut u8,
3662            *mut u8,
3663            *mut u8,
3664            *mut u16,
3665            *mut u8,
3666        ) -> IOReturn,
3667    >,
3668    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3669    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3670    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3671    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3672    pub ReadPipe:
3673        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3674    pub WritePipe:
3675        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3676    pub ReadPipeAsync: Option<
3677        unsafe extern "C-unwind" fn(
3678            *mut c_void,
3679            u8,
3680            *mut c_void,
3681            u32,
3682            IOAsyncCallback1,
3683            *mut c_void,
3684        ) -> IOReturn,
3685    >,
3686    pub WritePipeAsync: Option<
3687        unsafe extern "C-unwind" fn(
3688            *mut c_void,
3689            u8,
3690            *mut c_void,
3691            u32,
3692            IOAsyncCallback1,
3693            *mut c_void,
3694        ) -> IOReturn,
3695    >,
3696    pub ReadIsochPipeAsync: Option<
3697        unsafe extern "C-unwind" fn(
3698            *mut c_void,
3699            u8,
3700            *mut c_void,
3701            u64,
3702            u32,
3703            *mut IOUSBIsocFrame,
3704            IOAsyncCallback1,
3705            *mut c_void,
3706        ) -> IOReturn,
3707    >,
3708    pub WriteIsochPipeAsync: Option<
3709        unsafe extern "C-unwind" fn(
3710            *mut c_void,
3711            u8,
3712            *mut c_void,
3713            u64,
3714            u32,
3715            *mut IOUSBIsocFrame,
3716            IOAsyncCallback1,
3717            *mut c_void,
3718        ) -> IOReturn,
3719    >,
3720    pub ControlRequestTO:
3721        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3722    pub ControlRequestAsyncTO: Option<
3723        unsafe extern "C-unwind" fn(
3724            *mut c_void,
3725            u8,
3726            *mut IOUSBDevRequestTO,
3727            IOAsyncCallback1,
3728            *mut c_void,
3729        ) -> IOReturn,
3730    >,
3731    pub ReadPipeTO: Option<
3732        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3733    >,
3734    pub WritePipeTO: Option<
3735        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3736    >,
3737    pub ReadPipeAsyncTO: Option<
3738        unsafe extern "C-unwind" fn(
3739            *mut c_void,
3740            u8,
3741            *mut c_void,
3742            u32,
3743            u32,
3744            u32,
3745            IOAsyncCallback1,
3746            *mut c_void,
3747        ) -> IOReturn,
3748    >,
3749    pub WritePipeAsyncTO: Option<
3750        unsafe extern "C-unwind" fn(
3751            *mut c_void,
3752            u8,
3753            *mut c_void,
3754            u32,
3755            u32,
3756            u32,
3757            IOAsyncCallback1,
3758            *mut c_void,
3759        ) -> IOReturn,
3760    >,
3761    pub USBInterfaceGetStringIndex:
3762        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3763    /// Opens the IOUSBInterface for exclusive access.
3764    ///
3765    /// If another client has the device open, an attempt is made to get that client to close it before
3766    /// returning.
3767    ///
3768    /// Before the client can issue commands that change the state of the device, it must have succeeded
3769    /// in opening the device. This establishes an exclusive link between the clients task and the actual
3770    /// device.
3771    /// Availability: This function is only available with IOUSBInterfaceInterface183 and above.
3772    ///
3773    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3774    ///
3775    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the interface open already and refuses to
3776    /// close it, kIOReturnError if the connection with the kernel cannot be established or kIOReturnSuccess
3777    /// if successful.
3778    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3779}
3780
3781#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3782unsafe impl Encode for IOUSBInterfaceStruct183 {
3783    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct183", &[
3784        <*mut c_void>::ENCODING,
3785        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3786        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3787        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3788        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3789        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3790        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3791        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3792        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3793        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3794        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3795        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3796        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3797        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3798        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3799        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3800        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3801        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3802        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3803        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3804        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3805        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3806        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3807        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3808        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3809        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3810        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3811        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3812        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3813        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3814        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3815        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3816        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3817        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3818        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3819        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3820        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3821        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
3822        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3823        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
3824        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
3825        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3826        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3827        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3828        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3829    ]);
3830}
3831
3832#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3833unsafe impl RefEncode for IOUSBInterfaceStruct183 {
3834    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3835}
3836
3837/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3838/// version 1.8.3 and above.
3839///
3840/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3841/// IOUSBInterfaceInterface182, and some new functions that are available on Mac OS X version 10.1
3842/// and later.
3843/// Super: IOUSBInterfaceInterface182
3844///
3845/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface183?language=objc)
3846#[cfg(all(feature = "USB", feature = "libc"))]
3847pub type IOUSBInterfaceInterface183 = IOUSBInterfaceStruct183;
3848
3849/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3850/// version 1.9 and above.
3851///
3852/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3853/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, and some new functions that are available
3854/// on Mac OS X version 10.2 and later.
3855/// Super: IOUSBInterfaceInterface183
3856///
3857/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct190?language=objc)
3858#[cfg(all(feature = "USB", feature = "libc"))]
3859#[repr(C)]
3860#[allow(unpredictable_function_pointer_comparisons)]
3861#[derive(Clone, Copy, Debug, PartialEq)]
3862pub struct IOUSBInterfaceStruct190 {
3863    pub(crate) _reserved: *mut c_void,
3864    pub QueryInterface:
3865        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3866    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3867    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3868    pub CreateInterfaceAsyncEventSource:
3869        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3870    pub GetInterfaceAsyncEventSource:
3871        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3872    pub CreateInterfaceAsyncPort:
3873        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3874    pub GetInterfaceAsyncPort:
3875        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3876    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3877    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3878    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3879    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3880    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3881    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3882    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3883    pub GetDeviceReleaseNumber:
3884        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3885    pub GetConfigurationValue:
3886        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3887    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3888    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3889    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3890    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3891    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3892    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3893    pub GetBusFrameNumber:
3894        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3895    pub ControlRequest:
3896        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3897    pub ControlRequestAsync: Option<
3898        unsafe extern "C-unwind" fn(
3899            *mut c_void,
3900            u8,
3901            *mut IOUSBDevRequest,
3902            IOAsyncCallback1,
3903            *mut c_void,
3904        ) -> IOReturn,
3905    >,
3906    pub GetPipeProperties: Option<
3907        unsafe extern "C-unwind" fn(
3908            *mut c_void,
3909            u8,
3910            *mut u8,
3911            *mut u8,
3912            *mut u8,
3913            *mut u16,
3914            *mut u8,
3915        ) -> IOReturn,
3916    >,
3917    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3918    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3919    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3920    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3921    pub ReadPipe:
3922        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3923    pub WritePipe:
3924        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3925    pub ReadPipeAsync: Option<
3926        unsafe extern "C-unwind" fn(
3927            *mut c_void,
3928            u8,
3929            *mut c_void,
3930            u32,
3931            IOAsyncCallback1,
3932            *mut c_void,
3933        ) -> IOReturn,
3934    >,
3935    pub WritePipeAsync: Option<
3936        unsafe extern "C-unwind" fn(
3937            *mut c_void,
3938            u8,
3939            *mut c_void,
3940            u32,
3941            IOAsyncCallback1,
3942            *mut c_void,
3943        ) -> IOReturn,
3944    >,
3945    pub ReadIsochPipeAsync: Option<
3946        unsafe extern "C-unwind" fn(
3947            *mut c_void,
3948            u8,
3949            *mut c_void,
3950            u64,
3951            u32,
3952            *mut IOUSBIsocFrame,
3953            IOAsyncCallback1,
3954            *mut c_void,
3955        ) -> IOReturn,
3956    >,
3957    pub WriteIsochPipeAsync: Option<
3958        unsafe extern "C-unwind" fn(
3959            *mut c_void,
3960            u8,
3961            *mut c_void,
3962            u64,
3963            u32,
3964            *mut IOUSBIsocFrame,
3965            IOAsyncCallback1,
3966            *mut c_void,
3967        ) -> IOReturn,
3968    >,
3969    pub ControlRequestTO:
3970        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3971    pub ControlRequestAsyncTO: Option<
3972        unsafe extern "C-unwind" fn(
3973            *mut c_void,
3974            u8,
3975            *mut IOUSBDevRequestTO,
3976            IOAsyncCallback1,
3977            *mut c_void,
3978        ) -> IOReturn,
3979    >,
3980    pub ReadPipeTO: Option<
3981        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3982    >,
3983    pub WritePipeTO: Option<
3984        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3985    >,
3986    pub ReadPipeAsyncTO: Option<
3987        unsafe extern "C-unwind" fn(
3988            *mut c_void,
3989            u8,
3990            *mut c_void,
3991            u32,
3992            u32,
3993            u32,
3994            IOAsyncCallback1,
3995            *mut c_void,
3996        ) -> IOReturn,
3997    >,
3998    pub WritePipeAsyncTO: Option<
3999        unsafe extern "C-unwind" fn(
4000            *mut c_void,
4001            u8,
4002            *mut c_void,
4003            u32,
4004            u32,
4005            u32,
4006            IOAsyncCallback1,
4007            *mut c_void,
4008        ) -> IOReturn,
4009    >,
4010    pub USBInterfaceGetStringIndex:
4011        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4012    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4013    /// Equivalent to ClearPipeStall.
4014    ///
4015    /// This function is equivalent to ClearPipeStall except that it also attempts to clear the halt and
4016    /// toggle bits on the device's endpoint for the pipe by sending a ClearFeature(ENDPOINT_HALT) to the
4017    /// default control pipe in the device, specifying the endpoint for the pipe represented by pipeRef. For
4018    /// most devices, this resynchronizes the data toggle between the two endpoints to ensure that there is
4019    /// no loss of data.
4020    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4021    ///
4022    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4023    ///
4024    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4025    ///
4026    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4027    /// kIOReturnNotOpen if the interface is not open for exclusive access.
4028    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4029    /// Changes the amount of bandwidth of an isochronous pipe or interrupt pipe, or the polling interval of an interrupt pipe.
4030    ///
4031    /// A pipe may be made smaller or larger (up to the maxPacketSize specified in the endpoint descriptor).
4032    /// When an interface is first opened, all pipes are created with their descriptor-supplied maxPacketSize.
4033    /// For isochronous or interrupt pipes, if there is not enough bandwidth on the bus to allocate to the pipe, the pipe
4034    /// is created with a reserved bandwidth of zero. Any attempts to transfer data on a pipe with zero
4035    /// bandwidth will result in a kIOReturnNoBandwidth error. The pipe must first be given some bandwidth
4036    /// using this call.  This can also be used to return bandwidth for an isochronous or an interrupt pipe.  If the driver
4037    /// knows that the device will not be sending the maxPacketSize data, it can use this call to return that unused bandwidth to the
4038    /// system.  If an interrupt pipe wants to change the polling interval, it can do so with this call.
4039    ///
4040    /// The interface must be open for the pipe to exist.
4041    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4042    ///
4043    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4044    ///
4045    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4046    ///
4047    /// Parameter `maxPacketSize`: The desired size for the isochronous or interrupt pipe. For Full Speed endpoints and High Speed endpoints which
4048    /// are not High Bandwidth (i.e. only a single packet is transferred in a microframe), valid values are 0 through the maxPacketSize
4049    /// defined in the endpoint descriptor. For High Speed High Bandwidth (i.e. 2 or 3 packets transferred in a microframe) and Super Speed endpoints,
4050    /// valid values are 0 and the maxPacketSize of the endpoint. The maxPacketSize of the endpoint is calculated as the base maxPacketSize
4051    /// multiplies by the burst size and the multiplier. See the USB 2.0 and the USB 3.0 specifications for more detail. Using a value of 0 for maxPacketSize
4052    /// maintains the handle for the pipe but unreserves any bandwidth on the bus.
4053    ///
4054    /// Parameter `maxInterval`: applies only to interrupt endpoints. maxInterval has the same value as the bInterval field of the endpoint.
4055    /// For Low Speed and Full Speed interrupt endpoints, it is the desired polling interval in milliseconds, up to a maximum of 128 ms.
4056    /// The system can only poll devices powers of 2 (1, 2, 4, 8, 16, 32, 64, or 128 ms).
4057    /// For High Speed and Super Speed endpoints, maxInterval is used as an exponent for a (2 ^ (maxInterval-1)) value representing the number
4058    /// of 125uS microframes between service intervals. See the USB 2.0 and the USB 3.0 specifications for more info. The lower layers may
4059    /// schedule the endpoint for service at an interval value equal to or less than the value specified. A value of 0 is illegal.
4060    ///
4061    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4062    /// kIOReturnNotOpen if the interface is not open for exclusive access.  May also return kIOReturnNoBandwidth
4063    /// if there is not enough bandwidth available on the bus, or kIOReturnBadArgument if the desired
4064    /// maxPacketSize is outside of the allowed range.
4065    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4066    /// Returns the amount of bandwidth available on the bus for allocation to
4067    /// isochronous pipes.  If the device is a high speed device, it will be the number of bytes per microframe (125 �secs). If it is a full
4068    /// speed device, it will be the number of bytes per frame (1ms)
4069    ///
4070    /// This function is useful for determining the correct AltInterface setting as well as for using
4071    /// SetPipePolicy.
4072    ///
4073    /// The interface does not have to be open to use this function.
4074    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4075    ///
4076    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4077    ///
4078    /// Parameter `bandwidth`: Pointer to UInt32 to hold the amount of bandwidth available (in bytes per 1ms frame).
4079    ///
4080    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4081    pub GetBandwidthAvailable:
4082        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4083    /// Returns the transfer type, max packet size, and interval of a specified endpoint, whether or not
4084    /// the endpoint has a pipe currently established.
4085    ///
4086    /// This function may be useful for determining which alternate interface to select when trying to
4087    /// balance bandwidth allocations among isochronous pipes.
4088    ///
4089    /// The interface does not have to be open to use this function.
4090    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4091    ///
4092    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4093    ///
4094    /// Parameter `alternateSetting`: Specifies the alternate setting within the current interface.
4095    ///
4096    /// Parameter `endpointNumber`: Specifies the desired endpoint number.
4097    ///
4098    /// Parameter `direction`: Specifies the desired direction.
4099    ///
4100    /// Parameter `transferType`: Pointer to UInt8 to hold the endpoint's transfer type (kUSBControl, kUSBIsoc, etc).
4101    ///
4102    /// Parameter `maxPacketSize`: Pointer to UInt16 to hold the maxPacketSize of the endpoint.
4103    ///
4104    /// Parameter `interval`: Pointer to UInt8 to hold the polling interval for interrupt endpoints.
4105    ///
4106    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4107    pub GetEndpointProperties: Option<
4108        unsafe extern "C-unwind" fn(
4109            *mut c_void,
4110            u8,
4111            u8,
4112            u8,
4113            *mut u8,
4114            *mut u16,
4115            *mut u8,
4116        ) -> IOReturn,
4117    >,
4118}
4119
4120#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4121unsafe impl Encode for IOUSBInterfaceStruct190 {
4122    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct190", &[
4123        <*mut c_void>::ENCODING,
4124        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4125        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4126        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4127        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4128        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4129        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4130        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4131        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4132        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4133        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4134        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4135        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4136        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4137        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4138        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4139        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4140        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4141        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4142        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4143        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4144        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4145        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4146        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4147        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4148        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4149        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4150        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4151        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4152        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4153        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4154        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4155        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4156        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4157        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4158        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4159        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4160        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4161        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4162        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
4163        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
4164        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4165        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4166        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4167        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4168        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4169        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
4170        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4171        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4172    ]);
4173}
4174
4175#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4176unsafe impl RefEncode for IOUSBInterfaceStruct190 {
4177    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4178}
4179
4180/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4181/// version 1.9 and above.
4182///
4183/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4184/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, and some new functions that are available
4185/// on Mac OS X version 10.2 and later.
4186/// Super: IOUSBInterfaceInterface183
4187///
4188/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface190?language=objc)
4189#[cfg(all(feature = "USB", feature = "libc"))]
4190pub type IOUSBInterfaceInterface190 = IOUSBInterfaceStruct190;
4191
4192/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4193/// version 1.9.2 and above.
4194///
4195/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4196/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, and some new
4197/// functions that are available on Mac OS X version 10.2.3 and later.
4198/// Super: IOUSBInterfaceInterface190
4199///
4200/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct192?language=objc)
4201#[cfg(all(feature = "USB", feature = "libc"))]
4202#[repr(C)]
4203#[allow(unpredictable_function_pointer_comparisons)]
4204#[derive(Clone, Copy, Debug, PartialEq)]
4205pub struct IOUSBInterfaceStruct192 {
4206    pub(crate) _reserved: *mut c_void,
4207    pub QueryInterface:
4208        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
4209    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4210    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4211    pub CreateInterfaceAsyncEventSource:
4212        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
4213    pub GetInterfaceAsyncEventSource:
4214        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
4215    pub CreateInterfaceAsyncPort:
4216        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
4217    pub GetInterfaceAsyncPort:
4218        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
4219    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4220    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4221    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4222    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4223    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4224    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4225    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4226    pub GetDeviceReleaseNumber:
4227        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4228    pub GetConfigurationValue:
4229        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4230    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4231    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4232    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4233    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4234    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
4235    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4236    pub GetBusFrameNumber:
4237        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4238    pub ControlRequest:
4239        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
4240    pub ControlRequestAsync: Option<
4241        unsafe extern "C-unwind" fn(
4242            *mut c_void,
4243            u8,
4244            *mut IOUSBDevRequest,
4245            IOAsyncCallback1,
4246            *mut c_void,
4247        ) -> IOReturn,
4248    >,
4249    pub GetPipeProperties: Option<
4250        unsafe extern "C-unwind" fn(
4251            *mut c_void,
4252            u8,
4253            *mut u8,
4254            *mut u8,
4255            *mut u8,
4256            *mut u16,
4257            *mut u8,
4258        ) -> IOReturn,
4259    >,
4260    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4261    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4262    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4263    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4264    pub ReadPipe:
4265        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
4266    pub WritePipe:
4267        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
4268    pub ReadPipeAsync: Option<
4269        unsafe extern "C-unwind" fn(
4270            *mut c_void,
4271            u8,
4272            *mut c_void,
4273            u32,
4274            IOAsyncCallback1,
4275            *mut c_void,
4276        ) -> IOReturn,
4277    >,
4278    pub WritePipeAsync: Option<
4279        unsafe extern "C-unwind" fn(
4280            *mut c_void,
4281            u8,
4282            *mut c_void,
4283            u32,
4284            IOAsyncCallback1,
4285            *mut c_void,
4286        ) -> IOReturn,
4287    >,
4288    pub ReadIsochPipeAsync: Option<
4289        unsafe extern "C-unwind" fn(
4290            *mut c_void,
4291            u8,
4292            *mut c_void,
4293            u64,
4294            u32,
4295            *mut IOUSBIsocFrame,
4296            IOAsyncCallback1,
4297            *mut c_void,
4298        ) -> IOReturn,
4299    >,
4300    pub WriteIsochPipeAsync: Option<
4301        unsafe extern "C-unwind" fn(
4302            *mut c_void,
4303            u8,
4304            *mut c_void,
4305            u64,
4306            u32,
4307            *mut IOUSBIsocFrame,
4308            IOAsyncCallback1,
4309            *mut c_void,
4310        ) -> IOReturn,
4311    >,
4312    pub ControlRequestTO:
4313        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
4314    pub ControlRequestAsyncTO: Option<
4315        unsafe extern "C-unwind" fn(
4316            *mut c_void,
4317            u8,
4318            *mut IOUSBDevRequestTO,
4319            IOAsyncCallback1,
4320            *mut c_void,
4321        ) -> IOReturn,
4322    >,
4323    pub ReadPipeTO: Option<
4324        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
4325    >,
4326    pub WritePipeTO: Option<
4327        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
4328    >,
4329    pub ReadPipeAsyncTO: Option<
4330        unsafe extern "C-unwind" fn(
4331            *mut c_void,
4332            u8,
4333            *mut c_void,
4334            u32,
4335            u32,
4336            u32,
4337            IOAsyncCallback1,
4338            *mut c_void,
4339        ) -> IOReturn,
4340    >,
4341    pub WritePipeAsyncTO: Option<
4342        unsafe extern "C-unwind" fn(
4343            *mut c_void,
4344            u8,
4345            *mut c_void,
4346            u32,
4347            u32,
4348            u32,
4349            IOAsyncCallback1,
4350            *mut c_void,
4351        ) -> IOReturn,
4352    >,
4353    pub USBInterfaceGetStringIndex:
4354        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4355    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4356    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4357    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4358    pub GetBandwidthAvailable:
4359        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4360    pub GetEndpointProperties: Option<
4361        unsafe extern "C-unwind" fn(
4362            *mut c_void,
4363            u8,
4364            u8,
4365            u8,
4366            *mut u8,
4367            *mut u16,
4368            *mut u8,
4369        ) -> IOReturn,
4370    >,
4371    /// Performs an asynchronous read on a isochronous pipe and updates the frame list at primary interrupt time.
4372    ///
4373    /// The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync()
4374    /// calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync(). They differ in that the frame
4375    /// list data is updated at
4376    /// <em>
4377    /// primary interrupt time
4378    /// </em>
4379    /// . This means that the client can inspect the
4380    /// frStatus and frActCount fields as soon as the transaction completes, without having to wait for the
4381    /// callback to happen (depending on the value of updateFrequency). The callback will still happen when
4382    /// all the frames have been received.
4383    ///
4384    /// The client can specify how often the USB stack should update the frame list data by specifying the
4385    /// updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the
4386    /// frame list will be updated every updateFrequency milliseconds. If the value is 0, the
4387    /// frame list will only be updated once all the frames in the transfer have been received. For example,
4388    /// consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame
4389    /// list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will
4390    /// only be updated at the end of the transfer, after the 64 frames have been sent or received. The
4391    /// difference between using an update frequency of 0 and using the non-low latency isoch calls is that
4392    /// in the former case, the frame list will be updated at primary interrupt time, while in the latter,
4393    /// it will be updated at secondary interrupt time. Regardless of the value of updateFrequency,
4394    /// the frame list will
4395    /// <em>
4396    /// always
4397    /// </em>
4398    /// be updated on the last frame of a transfer.
4399    ///
4400    /// The rationale for adding this call is that because completion routines run on the USB Workloop, they
4401    /// can be scheduled to run a number of milliseconds after the USB transfer has finished. This latency
4402    /// is variable and depends on what other higher priority threads are running on the system. This latency
4403    /// presents a problem for applications, such as audio processing, that depend on receiving data,
4404    /// processing it, and sending it back out, and need to do this as fast as possible. Since applications
4405    /// that use isochronous data know when the data should be available, they can look at the frame list at
4406    /// the expected time and note the frActCount and frStatus (and frTimeStamp
4407    /// if needed) and determine how many valid bytes are in their data buffer and whether there was an
4408    /// error. They can then access their data buffer and process the actual data.
4409    ///
4410    /// In order to update the frame list at primary interrupt time and to allow the client to see that
4411    /// update, the frame list buffer needs to be shared between the kernel and user space. The same thing
4412    /// applies to the data buffer. This is a difference between the low latency isoch calls and the regular
4413    /// isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The
4414    /// client
4415    /// <em>
4416    /// must
4417    /// </em>
4418    /// use that call to allocate the data and the frame list buffers. The client can
4419    /// pass a portion of the buffer that was previously allocated. The USB stack will range-check the data
4420    /// and frame list buffers to make sure they are within the ranges of the buffers previously allocated.
4421    /// This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to
4422    /// the read or write calls. The same applies to the frame list buffers. Of course, the client can also
4423    /// pre-allocate several data buffers and several frame list buffers and use those for each transfer.
4424    /// Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are
4425    /// finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was
4426    /// created with LowLatencyCreateBuffer().
4427    ///
4428    /// The interface must be open for the pipe to exist. The buf pointer and the frameList
4429    /// pointer need to be pre-allocated using LowLatencyCreateBuffer().
4430    /// After using them, they should be freed using LowLatencyDestroyBuffer().
4431    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4432    ///
4433    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4434    ///
4435    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4436    ///
4437    /// Parameter `buf`: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
4438    /// using a kUSBLowLatencyReadBuffer type.
4439    ///
4440    /// Parameter `frameStart`: The bus frame number on which to start the read (obtained from GetBusFrameNumber).
4441    ///
4442    /// Parameter `numFrames`: The number of frames for which to transfer data.
4443    ///
4444    /// Parameter `updateFrequency`: Specifies how often, in milliseconds, the frame list data should be updated. Valid
4445    /// range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
4446    ///
4447    /// Parameter `frameList`: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
4448    ///
4449    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. A message addressed to this callback is posted to
4450    /// the Async port upon completion.
4451    ///
4452    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
4453    ///
4454    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4455    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated
4456    /// or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were
4457    /// not previously allocated using LowLatencyCreateBuffer().
4458    pub LowLatencyReadIsochPipeAsync: Option<
4459        unsafe extern "C-unwind" fn(
4460            *mut c_void,
4461            u8,
4462            *mut c_void,
4463            u64,
4464            u32,
4465            u32,
4466            *mut IOUSBLowLatencyIsocFrame,
4467            IOAsyncCallback1,
4468            *mut c_void,
4469        ) -> IOReturn,
4470    >,
4471    /// Performs an asynchronous write on an isochronous pipe and updates the frame list at primary interrupt time.
4472    ///
4473    /// The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync()
4474    /// calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync().
4475    /// They differ in that the frame list data is updated at
4476    /// <em>
4477    /// primary interrupt time
4478    /// </em>
4479    /// . This means that
4480    /// the client can inspect the frStatus and frActCount fields as soon as the
4481    /// transaction completes, without having to wait for the callback to happen (depending on the value of
4482    /// updateFrequency). The callback will still happen when the all the frames have been received.
4483    ///
4484    /// The client can specify how often the USB stack should update the frame list data by specifying the
4485    /// updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the
4486    /// frame list will be updated every updateFrequency milliseconds. If the value is 0, the
4487    /// frame list will only be updated once all the frames in the transfer have been received. For example,
4488    /// consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame
4489    /// list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will
4490    /// only be updated at the end of the transfer, after the 64 frames have been sent or received. The
4491    /// difference between using an update frequency of 0 and using the non-low latency isoch calls is that
4492    /// in the former case, the frame list will be updated at primary interrupt time, while in the latter,
4493    /// it will be updated at secondary interrupt time. Regardless of the value of updateFrequency,
4494    /// the frame list will
4495    /// <em>
4496    /// always
4497    /// </em>
4498    /// be updated on the last frame of a transfer.
4499    ///
4500    /// The rationale for adding this call is that because completion routines run on the USB Workloop,
4501    /// they can be scheduled to run a number of milliseconds after the USB transfer has finished. This
4502    /// latency is variable and depends on what other higher priority threads are running on the system.
4503    /// This latency presents a problem for applications, such as audio processing, that depend on receiving
4504    /// data, processing it, and sending it back out, and need to do this as fast as possible. Since applications
4505    /// that use isochronous data know when the data should be available, they can look at the frame list at
4506    /// the expected time and note the frActCount and frStatus (and frTimeStamp
4507    /// if needed) and determine how many valid bytes are in their data buffer and whether there was an error.
4508    /// They can then access their data buffer and process the actual data.
4509    ///
4510    /// In order to update the frame list at primary interrupt time and to allow the client to see that
4511    /// update, the frame list buffer needs to be shared between the kernel and user space. The same thing
4512    /// applies to the data buffer. This is a difference between the low latency isoch calls and the regular
4513    /// isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The
4514    /// <em>
4515    /// client
4516    /// </em>
4517    /// must use that call to allocate the data and the frame list buffers. The client can
4518    /// pass a portion of the buffer that was previously allocated. The USB stack will range-check the data
4519    /// and frame list buffers to make sure they are within the ranges of the buffers previously allocated.
4520    /// This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to
4521    /// the read or write calls. The same applies to the frame list buffers. Of course, the client can also
4522    /// pre-allocate several data buffers and several frame list buffers and use those for each transfer.
4523    /// Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are
4524    /// finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was
4525    /// created with LowLatencyCreateBuffer().
4526    ///
4527    /// The interface must be open for the pipe to exist. The buf pointer and the frameList
4528    /// pointer need to be pre-allocated using LowLatencyCreateBuffer(). After using them, they
4529    /// should be freed using LowLatencyDestroyBuffer().
4530    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4531    ///
4532    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4533    ///
4534    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4535    ///
4536    /// Parameter `buf`: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
4537    /// using a kUSBLowLatencyWriteBuffer type.
4538    ///
4539    /// Parameter `frameStart`: The bus frame number on which to start the write (obtained from GetBusFrameNumber).
4540    ///
4541    /// Parameter `numFrames`: The number of frames for which to transfer data.
4542    ///
4543    /// Parameter `updateFrequency`: Specifies how often, in milliseconds, should the frame list data be updated. Valid
4544    /// range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
4545    ///
4546    /// Parameter `frameList`: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
4547    ///
4548    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. A message addressed to this callback is posted to
4549    /// the Async port upon completion.
4550    ///
4551    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
4552    ///
4553    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4554    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated
4555    /// or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were
4556    /// not previously allocated using LowLatencyCreateBuffer().
4557    pub LowLatencyWriteIsochPipeAsync: Option<
4558        unsafe extern "C-unwind" fn(
4559            *mut c_void,
4560            u8,
4561            *mut c_void,
4562            u64,
4563            u32,
4564            u32,
4565            *mut IOUSBLowLatencyIsocFrame,
4566            IOAsyncCallback1,
4567            *mut c_void,
4568        ) -> IOReturn,
4569    >,
4570    /// Allocates a buffer of type bufferType.
4571    ///
4572    /// This function allocates a buffer of type bufferType. The buffer can then be used with
4573    /// the LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls.
4574    ///
4575    /// The LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls
4576    /// require the clients to pre-allocate the data buffer and the frame list buffer parameters. This call
4577    /// is used to allocate those buffers. After the client is done using the buffers, they need to be
4578    /// released through the LowLatencyDestroyBuffer() call.
4579    ///
4580    /// If the buffer is to be used for reading data, the type passed in should be kUSBLowLatencyReadBuffer.
4581    /// If the buffer is to be used for writing data, the type should be kUSBLowLatencyWriteBuffer. For
4582    /// frame list data, the type should be kUSBLowLatencyFrameListBuffer.
4583    ///
4584    /// The client can create multiple data and frame list buffers, or it can allocate a large buffer and
4585    /// then use only a portion of the buffer in calls to LowLatencyReadIsochPipeAsync()
4586    /// or LowLatencyWriteIsochPipeAsync().
4587    ///
4588    /// The interface must be open for the pipe to exist.
4589    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4590    ///
4591    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4592    ///
4593    /// Parameter `buffer`: Pointer to a pointer that will receive the pointer to the buffer created by this call.
4594    ///
4595    /// Parameter `size`: The size of the buffer to be created in bytes.
4596    ///
4597    /// Parameter `bufferType`: Type of buffer: one of kUSBLowLatencyWriteBuffer, kUSBLowLatencyReadBuffer,
4598    /// or kUSBLowLatencyFrameListBuffer. See the documentation for USB.h.
4599    ///
4600    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4601    /// kIOReturnNotOpen if the interface is not open for exclusive access.  If the buffer can't be allocated,
4602    /// it will return kIOReturnNoMemory.
4603    pub LowLatencyCreateBuffer: Option<
4604        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
4605    >,
4606    /// Releases a buffer that was previously allocated using LowLatencyCreateBuffer().
4607    ///
4608    /// The interface must be open for the pipe to exist.
4609    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4610    ///
4611    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4612    ///
4613    /// Parameter `buffer`: Pointer to the buffer previously allocated using LowLatencyCreateBuffer().
4614    ///
4615    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4616    /// kIOReturnNotOpen if the interface is not open for exclusive access.  If the buffer was not previously
4617    /// allocated using LowLatencyCreateBuffer() it will return kIOReturnBadArgument.
4618    pub LowLatencyDestroyBuffer:
4619        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
4620}
4621
4622#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4623unsafe impl Encode for IOUSBInterfaceStruct192 {
4624    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct192", &[
4625        <*mut c_void>::ENCODING,
4626        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4627        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4628        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4630        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4631        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4632        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4633        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4634        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4635        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4636        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4637        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4638        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4639        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4640        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4641        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4642        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4643        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4644        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4645        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4646        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4647        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4648        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4649        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4650        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4651        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4652        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4653        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4654        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4655        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4656        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4657        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4658        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4659        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4660        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4661        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4662        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4663        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4664        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
4665        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
4666        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4667        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4668        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4669        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4670        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4671        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
4672        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4673        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4674        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4675        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4676        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
4677        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
4678    ]);
4679}
4680
4681#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4682unsafe impl RefEncode for IOUSBInterfaceStruct192 {
4683    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4684}
4685
4686/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4687/// version 1.9.2 and above.
4688///
4689/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4690/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, and some new
4691/// functions that are available on Mac OS X version 10.2.3 and later.
4692/// Super: IOUSBInterfaceInterface190
4693///
4694/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface192?language=objc)
4695#[cfg(all(feature = "USB", feature = "libc"))]
4696pub type IOUSBInterfaceInterface192 = IOUSBInterfaceStruct192;
4697
4698/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4699/// version 1.9.7 and above.
4700///
4701/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4702/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
4703/// and some new functions that are available on Mac OS X version 10.2.5 and later.
4704/// Super: IOUSBInterfaceInterface192
4705///
4706/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct197?language=objc)
4707#[cfg(all(feature = "USB", feature = "libc"))]
4708#[repr(C)]
4709#[allow(unpredictable_function_pointer_comparisons)]
4710#[derive(Clone, Copy, Debug, PartialEq)]
4711pub struct IOUSBInterfaceStruct197 {
4712    pub(crate) _reserved: *mut c_void,
4713    pub QueryInterface:
4714        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
4715    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4716    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4717    pub CreateInterfaceAsyncEventSource:
4718        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
4719    pub GetInterfaceAsyncEventSource:
4720        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
4721    pub CreateInterfaceAsyncPort:
4722        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
4723    pub GetInterfaceAsyncPort:
4724        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
4725    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4726    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4727    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4728    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4729    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4730    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4731    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4732    pub GetDeviceReleaseNumber:
4733        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4734    pub GetConfigurationValue:
4735        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4736    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4737    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4738    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4739    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4740    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
4741    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4742    pub GetBusFrameNumber:
4743        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4744    pub ControlRequest:
4745        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
4746    pub ControlRequestAsync: Option<
4747        unsafe extern "C-unwind" fn(
4748            *mut c_void,
4749            u8,
4750            *mut IOUSBDevRequest,
4751            IOAsyncCallback1,
4752            *mut c_void,
4753        ) -> IOReturn,
4754    >,
4755    pub GetPipeProperties: Option<
4756        unsafe extern "C-unwind" fn(
4757            *mut c_void,
4758            u8,
4759            *mut u8,
4760            *mut u8,
4761            *mut u8,
4762            *mut u16,
4763            *mut u8,
4764        ) -> IOReturn,
4765    >,
4766    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4767    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4768    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4769    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4770    pub ReadPipe:
4771        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
4772    pub WritePipe:
4773        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
4774    pub ReadPipeAsync: Option<
4775        unsafe extern "C-unwind" fn(
4776            *mut c_void,
4777            u8,
4778            *mut c_void,
4779            u32,
4780            IOAsyncCallback1,
4781            *mut c_void,
4782        ) -> IOReturn,
4783    >,
4784    pub WritePipeAsync: Option<
4785        unsafe extern "C-unwind" fn(
4786            *mut c_void,
4787            u8,
4788            *mut c_void,
4789            u32,
4790            IOAsyncCallback1,
4791            *mut c_void,
4792        ) -> IOReturn,
4793    >,
4794    pub ReadIsochPipeAsync: Option<
4795        unsafe extern "C-unwind" fn(
4796            *mut c_void,
4797            u8,
4798            *mut c_void,
4799            u64,
4800            u32,
4801            *mut IOUSBIsocFrame,
4802            IOAsyncCallback1,
4803            *mut c_void,
4804        ) -> IOReturn,
4805    >,
4806    pub WriteIsochPipeAsync: Option<
4807        unsafe extern "C-unwind" fn(
4808            *mut c_void,
4809            u8,
4810            *mut c_void,
4811            u64,
4812            u32,
4813            *mut IOUSBIsocFrame,
4814            IOAsyncCallback1,
4815            *mut c_void,
4816        ) -> IOReturn,
4817    >,
4818    pub ControlRequestTO:
4819        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
4820    pub ControlRequestAsyncTO: Option<
4821        unsafe extern "C-unwind" fn(
4822            *mut c_void,
4823            u8,
4824            *mut IOUSBDevRequestTO,
4825            IOAsyncCallback1,
4826            *mut c_void,
4827        ) -> IOReturn,
4828    >,
4829    pub ReadPipeTO: Option<
4830        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
4831    >,
4832    pub WritePipeTO: Option<
4833        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
4834    >,
4835    pub ReadPipeAsyncTO: Option<
4836        unsafe extern "C-unwind" fn(
4837            *mut c_void,
4838            u8,
4839            *mut c_void,
4840            u32,
4841            u32,
4842            u32,
4843            IOAsyncCallback1,
4844            *mut c_void,
4845        ) -> IOReturn,
4846    >,
4847    pub WritePipeAsyncTO: Option<
4848        unsafe extern "C-unwind" fn(
4849            *mut c_void,
4850            u8,
4851            *mut c_void,
4852            u32,
4853            u32,
4854            u32,
4855            IOAsyncCallback1,
4856            *mut c_void,
4857        ) -> IOReturn,
4858    >,
4859    pub USBInterfaceGetStringIndex:
4860        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4861    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4862    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4863    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4864    pub GetBandwidthAvailable:
4865        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4866    pub GetEndpointProperties: Option<
4867        unsafe extern "C-unwind" fn(
4868            *mut c_void,
4869            u8,
4870            u8,
4871            u8,
4872            *mut u8,
4873            *mut u16,
4874            *mut u8,
4875        ) -> IOReturn,
4876    >,
4877    pub LowLatencyReadIsochPipeAsync: Option<
4878        unsafe extern "C-unwind" fn(
4879            *mut c_void,
4880            u8,
4881            *mut c_void,
4882            u64,
4883            u32,
4884            u32,
4885            *mut IOUSBLowLatencyIsocFrame,
4886            IOAsyncCallback1,
4887            *mut c_void,
4888        ) -> IOReturn,
4889    >,
4890    pub LowLatencyWriteIsochPipeAsync: Option<
4891        unsafe extern "C-unwind" fn(
4892            *mut c_void,
4893            u8,
4894            *mut c_void,
4895            u64,
4896            u32,
4897            u32,
4898            *mut IOUSBLowLatencyIsocFrame,
4899            IOAsyncCallback1,
4900            *mut c_void,
4901        ) -> IOReturn,
4902    >,
4903    pub LowLatencyCreateBuffer: Option<
4904        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
4905    >,
4906    pub LowLatencyDestroyBuffer:
4907        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
4908    /// Gets the current micro frame number of the bus to which the interface and its device are attached.
4909    ///
4910    /// The interface does not have to be open to use this function.
4911    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4912    ///
4913    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4914    ///
4915    /// Parameter `microFrame`: Pointer to UInt64 to hold the microrame number.
4916    ///
4917    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus frame number
4918    /// was attained.
4919    ///
4920    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4921    pub GetBusMicroFrameNumber:
4922        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4923    /// Returns the number of microseconds in each USB Frame.
4924    ///
4925    /// This function can be used to determine whether the device is functioning in full speed or a high
4926    /// speed. In the case of a full speed device, the returned value will be kUSBFullSpeedMicrosecondsInFrame.
4927    /// In the case of a high speed device, the return value will be kUSBHighSpeedMicrosecondsInFrame.
4928    /// (This API should really be called GetUSBFrameTime).
4929    ///
4930    /// The interface does not have to be open to use this function.
4931    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4932    ///
4933    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4934    ///
4935    /// Parameter `microsecondsInFrame`: Pointer to UInt32 to hold the number of microseconds in each USB frame.
4936    ///
4937    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4938    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4939    /// Returns the version of the IOUSBLib and the version of the IOUSBFamily.
4940    ///
4941    /// The interface does not have to be open to use this function.
4942    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4943    ///
4944    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4945    ///
4946    /// Parameter `ioUSBLibVersion`: Pointer to a NumVersion structure that on return will contain
4947    /// the version of the IOUSBLib.
4948    ///
4949    /// Parameter `usbFamilyVersion`: Pointer to a NumVersion structure that on return will contain
4950    /// the version of the IOUSBFamily.
4951    ///
4952    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4953    pub GetIOUSBLibVersion: Option<
4954        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
4955    >,
4956}
4957
4958#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4959unsafe impl Encode for IOUSBInterfaceStruct197 {
4960    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct197", &[
4961        <*mut c_void>::ENCODING,
4962        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4963        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4964        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4966        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4967        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4968        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4969        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4970        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4971        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4972        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4973        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4974        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4975        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4976        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4977        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4978        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4979        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4980        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4981        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4982        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4983        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4984        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4985        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4986        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4987        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4988        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4989        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4990        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4991        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4992        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4993        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4994        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4995        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4996        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4997        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4998        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4999        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5000        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5001        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5002        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5003        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5004        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5005        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5006        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5007        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5008        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5009        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5010        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5011        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5012        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5013        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5014        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5015        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5016        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5017    ]);
5018}
5019
5020#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
5021unsafe impl RefEncode for IOUSBInterfaceStruct197 {
5022    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5023}
5024
5025/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5026/// version 1.9.7 and above.
5027///
5028/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5029/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5030/// and some new functions that are available on Mac OS X version 10.2.5 and later.
5031/// Super: IOUSBInterfaceInterface192
5032///
5033/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface197?language=objc)
5034#[cfg(all(feature = "USB", feature = "libc"))]
5035pub type IOUSBInterfaceInterface197 = IOUSBInterfaceStruct197;
5036
5037/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5038/// version 2.2.0 and above.
5039///
5040/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5041/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192
5042/// and IOUSBInterfaceInterface197, as well as some new functions that are available on Mac OS X version 10.4 and later.
5043/// Super: IOUSBInterfaceInterface197
5044///
5045/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct220?language=objc)
5046#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5047#[repr(C)]
5048#[allow(unpredictable_function_pointer_comparisons)]
5049#[derive(Clone, Copy, Debug, PartialEq)]
5050pub struct IOUSBInterfaceStruct220 {
5051    pub(crate) _reserved: *mut c_void,
5052    pub QueryInterface:
5053        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5054    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5055    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5056    pub CreateInterfaceAsyncEventSource:
5057        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5058    pub GetInterfaceAsyncEventSource:
5059        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5060    pub CreateInterfaceAsyncPort:
5061        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5062    pub GetInterfaceAsyncPort:
5063        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5064    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5065    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5066    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5067    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5068    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5069    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5070    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5071    pub GetDeviceReleaseNumber:
5072        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5073    pub GetConfigurationValue:
5074        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5075    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5076    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5077    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5078    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5079    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5080    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5081    pub GetBusFrameNumber:
5082        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5083    pub ControlRequest:
5084        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5085    pub ControlRequestAsync: Option<
5086        unsafe extern "C-unwind" fn(
5087            *mut c_void,
5088            u8,
5089            *mut IOUSBDevRequest,
5090            IOAsyncCallback1,
5091            *mut c_void,
5092        ) -> IOReturn,
5093    >,
5094    pub GetPipeProperties: Option<
5095        unsafe extern "C-unwind" fn(
5096            *mut c_void,
5097            u8,
5098            *mut u8,
5099            *mut u8,
5100            *mut u8,
5101            *mut u16,
5102            *mut u8,
5103        ) -> IOReturn,
5104    >,
5105    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5106    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5107    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5108    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5109    pub ReadPipe:
5110        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5111    pub WritePipe:
5112        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5113    pub ReadPipeAsync: Option<
5114        unsafe extern "C-unwind" fn(
5115            *mut c_void,
5116            u8,
5117            *mut c_void,
5118            u32,
5119            IOAsyncCallback1,
5120            *mut c_void,
5121        ) -> IOReturn,
5122    >,
5123    pub WritePipeAsync: Option<
5124        unsafe extern "C-unwind" fn(
5125            *mut c_void,
5126            u8,
5127            *mut c_void,
5128            u32,
5129            IOAsyncCallback1,
5130            *mut c_void,
5131        ) -> IOReturn,
5132    >,
5133    pub ReadIsochPipeAsync: Option<
5134        unsafe extern "C-unwind" fn(
5135            *mut c_void,
5136            u8,
5137            *mut c_void,
5138            u64,
5139            u32,
5140            *mut IOUSBIsocFrame,
5141            IOAsyncCallback1,
5142            *mut c_void,
5143        ) -> IOReturn,
5144    >,
5145    pub WriteIsochPipeAsync: Option<
5146        unsafe extern "C-unwind" fn(
5147            *mut c_void,
5148            u8,
5149            *mut c_void,
5150            u64,
5151            u32,
5152            *mut IOUSBIsocFrame,
5153            IOAsyncCallback1,
5154            *mut c_void,
5155        ) -> IOReturn,
5156    >,
5157    pub ControlRequestTO:
5158        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5159    pub ControlRequestAsyncTO: Option<
5160        unsafe extern "C-unwind" fn(
5161            *mut c_void,
5162            u8,
5163            *mut IOUSBDevRequestTO,
5164            IOAsyncCallback1,
5165            *mut c_void,
5166        ) -> IOReturn,
5167    >,
5168    pub ReadPipeTO: Option<
5169        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5170    >,
5171    pub WritePipeTO: Option<
5172        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5173    >,
5174    pub ReadPipeAsyncTO: Option<
5175        unsafe extern "C-unwind" fn(
5176            *mut c_void,
5177            u8,
5178            *mut c_void,
5179            u32,
5180            u32,
5181            u32,
5182            IOAsyncCallback1,
5183            *mut c_void,
5184        ) -> IOReturn,
5185    >,
5186    pub WritePipeAsyncTO: Option<
5187        unsafe extern "C-unwind" fn(
5188            *mut c_void,
5189            u8,
5190            *mut c_void,
5191            u32,
5192            u32,
5193            u32,
5194            IOAsyncCallback1,
5195            *mut c_void,
5196        ) -> IOReturn,
5197    >,
5198    pub USBInterfaceGetStringIndex:
5199        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5200    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5201    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5202    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5203    pub GetBandwidthAvailable:
5204        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5205    pub GetEndpointProperties: Option<
5206        unsafe extern "C-unwind" fn(
5207            *mut c_void,
5208            u8,
5209            u8,
5210            u8,
5211            *mut u8,
5212            *mut u16,
5213            *mut u8,
5214        ) -> IOReturn,
5215    >,
5216    pub LowLatencyReadIsochPipeAsync: Option<
5217        unsafe extern "C-unwind" fn(
5218            *mut c_void,
5219            u8,
5220            *mut c_void,
5221            u64,
5222            u32,
5223            u32,
5224            *mut IOUSBLowLatencyIsocFrame,
5225            IOAsyncCallback1,
5226            *mut c_void,
5227        ) -> IOReturn,
5228    >,
5229    pub LowLatencyWriteIsochPipeAsync: Option<
5230        unsafe extern "C-unwind" fn(
5231            *mut c_void,
5232            u8,
5233            *mut c_void,
5234            u64,
5235            u32,
5236            u32,
5237            *mut IOUSBLowLatencyIsocFrame,
5238            IOAsyncCallback1,
5239            *mut c_void,
5240        ) -> IOReturn,
5241    >,
5242    pub LowLatencyCreateBuffer: Option<
5243        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5244    >,
5245    pub LowLatencyDestroyBuffer:
5246        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5247    pub GetBusMicroFrameNumber:
5248        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5249    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5250    pub GetIOUSBLibVersion: Option<
5251        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5252    >,
5253    /// Find the next descriptor of the requested type associated with the interface.
5254    ///
5255    /// The interface does not have to be open to use this function.
5256    /// Availability: This function is only available with IOUSBInterfaceInterface220 and above.
5257    ///
5258    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5259    ///
5260    /// Parameter `currentDescriptor`: Descriptor to start searching from, NULL to start from beginning of list.
5261    ///
5262    /// Parameter `descriptorType`: Descriptor type to search for, or kUSBAnyDesc to return any descriptor type.
5263    ///
5264    /// Returns: Pointer to the descriptor, or NULL if no matching descriptors found.
5265    pub FindNextAssociatedDescriptor: Option<
5266        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5267    >,
5268    /// return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any.
5269    /// discussion request is updated with the properties of the returned interface.
5270    ///
5271    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5272    ///
5273    /// Parameter `current`: interface descriptor to start searching from, NULL to start at alternate interface 0.
5274    ///
5275    /// Parameter `request`: specifies what properties an interface must have to match.
5276    ///
5277    /// Returns: Pointer to a matching interface descriptor, or NULL if none match.
5278    pub FindNextAltInterface: Option<
5279        unsafe extern "C-unwind" fn(
5280            *mut c_void,
5281            *const c_void,
5282            *mut IOUSBFindInterfaceRequest,
5283        ) -> *mut IOUSBDescriptorHeader,
5284    >,
5285}
5286
5287#[cfg(all(
5288    feature = "AppleUSBDefinitions",
5289    feature = "USB",
5290    feature = "libc",
5291    feature = "objc2"
5292))]
5293unsafe impl Encode for IOUSBInterfaceStruct220 {
5294    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct220", &[
5295        <*mut c_void>::ENCODING,
5296        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5297        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5298        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5299        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5300        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5301        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5302        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5303        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5304        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5305        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5306        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5307        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5308        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5309        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5310        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5311        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5312        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5313        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5314        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5315        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5316        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5317        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5318        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5319        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5320        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5321        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5322        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5323        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5324        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5325        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5326        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5327        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5328        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5329        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5330        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5331        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5332        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5333        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5334        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5335        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5336        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5337        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5338        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5339        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5340        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5341        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5342        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5343        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5344        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5345        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5346        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5347        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5348        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5349        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5350        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5351        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5352        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5353    ]);
5354}
5355
5356#[cfg(all(
5357    feature = "AppleUSBDefinitions",
5358    feature = "USB",
5359    feature = "libc",
5360    feature = "objc2"
5361))]
5362unsafe impl RefEncode for IOUSBInterfaceStruct220 {
5363    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5364}
5365
5366/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5367/// version 2.2.0 and above.
5368///
5369/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5370/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192
5371/// and IOUSBInterfaceInterface197, as well as some new functions that are available on Mac OS X version 10.4 and later.
5372/// Super: IOUSBInterfaceInterface197
5373///
5374/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface220?language=objc)
5375#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5376pub type IOUSBInterfaceInterface220 = IOUSBInterfaceStruct220;
5377
5378/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5379/// version 2.4.5 and above.
5380///
5381/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5382/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5383/// IOUSBInterfaceInterface197 and IOUSBInterfaceInterface220, as well as some new functions that are available on
5384/// Mac OS X version 10.4.6 and later.
5385/// Super: IOUSBInterfaceInterface220
5386///
5387/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct245?language=objc)
5388#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5389#[repr(C)]
5390#[allow(unpredictable_function_pointer_comparisons)]
5391#[derive(Clone, Copy, Debug, PartialEq)]
5392pub struct IOUSBInterfaceStruct245 {
5393    pub(crate) _reserved: *mut c_void,
5394    pub QueryInterface:
5395        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5396    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5397    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5398    pub CreateInterfaceAsyncEventSource:
5399        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5400    pub GetInterfaceAsyncEventSource:
5401        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5402    pub CreateInterfaceAsyncPort:
5403        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5404    pub GetInterfaceAsyncPort:
5405        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5406    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5407    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5408    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5409    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5410    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5411    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5412    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5413    pub GetDeviceReleaseNumber:
5414        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5415    pub GetConfigurationValue:
5416        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5417    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5418    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5419    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5420    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5421    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5422    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5423    pub GetBusFrameNumber:
5424        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5425    pub ControlRequest:
5426        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5427    pub ControlRequestAsync: Option<
5428        unsafe extern "C-unwind" fn(
5429            *mut c_void,
5430            u8,
5431            *mut IOUSBDevRequest,
5432            IOAsyncCallback1,
5433            *mut c_void,
5434        ) -> IOReturn,
5435    >,
5436    pub GetPipeProperties: Option<
5437        unsafe extern "C-unwind" fn(
5438            *mut c_void,
5439            u8,
5440            *mut u8,
5441            *mut u8,
5442            *mut u8,
5443            *mut u16,
5444            *mut u8,
5445        ) -> IOReturn,
5446    >,
5447    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5448    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5449    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5450    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5451    pub ReadPipe:
5452        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5453    pub WritePipe:
5454        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5455    pub ReadPipeAsync: Option<
5456        unsafe extern "C-unwind" fn(
5457            *mut c_void,
5458            u8,
5459            *mut c_void,
5460            u32,
5461            IOAsyncCallback1,
5462            *mut c_void,
5463        ) -> IOReturn,
5464    >,
5465    pub WritePipeAsync: Option<
5466        unsafe extern "C-unwind" fn(
5467            *mut c_void,
5468            u8,
5469            *mut c_void,
5470            u32,
5471            IOAsyncCallback1,
5472            *mut c_void,
5473        ) -> IOReturn,
5474    >,
5475    pub ReadIsochPipeAsync: Option<
5476        unsafe extern "C-unwind" fn(
5477            *mut c_void,
5478            u8,
5479            *mut c_void,
5480            u64,
5481            u32,
5482            *mut IOUSBIsocFrame,
5483            IOAsyncCallback1,
5484            *mut c_void,
5485        ) -> IOReturn,
5486    >,
5487    pub WriteIsochPipeAsync: Option<
5488        unsafe extern "C-unwind" fn(
5489            *mut c_void,
5490            u8,
5491            *mut c_void,
5492            u64,
5493            u32,
5494            *mut IOUSBIsocFrame,
5495            IOAsyncCallback1,
5496            *mut c_void,
5497        ) -> IOReturn,
5498    >,
5499    pub ControlRequestTO:
5500        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5501    pub ControlRequestAsyncTO: Option<
5502        unsafe extern "C-unwind" fn(
5503            *mut c_void,
5504            u8,
5505            *mut IOUSBDevRequestTO,
5506            IOAsyncCallback1,
5507            *mut c_void,
5508        ) -> IOReturn,
5509    >,
5510    pub ReadPipeTO: Option<
5511        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5512    >,
5513    pub WritePipeTO: Option<
5514        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5515    >,
5516    pub ReadPipeAsyncTO: Option<
5517        unsafe extern "C-unwind" fn(
5518            *mut c_void,
5519            u8,
5520            *mut c_void,
5521            u32,
5522            u32,
5523            u32,
5524            IOAsyncCallback1,
5525            *mut c_void,
5526        ) -> IOReturn,
5527    >,
5528    pub WritePipeAsyncTO: Option<
5529        unsafe extern "C-unwind" fn(
5530            *mut c_void,
5531            u8,
5532            *mut c_void,
5533            u32,
5534            u32,
5535            u32,
5536            IOAsyncCallback1,
5537            *mut c_void,
5538        ) -> IOReturn,
5539    >,
5540    pub USBInterfaceGetStringIndex:
5541        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5542    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5543    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5544    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5545    pub GetBandwidthAvailable:
5546        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5547    pub GetEndpointProperties: Option<
5548        unsafe extern "C-unwind" fn(
5549            *mut c_void,
5550            u8,
5551            u8,
5552            u8,
5553            *mut u8,
5554            *mut u16,
5555            *mut u8,
5556        ) -> IOReturn,
5557    >,
5558    pub LowLatencyReadIsochPipeAsync: Option<
5559        unsafe extern "C-unwind" fn(
5560            *mut c_void,
5561            u8,
5562            *mut c_void,
5563            u64,
5564            u32,
5565            u32,
5566            *mut IOUSBLowLatencyIsocFrame,
5567            IOAsyncCallback1,
5568            *mut c_void,
5569        ) -> IOReturn,
5570    >,
5571    pub LowLatencyWriteIsochPipeAsync: Option<
5572        unsafe extern "C-unwind" fn(
5573            *mut c_void,
5574            u8,
5575            *mut c_void,
5576            u64,
5577            u32,
5578            u32,
5579            *mut IOUSBLowLatencyIsocFrame,
5580            IOAsyncCallback1,
5581            *mut c_void,
5582        ) -> IOReturn,
5583    >,
5584    pub LowLatencyCreateBuffer: Option<
5585        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5586    >,
5587    pub LowLatencyDestroyBuffer:
5588        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5589    pub GetBusMicroFrameNumber:
5590        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5591    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5592    pub GetIOUSBLibVersion: Option<
5593        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5594    >,
5595    pub FindNextAssociatedDescriptor: Option<
5596        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5597    >,
5598    pub FindNextAltInterface: Option<
5599        unsafe extern "C-unwind" fn(
5600            *mut c_void,
5601            *const c_void,
5602            *mut IOUSBFindInterfaceRequest,
5603        ) -> *mut IOUSBDescriptorHeader,
5604    >,
5605}
5606
5607#[cfg(all(
5608    feature = "AppleUSBDefinitions",
5609    feature = "USB",
5610    feature = "libc",
5611    feature = "objc2"
5612))]
5613unsafe impl Encode for IOUSBInterfaceStruct245 {
5614    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct245", &[
5615        <*mut c_void>::ENCODING,
5616        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5617        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5618        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5620        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5621        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5622        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5623        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5624        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5625        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5626        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5627        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5628        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5630        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5631        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5632        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5633        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5634        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5635        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5636        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5637        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5638        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5639        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5640        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5641        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5642        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5643        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5644        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5645        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5646        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5647        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5648        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5649        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5650        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5651        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5652        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5653        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5654        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5655        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5656        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5657        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5658        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5659        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5660        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5661        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5662        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5663        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5664        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5665        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5666        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5667        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5668        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5669        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5670        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5671        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5672        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5673    ]);
5674}
5675
5676#[cfg(all(
5677    feature = "AppleUSBDefinitions",
5678    feature = "USB",
5679    feature = "libc",
5680    feature = "objc2"
5681))]
5682unsafe impl RefEncode for IOUSBInterfaceStruct245 {
5683    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5684}
5685
5686/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5687/// version 2.4.5 and above.
5688///
5689/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5690/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5691/// IOUSBInterfaceInterface197 and IOUSBInterfaceInterface220, as well as some new functions that are available on
5692/// Mac OS X version 10.4.6 and later.
5693/// Super: IOUSBInterfaceInterface220
5694///
5695/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface245?language=objc)
5696#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5697pub type IOUSBInterfaceInterface245 = IOUSBInterfaceStruct245;
5698
5699/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5700/// version 3.0.0 and above.
5701///
5702/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5703/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5704/// IOUSBInterfaceInterface197, IOUSBInterfaceInterface220 and IOUSBInterfaceInterface245, as well as some new functions
5705/// that are available on Mac OS X version 10.5 and later.
5706/// Super: IOUSBInterfaceInterface245
5707///
5708/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct300?language=objc)
5709#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5710#[repr(C)]
5711#[allow(unpredictable_function_pointer_comparisons)]
5712#[derive(Clone, Copy, Debug, PartialEq)]
5713pub struct IOUSBInterfaceStruct300 {
5714    pub(crate) _reserved: *mut c_void,
5715    pub QueryInterface:
5716        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5717    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5718    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5719    pub CreateInterfaceAsyncEventSource:
5720        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5721    pub GetInterfaceAsyncEventSource:
5722        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5723    pub CreateInterfaceAsyncPort:
5724        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5725    pub GetInterfaceAsyncPort:
5726        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5727    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5728    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5729    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5730    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5731    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5732    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5733    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5734    pub GetDeviceReleaseNumber:
5735        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5736    pub GetConfigurationValue:
5737        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5738    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5739    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5740    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5741    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5742    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5743    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5744    pub GetBusFrameNumber:
5745        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5746    pub ControlRequest:
5747        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5748    pub ControlRequestAsync: Option<
5749        unsafe extern "C-unwind" fn(
5750            *mut c_void,
5751            u8,
5752            *mut IOUSBDevRequest,
5753            IOAsyncCallback1,
5754            *mut c_void,
5755        ) -> IOReturn,
5756    >,
5757    pub GetPipeProperties: Option<
5758        unsafe extern "C-unwind" fn(
5759            *mut c_void,
5760            u8,
5761            *mut u8,
5762            *mut u8,
5763            *mut u8,
5764            *mut u16,
5765            *mut u8,
5766        ) -> IOReturn,
5767    >,
5768    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5769    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5770    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5771    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5772    pub ReadPipe:
5773        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5774    pub WritePipe:
5775        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5776    pub ReadPipeAsync: Option<
5777        unsafe extern "C-unwind" fn(
5778            *mut c_void,
5779            u8,
5780            *mut c_void,
5781            u32,
5782            IOAsyncCallback1,
5783            *mut c_void,
5784        ) -> IOReturn,
5785    >,
5786    pub WritePipeAsync: Option<
5787        unsafe extern "C-unwind" fn(
5788            *mut c_void,
5789            u8,
5790            *mut c_void,
5791            u32,
5792            IOAsyncCallback1,
5793            *mut c_void,
5794        ) -> IOReturn,
5795    >,
5796    pub ReadIsochPipeAsync: Option<
5797        unsafe extern "C-unwind" fn(
5798            *mut c_void,
5799            u8,
5800            *mut c_void,
5801            u64,
5802            u32,
5803            *mut IOUSBIsocFrame,
5804            IOAsyncCallback1,
5805            *mut c_void,
5806        ) -> IOReturn,
5807    >,
5808    pub WriteIsochPipeAsync: Option<
5809        unsafe extern "C-unwind" fn(
5810            *mut c_void,
5811            u8,
5812            *mut c_void,
5813            u64,
5814            u32,
5815            *mut IOUSBIsocFrame,
5816            IOAsyncCallback1,
5817            *mut c_void,
5818        ) -> IOReturn,
5819    >,
5820    pub ControlRequestTO:
5821        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5822    pub ControlRequestAsyncTO: Option<
5823        unsafe extern "C-unwind" fn(
5824            *mut c_void,
5825            u8,
5826            *mut IOUSBDevRequestTO,
5827            IOAsyncCallback1,
5828            *mut c_void,
5829        ) -> IOReturn,
5830    >,
5831    pub ReadPipeTO: Option<
5832        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5833    >,
5834    pub WritePipeTO: Option<
5835        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5836    >,
5837    pub ReadPipeAsyncTO: Option<
5838        unsafe extern "C-unwind" fn(
5839            *mut c_void,
5840            u8,
5841            *mut c_void,
5842            u32,
5843            u32,
5844            u32,
5845            IOAsyncCallback1,
5846            *mut c_void,
5847        ) -> IOReturn,
5848    >,
5849    pub WritePipeAsyncTO: Option<
5850        unsafe extern "C-unwind" fn(
5851            *mut c_void,
5852            u8,
5853            *mut c_void,
5854            u32,
5855            u32,
5856            u32,
5857            IOAsyncCallback1,
5858            *mut c_void,
5859        ) -> IOReturn,
5860    >,
5861    pub USBInterfaceGetStringIndex:
5862        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5863    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5864    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5865    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5866    pub GetBandwidthAvailable:
5867        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5868    pub GetEndpointProperties: Option<
5869        unsafe extern "C-unwind" fn(
5870            *mut c_void,
5871            u8,
5872            u8,
5873            u8,
5874            *mut u8,
5875            *mut u16,
5876            *mut u8,
5877        ) -> IOReturn,
5878    >,
5879    pub LowLatencyReadIsochPipeAsync: Option<
5880        unsafe extern "C-unwind" fn(
5881            *mut c_void,
5882            u8,
5883            *mut c_void,
5884            u64,
5885            u32,
5886            u32,
5887            *mut IOUSBLowLatencyIsocFrame,
5888            IOAsyncCallback1,
5889            *mut c_void,
5890        ) -> IOReturn,
5891    >,
5892    pub LowLatencyWriteIsochPipeAsync: Option<
5893        unsafe extern "C-unwind" fn(
5894            *mut c_void,
5895            u8,
5896            *mut c_void,
5897            u64,
5898            u32,
5899            u32,
5900            *mut IOUSBLowLatencyIsocFrame,
5901            IOAsyncCallback1,
5902            *mut c_void,
5903        ) -> IOReturn,
5904    >,
5905    pub LowLatencyCreateBuffer: Option<
5906        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5907    >,
5908    pub LowLatencyDestroyBuffer:
5909        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5910    pub GetBusMicroFrameNumber:
5911        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5912    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5913    pub GetIOUSBLibVersion: Option<
5914        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5915    >,
5916    pub FindNextAssociatedDescriptor: Option<
5917        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5918    >,
5919    pub FindNextAltInterface: Option<
5920        unsafe extern "C-unwind" fn(
5921            *mut c_void,
5922            *const c_void,
5923            *mut IOUSBFindInterfaceRequest,
5924        ) -> *mut IOUSBDescriptorHeader,
5925    >,
5926    /// Gets a recent frame number of the bus to which the device is attached, along with a system time corresponding to the start of that frame
5927    ///
5928    /// The device does not have to be open to use this function.
5929    /// Availability: This function is only available with IOUSBInterfaceInterface300 and above.
5930    ///
5931    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5932    ///
5933    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
5934    ///
5935    /// Parameter `atTime`: Pointer to a returned AbsoluteTime, which is the system time ("wall time") as close as possible to the beginning of that USB frame. The jitter on this value may be as much as 200 microseconds.
5936    ///
5937    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
5938    pub GetBusFrameNumberWithTime:
5939        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5940}
5941
5942#[cfg(all(
5943    feature = "AppleUSBDefinitions",
5944    feature = "USB",
5945    feature = "libc",
5946    feature = "objc2"
5947))]
5948unsafe impl Encode for IOUSBInterfaceStruct300 {
5949    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct300", &[
5950        <*mut c_void>::ENCODING,
5951        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5952        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5953        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5954        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5955        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5956        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5957        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5958        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5959        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5960        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5961        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5962        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5963        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5964        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5966        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5967        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5968        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5969        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5970        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5971        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5972        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5973        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5974        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5975        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5976        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5977        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5978        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5979        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5980        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5981        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5982        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5983        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5984        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5985        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5986        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5987        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5988        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5989        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5990        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5991        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5992        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5993        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5994        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5995        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5996        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5997        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5998        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5999        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6000        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6001        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6002        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6003        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6004        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6005        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6006        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6007        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6008        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6009    ]);
6010}
6011
6012#[cfg(all(
6013    feature = "AppleUSBDefinitions",
6014    feature = "USB",
6015    feature = "libc",
6016    feature = "objc2"
6017))]
6018unsafe impl RefEncode for IOUSBInterfaceStruct300 {
6019    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6020}
6021
6022/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6023/// version 3.0.0 and above.
6024///
6025/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
6026/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
6027/// IOUSBInterfaceInterface197, IOUSBInterfaceInterface220 and IOUSBInterfaceInterface245, as well as some new functions
6028/// that are available on Mac OS X version 10.5 and later.
6029/// Super: IOUSBInterfaceInterface245
6030///
6031/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface300?language=objc)
6032#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6033pub type IOUSBInterfaceInterface300 = IOUSBInterfaceStruct300;
6034
6035/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 3.9.8 and above.
6036///
6037/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6038/// Super: IOUSBInterfaceInterface300
6039///
6040/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct398?language=objc)
6041#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6042#[repr(C)]
6043#[allow(unpredictable_function_pointer_comparisons)]
6044#[derive(Clone, Copy, Debug, PartialEq)]
6045pub struct IOUSBInterfaceStruct398 {
6046    pub(crate) _reserved: *mut c_void,
6047    pub QueryInterface:
6048        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6049    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6050    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6051    pub CreateInterfaceAsyncEventSource:
6052        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6053    pub GetInterfaceAsyncEventSource:
6054        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6055    pub CreateInterfaceAsyncPort:
6056        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6057    pub GetInterfaceAsyncPort:
6058        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6059    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6060    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6061    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6062    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6063    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6064    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6065    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6066    pub GetDeviceReleaseNumber:
6067        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6068    pub GetConfigurationValue:
6069        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6070    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6071    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6072    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6073    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6074    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6075    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6076    pub GetBusFrameNumber:
6077        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6078    pub ControlRequest:
6079        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6080    pub ControlRequestAsync: Option<
6081        unsafe extern "C-unwind" fn(
6082            *mut c_void,
6083            u8,
6084            *mut IOUSBDevRequest,
6085            IOAsyncCallback1,
6086            *mut c_void,
6087        ) -> IOReturn,
6088    >,
6089    pub GetPipeProperties: Option<
6090        unsafe extern "C-unwind" fn(
6091            *mut c_void,
6092            u8,
6093            *mut u8,
6094            *mut u8,
6095            *mut u8,
6096            *mut u16,
6097            *mut u8,
6098        ) -> IOReturn,
6099    >,
6100    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6101    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6102    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6103    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6104    pub ReadPipe:
6105        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6106    pub WritePipe:
6107        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6108    pub ReadPipeAsync: Option<
6109        unsafe extern "C-unwind" fn(
6110            *mut c_void,
6111            u8,
6112            *mut c_void,
6113            u32,
6114            IOAsyncCallback1,
6115            *mut c_void,
6116        ) -> IOReturn,
6117    >,
6118    pub WritePipeAsync: Option<
6119        unsafe extern "C-unwind" fn(
6120            *mut c_void,
6121            u8,
6122            *mut c_void,
6123            u32,
6124            IOAsyncCallback1,
6125            *mut c_void,
6126        ) -> IOReturn,
6127    >,
6128    pub ReadIsochPipeAsync: Option<
6129        unsafe extern "C-unwind" fn(
6130            *mut c_void,
6131            u8,
6132            *mut c_void,
6133            u64,
6134            u32,
6135            *mut IOUSBIsocFrame,
6136            IOAsyncCallback1,
6137            *mut c_void,
6138        ) -> IOReturn,
6139    >,
6140    pub WriteIsochPipeAsync: Option<
6141        unsafe extern "C-unwind" fn(
6142            *mut c_void,
6143            u8,
6144            *mut c_void,
6145            u64,
6146            u32,
6147            *mut IOUSBIsocFrame,
6148            IOAsyncCallback1,
6149            *mut c_void,
6150        ) -> IOReturn,
6151    >,
6152    pub ControlRequestTO:
6153        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6154    pub ControlRequestAsyncTO: Option<
6155        unsafe extern "C-unwind" fn(
6156            *mut c_void,
6157            u8,
6158            *mut IOUSBDevRequestTO,
6159            IOAsyncCallback1,
6160            *mut c_void,
6161        ) -> IOReturn,
6162    >,
6163    pub ReadPipeTO: Option<
6164        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6165    >,
6166    pub WritePipeTO: Option<
6167        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6168    >,
6169    pub ReadPipeAsyncTO: Option<
6170        unsafe extern "C-unwind" fn(
6171            *mut c_void,
6172            u8,
6173            *mut c_void,
6174            u32,
6175            u32,
6176            u32,
6177            IOAsyncCallback1,
6178            *mut c_void,
6179        ) -> IOReturn,
6180    >,
6181    pub WritePipeAsyncTO: Option<
6182        unsafe extern "C-unwind" fn(
6183            *mut c_void,
6184            u8,
6185            *mut c_void,
6186            u32,
6187            u32,
6188            u32,
6189            IOAsyncCallback1,
6190            *mut c_void,
6191        ) -> IOReturn,
6192    >,
6193    pub USBInterfaceGetStringIndex:
6194        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6195    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6196    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6197    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6198    pub GetBandwidthAvailable:
6199        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6200    pub GetEndpointProperties: Option<
6201        unsafe extern "C-unwind" fn(
6202            *mut c_void,
6203            u8,
6204            u8,
6205            u8,
6206            *mut u8,
6207            *mut u16,
6208            *mut u8,
6209        ) -> IOReturn,
6210    >,
6211    pub LowLatencyReadIsochPipeAsync: Option<
6212        unsafe extern "C-unwind" fn(
6213            *mut c_void,
6214            u8,
6215            *mut c_void,
6216            u64,
6217            u32,
6218            u32,
6219            *mut IOUSBLowLatencyIsocFrame,
6220            IOAsyncCallback1,
6221            *mut c_void,
6222        ) -> IOReturn,
6223    >,
6224    pub LowLatencyWriteIsochPipeAsync: Option<
6225        unsafe extern "C-unwind" fn(
6226            *mut c_void,
6227            u8,
6228            *mut c_void,
6229            u64,
6230            u32,
6231            u32,
6232            *mut IOUSBLowLatencyIsocFrame,
6233            IOAsyncCallback1,
6234            *mut c_void,
6235        ) -> IOReturn,
6236    >,
6237    pub LowLatencyCreateBuffer: Option<
6238        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6239    >,
6240    pub LowLatencyDestroyBuffer:
6241        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6242    pub GetBusMicroFrameNumber:
6243        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6244    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6245    pub GetIOUSBLibVersion: Option<
6246        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6247    >,
6248    pub FindNextAssociatedDescriptor: Option<
6249        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6250    >,
6251    pub FindNextAltInterface: Option<
6252        unsafe extern "C-unwind" fn(
6253            *mut c_void,
6254            *const c_void,
6255            *mut IOUSBFindInterfaceRequest,
6256        ) -> *mut IOUSBDescriptorHeader,
6257    >,
6258    pub GetBusFrameNumberWithTime:
6259        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6260}
6261
6262#[cfg(all(
6263    feature = "AppleUSBDefinitions",
6264    feature = "USB",
6265    feature = "libc",
6266    feature = "objc2"
6267))]
6268unsafe impl Encode for IOUSBInterfaceStruct398 {
6269    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct398", &[
6270        <*mut c_void>::ENCODING,
6271        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6272        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6273        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6274        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6275        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6276        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6277        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6278        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6279        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6280        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6281        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6282        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6283        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6284        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6285        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6286        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6287        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6288        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6289        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6290        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6291        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6292        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6293        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6294        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6295        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6296        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6297        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6298        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6299        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6300        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6301        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6302        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6303        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6304        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6305        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6306        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6307        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6308        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6309        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6310        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6311        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6312        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6313        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6314        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6315        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6316        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
6317        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6318        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6319        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6320        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6321        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6322        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6323        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6324        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6325        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6326        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6327        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6328        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6329    ]);
6330}
6331
6332#[cfg(all(
6333    feature = "AppleUSBDefinitions",
6334    feature = "USB",
6335    feature = "libc",
6336    feature = "objc2"
6337))]
6338unsafe impl RefEncode for IOUSBInterfaceStruct398 {
6339    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6340}
6341
6342/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 3.9.8 and above.
6343///
6344/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6345/// Super: IOUSBInterfaceInterface300
6346///
6347/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface398?language=objc)
6348#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6349pub type IOUSBInterfaceInterface398 = IOUSBInterfaceStruct398;
6350
6351/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 4.0.0 and above.
6352///
6353/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6354/// Super: IOUSBInterfaceInterface398
6355///
6356/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct400?language=objc)
6357#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6358#[repr(C)]
6359#[allow(unpredictable_function_pointer_comparisons)]
6360#[derive(Clone, Copy, Debug, PartialEq)]
6361pub struct IOUSBInterfaceStruct400 {
6362    pub(crate) _reserved: *mut c_void,
6363    pub QueryInterface:
6364        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6365    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6366    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6367    pub CreateInterfaceAsyncEventSource:
6368        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6369    pub GetInterfaceAsyncEventSource:
6370        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6371    pub CreateInterfaceAsyncPort:
6372        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6373    pub GetInterfaceAsyncPort:
6374        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6375    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6376    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6377    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6378    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6379    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6380    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6381    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6382    pub GetDeviceReleaseNumber:
6383        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6384    pub GetConfigurationValue:
6385        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6386    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6387    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6388    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6389    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6390    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6391    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6392    pub GetBusFrameNumber:
6393        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6394    pub ControlRequest:
6395        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6396    pub ControlRequestAsync: Option<
6397        unsafe extern "C-unwind" fn(
6398            *mut c_void,
6399            u8,
6400            *mut IOUSBDevRequest,
6401            IOAsyncCallback1,
6402            *mut c_void,
6403        ) -> IOReturn,
6404    >,
6405    pub GetPipeProperties: Option<
6406        unsafe extern "C-unwind" fn(
6407            *mut c_void,
6408            u8,
6409            *mut u8,
6410            *mut u8,
6411            *mut u8,
6412            *mut u16,
6413            *mut u8,
6414        ) -> IOReturn,
6415    >,
6416    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6417    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6418    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6419    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6420    pub ReadPipe:
6421        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6422    pub WritePipe:
6423        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6424    pub ReadPipeAsync: Option<
6425        unsafe extern "C-unwind" fn(
6426            *mut c_void,
6427            u8,
6428            *mut c_void,
6429            u32,
6430            IOAsyncCallback1,
6431            *mut c_void,
6432        ) -> IOReturn,
6433    >,
6434    pub WritePipeAsync: Option<
6435        unsafe extern "C-unwind" fn(
6436            *mut c_void,
6437            u8,
6438            *mut c_void,
6439            u32,
6440            IOAsyncCallback1,
6441            *mut c_void,
6442        ) -> IOReturn,
6443    >,
6444    pub ReadIsochPipeAsync: Option<
6445        unsafe extern "C-unwind" fn(
6446            *mut c_void,
6447            u8,
6448            *mut c_void,
6449            u64,
6450            u32,
6451            *mut IOUSBIsocFrame,
6452            IOAsyncCallback1,
6453            *mut c_void,
6454        ) -> IOReturn,
6455    >,
6456    pub WriteIsochPipeAsync: Option<
6457        unsafe extern "C-unwind" fn(
6458            *mut c_void,
6459            u8,
6460            *mut c_void,
6461            u64,
6462            u32,
6463            *mut IOUSBIsocFrame,
6464            IOAsyncCallback1,
6465            *mut c_void,
6466        ) -> IOReturn,
6467    >,
6468    pub ControlRequestTO:
6469        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6470    pub ControlRequestAsyncTO: Option<
6471        unsafe extern "C-unwind" fn(
6472            *mut c_void,
6473            u8,
6474            *mut IOUSBDevRequestTO,
6475            IOAsyncCallback1,
6476            *mut c_void,
6477        ) -> IOReturn,
6478    >,
6479    pub ReadPipeTO: Option<
6480        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6481    >,
6482    pub WritePipeTO: Option<
6483        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6484    >,
6485    pub ReadPipeAsyncTO: Option<
6486        unsafe extern "C-unwind" fn(
6487            *mut c_void,
6488            u8,
6489            *mut c_void,
6490            u32,
6491            u32,
6492            u32,
6493            IOAsyncCallback1,
6494            *mut c_void,
6495        ) -> IOReturn,
6496    >,
6497    pub WritePipeAsyncTO: Option<
6498        unsafe extern "C-unwind" fn(
6499            *mut c_void,
6500            u8,
6501            *mut c_void,
6502            u32,
6503            u32,
6504            u32,
6505            IOAsyncCallback1,
6506            *mut c_void,
6507        ) -> IOReturn,
6508    >,
6509    pub USBInterfaceGetStringIndex:
6510        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6511    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6512    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6513    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6514    pub GetBandwidthAvailable:
6515        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6516    pub GetEndpointProperties: Option<
6517        unsafe extern "C-unwind" fn(
6518            *mut c_void,
6519            u8,
6520            u8,
6521            u8,
6522            *mut u8,
6523            *mut u16,
6524            *mut u8,
6525        ) -> IOReturn,
6526    >,
6527    pub LowLatencyReadIsochPipeAsync: Option<
6528        unsafe extern "C-unwind" fn(
6529            *mut c_void,
6530            u8,
6531            *mut c_void,
6532            u64,
6533            u32,
6534            u32,
6535            *mut IOUSBLowLatencyIsocFrame,
6536            IOAsyncCallback1,
6537            *mut c_void,
6538        ) -> IOReturn,
6539    >,
6540    pub LowLatencyWriteIsochPipeAsync: Option<
6541        unsafe extern "C-unwind" fn(
6542            *mut c_void,
6543            u8,
6544            *mut c_void,
6545            u64,
6546            u32,
6547            u32,
6548            *mut IOUSBLowLatencyIsocFrame,
6549            IOAsyncCallback1,
6550            *mut c_void,
6551        ) -> IOReturn,
6552    >,
6553    pub LowLatencyCreateBuffer: Option<
6554        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6555    >,
6556    pub LowLatencyDestroyBuffer:
6557        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6558    pub GetBusMicroFrameNumber:
6559        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6560    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6561    pub GetIOUSBLibVersion: Option<
6562        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6563    >,
6564    pub FindNextAssociatedDescriptor: Option<
6565        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6566    >,
6567    pub FindNextAltInterface: Option<
6568        unsafe extern "C-unwind" fn(
6569            *mut c_void,
6570            *const c_void,
6571            *mut IOUSBFindInterfaceRequest,
6572        ) -> *mut IOUSBDescriptorHeader,
6573    >,
6574    pub GetBusFrameNumberWithTime:
6575        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6576}
6577
6578#[cfg(all(
6579    feature = "AppleUSBDefinitions",
6580    feature = "USB",
6581    feature = "libc",
6582    feature = "objc2"
6583))]
6584unsafe impl Encode for IOUSBInterfaceStruct400 {
6585    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct400", &[
6586        <*mut c_void>::ENCODING,
6587        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6588        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6589        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6590        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6591        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6592        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6593        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6594        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6595        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6596        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6597        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6598        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6599        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6600        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6601        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6602        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6603        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6604        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6605        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6606        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6607        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6608        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6609        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6610        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6611        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6612        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6613        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6614        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6615        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6616        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6617        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6619        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6620        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6621        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6622        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6623        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6624        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6625        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6626        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6627        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6628        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6630        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6631        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6632        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
6633        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6634        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6635        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6636        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6637        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6638        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6639        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6640        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6641        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6642        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6643        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6644        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6645    ]);
6646}
6647
6648#[cfg(all(
6649    feature = "AppleUSBDefinitions",
6650    feature = "USB",
6651    feature = "libc",
6652    feature = "objc2"
6653))]
6654unsafe impl RefEncode for IOUSBInterfaceStruct400 {
6655    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6656}
6657
6658/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 4.0.0 and above.
6659///
6660/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6661/// Super: IOUSBInterfaceInterface398
6662///
6663/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface400?language=objc)
6664#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6665pub type IOUSBInterfaceInterface400 = IOUSBInterfaceStruct400;
6666
6667/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6668/// version 5.0.0 and above.
6669///
6670/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface400, as well as some new functions that are available on Mac OS X version 10.7.3 and later.
6671/// Super: IOUSBInterfaceInterface400
6672///
6673/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct500?language=objc)
6674#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6675#[repr(C)]
6676#[allow(unpredictable_function_pointer_comparisons)]
6677#[derive(Clone, Copy, Debug, PartialEq)]
6678pub struct IOUSBInterfaceStruct500 {
6679    pub(crate) _reserved: *mut c_void,
6680    pub QueryInterface:
6681        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6682    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6683    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6684    pub CreateInterfaceAsyncEventSource:
6685        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6686    pub GetInterfaceAsyncEventSource:
6687        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6688    pub CreateInterfaceAsyncPort:
6689        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6690    pub GetInterfaceAsyncPort:
6691        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6692    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6693    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6694    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6695    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6696    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6697    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6698    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6699    pub GetDeviceReleaseNumber:
6700        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6701    pub GetConfigurationValue:
6702        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6703    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6704    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6705    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6706    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6707    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6708    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6709    pub GetBusFrameNumber:
6710        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6711    pub ControlRequest:
6712        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6713    pub ControlRequestAsync: Option<
6714        unsafe extern "C-unwind" fn(
6715            *mut c_void,
6716            u8,
6717            *mut IOUSBDevRequest,
6718            IOAsyncCallback1,
6719            *mut c_void,
6720        ) -> IOReturn,
6721    >,
6722    pub GetPipeProperties: Option<
6723        unsafe extern "C-unwind" fn(
6724            *mut c_void,
6725            u8,
6726            *mut u8,
6727            *mut u8,
6728            *mut u8,
6729            *mut u16,
6730            *mut u8,
6731        ) -> IOReturn,
6732    >,
6733    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6734    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6735    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6736    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6737    pub ReadPipe:
6738        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6739    pub WritePipe:
6740        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6741    pub ReadPipeAsync: Option<
6742        unsafe extern "C-unwind" fn(
6743            *mut c_void,
6744            u8,
6745            *mut c_void,
6746            u32,
6747            IOAsyncCallback1,
6748            *mut c_void,
6749        ) -> IOReturn,
6750    >,
6751    pub WritePipeAsync: Option<
6752        unsafe extern "C-unwind" fn(
6753            *mut c_void,
6754            u8,
6755            *mut c_void,
6756            u32,
6757            IOAsyncCallback1,
6758            *mut c_void,
6759        ) -> IOReturn,
6760    >,
6761    pub ReadIsochPipeAsync: Option<
6762        unsafe extern "C-unwind" fn(
6763            *mut c_void,
6764            u8,
6765            *mut c_void,
6766            u64,
6767            u32,
6768            *mut IOUSBIsocFrame,
6769            IOAsyncCallback1,
6770            *mut c_void,
6771        ) -> IOReturn,
6772    >,
6773    pub WriteIsochPipeAsync: Option<
6774        unsafe extern "C-unwind" fn(
6775            *mut c_void,
6776            u8,
6777            *mut c_void,
6778            u64,
6779            u32,
6780            *mut IOUSBIsocFrame,
6781            IOAsyncCallback1,
6782            *mut c_void,
6783        ) -> IOReturn,
6784    >,
6785    pub ControlRequestTO:
6786        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6787    pub ControlRequestAsyncTO: Option<
6788        unsafe extern "C-unwind" fn(
6789            *mut c_void,
6790            u8,
6791            *mut IOUSBDevRequestTO,
6792            IOAsyncCallback1,
6793            *mut c_void,
6794        ) -> IOReturn,
6795    >,
6796    pub ReadPipeTO: Option<
6797        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6798    >,
6799    pub WritePipeTO: Option<
6800        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6801    >,
6802    pub ReadPipeAsyncTO: Option<
6803        unsafe extern "C-unwind" fn(
6804            *mut c_void,
6805            u8,
6806            *mut c_void,
6807            u32,
6808            u32,
6809            u32,
6810            IOAsyncCallback1,
6811            *mut c_void,
6812        ) -> IOReturn,
6813    >,
6814    pub WritePipeAsyncTO: Option<
6815        unsafe extern "C-unwind" fn(
6816            *mut c_void,
6817            u8,
6818            *mut c_void,
6819            u32,
6820            u32,
6821            u32,
6822            IOAsyncCallback1,
6823            *mut c_void,
6824        ) -> IOReturn,
6825    >,
6826    pub USBInterfaceGetStringIndex:
6827        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6828    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6829    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6830    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6831    pub GetBandwidthAvailable:
6832        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6833    pub GetEndpointProperties: Option<
6834        unsafe extern "C-unwind" fn(
6835            *mut c_void,
6836            u8,
6837            u8,
6838            u8,
6839            *mut u8,
6840            *mut u16,
6841            *mut u8,
6842        ) -> IOReturn,
6843    >,
6844    pub LowLatencyReadIsochPipeAsync: Option<
6845        unsafe extern "C-unwind" fn(
6846            *mut c_void,
6847            u8,
6848            *mut c_void,
6849            u64,
6850            u32,
6851            u32,
6852            *mut IOUSBLowLatencyIsocFrame,
6853            IOAsyncCallback1,
6854            *mut c_void,
6855        ) -> IOReturn,
6856    >,
6857    pub LowLatencyWriteIsochPipeAsync: Option<
6858        unsafe extern "C-unwind" fn(
6859            *mut c_void,
6860            u8,
6861            *mut c_void,
6862            u64,
6863            u32,
6864            u32,
6865            *mut IOUSBLowLatencyIsocFrame,
6866            IOAsyncCallback1,
6867            *mut c_void,
6868        ) -> IOReturn,
6869    >,
6870    pub LowLatencyCreateBuffer: Option<
6871        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6872    >,
6873    pub LowLatencyDestroyBuffer:
6874        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6875    pub GetBusMicroFrameNumber:
6876        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6877    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6878    pub GetIOUSBLibVersion: Option<
6879        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6880    >,
6881    pub FindNextAssociatedDescriptor: Option<
6882        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6883    >,
6884    pub FindNextAltInterface: Option<
6885        unsafe extern "C-unwind" fn(
6886            *mut c_void,
6887            *const c_void,
6888            *mut IOUSBFindInterfaceRequest,
6889        ) -> *mut IOUSBDescriptorHeader,
6890    >,
6891    pub GetBusFrameNumberWithTime:
6892        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6893    /// This function is deprecated. See GetPipePropertiesV3
6894    pub GetPipePropertiesV2: Option<
6895        unsafe extern "C-unwind" fn(
6896            *mut c_void,
6897            u8,
6898            *mut u8,
6899            *mut u8,
6900            *mut u8,
6901            *mut u16,
6902            *mut u8,
6903            *mut u8,
6904            *mut u8,
6905            *mut u16,
6906        ) -> IOReturn,
6907    >,
6908}
6909
6910#[cfg(all(
6911    feature = "AppleUSBDefinitions",
6912    feature = "USB",
6913    feature = "libc",
6914    feature = "objc2"
6915))]
6916unsafe impl Encode for IOUSBInterfaceStruct500 {
6917    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct500", &[
6918        <*mut c_void>::ENCODING,
6919        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6920        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6921        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6922        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6923        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6924        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6925        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6926        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6927        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6928        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6929        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6930        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6931        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6932        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6933        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6934        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6935        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6936        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6937        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6938        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6939        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6940        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6941        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6942        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6943        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6944        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6945        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6946        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6947        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6948        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6949        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6950        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6951        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6952        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6953        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6954        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6955        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6956        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6957        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6958        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6959        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6960        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6961        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6962        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6963        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6964        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
6965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6966        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6967        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6968        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6969        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6970        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6971        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6972        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6973        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6974        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6975        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6976        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6977        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
6978    ]);
6979}
6980
6981#[cfg(all(
6982    feature = "AppleUSBDefinitions",
6983    feature = "USB",
6984    feature = "libc",
6985    feature = "objc2"
6986))]
6987unsafe impl RefEncode for IOUSBInterfaceStruct500 {
6988    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6989}
6990
6991/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6992/// version 5.0.0 and above.
6993///
6994/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface400, as well as some new functions that are available on Mac OS X version 10.7.3 and later.
6995/// Super: IOUSBInterfaceInterface400
6996///
6997/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface500?language=objc)
6998#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6999pub type IOUSBInterfaceInterface500 = IOUSBInterfaceStruct500;
7000
7001/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
7002/// version 5.5.0 and above.
7003///
7004/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface500, as well as some new functions that are available on Mac OS X version 10.8.2 and later.
7005/// Super: IOUSBInterfaceInterface500
7006///
7007/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct550?language=objc)
7008#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
7009#[repr(C)]
7010#[allow(unpredictable_function_pointer_comparisons)]
7011#[derive(Clone, Copy, Debug, PartialEq)]
7012pub struct IOUSBInterfaceStruct550 {
7013    pub(crate) _reserved: *mut c_void,
7014    pub QueryInterface:
7015        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
7016    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7017    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7018    pub CreateInterfaceAsyncEventSource:
7019        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
7020    pub GetInterfaceAsyncEventSource:
7021        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
7022    pub CreateInterfaceAsyncPort:
7023        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
7024    pub GetInterfaceAsyncPort:
7025        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
7026    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7027    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7028    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7029    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7030    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7031    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7032    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7033    pub GetDeviceReleaseNumber:
7034        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7035    pub GetConfigurationValue:
7036        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7037    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7038    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7039    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7040    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7041    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
7042    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7043    pub GetBusFrameNumber:
7044        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7045    pub ControlRequest:
7046        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
7047    pub ControlRequestAsync: Option<
7048        unsafe extern "C-unwind" fn(
7049            *mut c_void,
7050            u8,
7051            *mut IOUSBDevRequest,
7052            IOAsyncCallback1,
7053            *mut c_void,
7054        ) -> IOReturn,
7055    >,
7056    pub GetPipeProperties: Option<
7057        unsafe extern "C-unwind" fn(
7058            *mut c_void,
7059            u8,
7060            *mut u8,
7061            *mut u8,
7062            *mut u8,
7063            *mut u16,
7064            *mut u8,
7065        ) -> IOReturn,
7066    >,
7067    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7068    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7069    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7070    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7071    pub ReadPipe:
7072        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
7073    pub WritePipe:
7074        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
7075    pub ReadPipeAsync: Option<
7076        unsafe extern "C-unwind" fn(
7077            *mut c_void,
7078            u8,
7079            *mut c_void,
7080            u32,
7081            IOAsyncCallback1,
7082            *mut c_void,
7083        ) -> IOReturn,
7084    >,
7085    pub WritePipeAsync: Option<
7086        unsafe extern "C-unwind" fn(
7087            *mut c_void,
7088            u8,
7089            *mut c_void,
7090            u32,
7091            IOAsyncCallback1,
7092            *mut c_void,
7093        ) -> IOReturn,
7094    >,
7095    pub ReadIsochPipeAsync: Option<
7096        unsafe extern "C-unwind" fn(
7097            *mut c_void,
7098            u8,
7099            *mut c_void,
7100            u64,
7101            u32,
7102            *mut IOUSBIsocFrame,
7103            IOAsyncCallback1,
7104            *mut c_void,
7105        ) -> IOReturn,
7106    >,
7107    pub WriteIsochPipeAsync: Option<
7108        unsafe extern "C-unwind" fn(
7109            *mut c_void,
7110            u8,
7111            *mut c_void,
7112            u64,
7113            u32,
7114            *mut IOUSBIsocFrame,
7115            IOAsyncCallback1,
7116            *mut c_void,
7117        ) -> IOReturn,
7118    >,
7119    pub ControlRequestTO:
7120        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
7121    pub ControlRequestAsyncTO: Option<
7122        unsafe extern "C-unwind" fn(
7123            *mut c_void,
7124            u8,
7125            *mut IOUSBDevRequestTO,
7126            IOAsyncCallback1,
7127            *mut c_void,
7128        ) -> IOReturn,
7129    >,
7130    pub ReadPipeTO: Option<
7131        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
7132    >,
7133    pub WritePipeTO: Option<
7134        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
7135    >,
7136    pub ReadPipeAsyncTO: Option<
7137        unsafe extern "C-unwind" fn(
7138            *mut c_void,
7139            u8,
7140            *mut c_void,
7141            u32,
7142            u32,
7143            u32,
7144            IOAsyncCallback1,
7145            *mut c_void,
7146        ) -> IOReturn,
7147    >,
7148    pub WritePipeAsyncTO: Option<
7149        unsafe extern "C-unwind" fn(
7150            *mut c_void,
7151            u8,
7152            *mut c_void,
7153            u32,
7154            u32,
7155            u32,
7156            IOAsyncCallback1,
7157            *mut c_void,
7158        ) -> IOReturn,
7159    >,
7160    pub USBInterfaceGetStringIndex:
7161        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7162    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7163    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7164    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
7165    pub GetBandwidthAvailable:
7166        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7167    pub GetEndpointProperties: Option<
7168        unsafe extern "C-unwind" fn(
7169            *mut c_void,
7170            u8,
7171            u8,
7172            u8,
7173            *mut u8,
7174            *mut u16,
7175            *mut u8,
7176        ) -> IOReturn,
7177    >,
7178    pub LowLatencyReadIsochPipeAsync: Option<
7179        unsafe extern "C-unwind" fn(
7180            *mut c_void,
7181            u8,
7182            *mut c_void,
7183            u64,
7184            u32,
7185            u32,
7186            *mut IOUSBLowLatencyIsocFrame,
7187            IOAsyncCallback1,
7188            *mut c_void,
7189        ) -> IOReturn,
7190    >,
7191    pub LowLatencyWriteIsochPipeAsync: Option<
7192        unsafe extern "C-unwind" fn(
7193            *mut c_void,
7194            u8,
7195            *mut c_void,
7196            u64,
7197            u32,
7198            u32,
7199            *mut IOUSBLowLatencyIsocFrame,
7200            IOAsyncCallback1,
7201            *mut c_void,
7202        ) -> IOReturn,
7203    >,
7204    pub LowLatencyCreateBuffer: Option<
7205        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
7206    >,
7207    pub LowLatencyDestroyBuffer:
7208        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
7209    pub GetBusMicroFrameNumber:
7210        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7211    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7212    pub GetIOUSBLibVersion: Option<
7213        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
7214    >,
7215    pub FindNextAssociatedDescriptor: Option<
7216        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
7217    >,
7218    pub FindNextAltInterface: Option<
7219        unsafe extern "C-unwind" fn(
7220            *mut c_void,
7221            *const c_void,
7222            *mut IOUSBFindInterfaceRequest,
7223        ) -> *mut IOUSBDescriptorHeader,
7224    >,
7225    pub GetBusFrameNumberWithTime:
7226        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7227    pub GetPipePropertiesV2: Option<
7228        unsafe extern "C-unwind" fn(
7229            *mut c_void,
7230            u8,
7231            *mut u8,
7232            *mut u8,
7233            *mut u8,
7234            *mut u16,
7235            *mut u8,
7236            *mut u8,
7237            *mut u8,
7238            *mut u16,
7239        ) -> IOReturn,
7240    >,
7241    /// Gets the different properties for a pipe.  This API uses a pointer to IOUSBEndpointProperties to return all the different properties.
7242    ///
7243    /// Once an interface is opened, all of the pipes in that interface get created by the kernel. The number
7244    /// of pipes can be retrieved by GetNumEndpoints. The client can then get the properties of any pipe
7245    /// using an index of 1 to GetNumEndpoints. Pipe 0 is the default control pipe in the device.
7246    ///
7247    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7248    ///
7249    /// Parameter `properties`: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters.  Initialize the bVersion field with the appropriate version.  (See USBGetEndpointVersion in USB.h).  The bMaxStreams
7250    /// field, if valid, is the actual number of streams that are supported for this pipe (e.g. it takes into account what the USB controller supports, as well as what the endpoint supports). The wMaxPacketSize is the
7251    /// current FULL maxPacketSize for this pipe, which includes both the mult and the burst. It may have been changed by SetPipePolicy, or it could be 0 as a result of a lack of bandwidth.
7252    ///
7253    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7254    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7255    pub GetPipePropertiesV3: Option<
7256        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
7257    >,
7258    /// Returns the properties of an endpoint, possibly in an alternate interface, including any information from the SuperSpeed Companion Descriptor
7259    ///
7260    /// Parameter `properties`: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters.  Initialize the bVersion field with the appropriate version.  (See USBGetEndpointVersion in USB.h).  Initialize
7261    /// the bAlternateSetting, bEndpointNumber, and bDirection fields of the structure with the desired values for the endpoint.
7262    ///
7263    /// Parameter `properties`: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters.  Initialize the bVersion field with the appropriate version.  (See USBGetEndpointVersion in USB.h).  You also NEED
7264    /// to initialize the bAlternateSetting, the bDirection (kUSBIn or kUSBOut), and the bEndPointNumber with the desired values for the endpoint. The bMaxStreams field, if valid, is the number of streams found in the Super Speed
7265    /// Companion Descriptor. The wMaxPacketSize is the BASE maxPacketSize as found in the endpoint descriptor, and has not been multiplied to take into account burst and mult.
7266    ///
7267    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7268    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7269    pub GetEndpointPropertiesV3:
7270        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
7271    /// Returns non zero if the pipe supports streams, nonZero for the maximum supported streams
7272    ///
7273    /// The interface does not have to be open to use this function.
7274    ///
7275    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7276    ///
7277    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7278    ///
7279    /// Parameter `supportsStreams`: 0 if streams not supported, non-zero value indicates maximum stream number
7280    ///
7281    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7282    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7283    /// Creates the streams for the pipe
7284    ///
7285    /// The interface does not have to be open to use this function.
7286    ///
7287    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7288    ///
7289    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7290    ///
7291    /// Parameter `streamID`: pass 0 if you want to destroy all streams, non-zero value indicates streamID of the highest stream to create
7292    ///
7293    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7294    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7295    /// Get the number of streams which have been configured for the endpoint with CreateStreams
7296    ///
7297    /// The interface does not have to be open to use this function.
7298    ///
7299    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7300    ///
7301    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7302    ///
7303    /// Parameter `configuredStreams`: Number of streams that have been configured with CreateStreams
7304    ///
7305    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7306    pub GetConfiguredStreams:
7307        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7308    /// Performs a read on a stream in a
7309    /// <b>
7310    /// BULK IN
7311    /// </b>
7312    /// pipe, specifying timeout values.
7313    ///
7314    /// The interface must be open for the pipe to exist.
7315    ///
7316    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7317    /// toggle. See
7318    ///
7319    /// ```text
7320    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7321    /// ```
7322    ///
7323    /// or
7324    ///
7325    /// ```text
7326    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7327    /// ```
7328    ///
7329    /// .
7330    ///
7331    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipe API to perform a read from
7332    /// an interrupt pipe.
7333    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7334    ///
7335    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7336    ///
7337    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7338    ///
7339    /// Parameter `streamID`: ID of the stream to read from
7340    ///
7341    /// Parameter `buf`: Buffer to hold the data.
7342    ///
7343    /// Parameter `size`: Pointer to the size of the buffer pointed to by buf.
7344    ///
7345    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7346    /// data is transferred in this amount of time, the request will be aborted and returned.
7347    ///
7348    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7349    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7350    ///
7351    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7352    /// kIOReturnAborted if the thread is interrupted before the call completes, or
7353    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
7354    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
7355    /// NOT contain any valid data.
7356    pub ReadStreamsPipeTO: Option<
7357        unsafe extern "C-unwind" fn(
7358            *mut c_void,
7359            u8,
7360            u32,
7361            *mut c_void,
7362            *mut u32,
7363            u32,
7364            u32,
7365        ) -> IOReturn,
7366    >,
7367    /// Performs an write on a stream on a
7368    /// <b>
7369    /// BULK OUT
7370    /// </b>
7371    /// pipe, with specified timeout values.
7372    ///
7373    /// The interface must be open for the pipe to exist.
7374    ///
7375    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7376    /// toggle. See
7377    ///
7378    /// ```text
7379    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7380    /// ```
7381    ///
7382    /// or
7383    ///
7384    /// ```text
7385    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7386    /// ```
7387    ///
7388    /// .
7389    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7390    ///
7391    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7392    ///
7393    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7394    ///
7395    /// Parameter `streamID`: ID of the stream to write to
7396    ///
7397    /// Parameter `buf`: Buffer to hold the data.
7398    ///
7399    /// Parameter `size`: The size of the buffer pointed to by buf.
7400    ///
7401    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7402    /// data is transferred in this amount of time, the request will be aborted and returned.
7403    ///
7404    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7405    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7406    ///
7407    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7408    /// kIOReturnAborted if the thread is interrupted before the call completes, or
7409    /// kIOReturnNotOpen if the interface is not open for exclusive access.
7410    pub WriteStreamsPipeTO: Option<
7411        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
7412    >,
7413    /// Performs an asynchronous read on a stream on a
7414    /// <b>
7415    /// BULK IN
7416    /// </b>
7417    /// pipe, with specified timeout values.
7418    ///
7419    /// The interface must be open for the pipe to exist.
7420    ///
7421    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7422    /// toggle. See
7423    ///
7424    /// ```text
7425    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7426    /// ```
7427    ///
7428    /// or
7429    ///
7430    /// ```text
7431    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7432    /// ```
7433    ///
7434    /// .
7435    ///
7436    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync API to perform an
7437    /// asynchronous read from an interrupt pipe.
7438    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7439    ///
7440    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7441    ///
7442    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7443    ///
7444    /// Parameter `streamID`: ID of the stream to read from
7445    ///
7446    /// Parameter `buf`: Buffer to hold the data.
7447    ///
7448    /// Parameter `size`: The size of the buffer pointed to by buf.
7449    ///
7450    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7451    /// data is transferred in this amount of time, the request will be aborted and returned.
7452    ///
7453    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7454    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7455    ///
7456    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually read.
7457    /// A message addressed to this callback is posted to the Async port
7458    /// upon completion.
7459    ///
7460    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7461    ///
7462    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
7463    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
7464    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
7465    /// NOT contain any valid data.
7466    pub ReadStreamsPipeAsyncTO: Option<
7467        unsafe extern "C-unwind" fn(
7468            *mut c_void,
7469            u8,
7470            u32,
7471            *mut c_void,
7472            u32,
7473            u32,
7474            u32,
7475            IOAsyncCallback1,
7476            *mut c_void,
7477        ) -> IOReturn,
7478    >,
7479    /// Performs an asynchronous write on a stream on a
7480    /// <b>
7481    /// BULK OUT
7482    /// </b>
7483    /// pipe, with specified timeout values.
7484    ///
7485    /// The interface must be open for the pipe to exist.
7486    ///
7487    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7488    /// toggle. See
7489    ///
7490    /// ```text
7491    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7492    /// ```
7493    ///
7494    /// or
7495    ///
7496    /// ```text
7497    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7498    /// ```
7499    ///
7500    /// .
7501    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7502    ///
7503    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7504    ///
7505    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7506    ///
7507    /// Parameter `streamID`: ID of the stream to write to
7508    ///
7509    /// Parameter `buf`: Buffer to hold the data.
7510    ///
7511    /// Parameter `size`: The size of the buffer pointed to by buf.
7512    ///
7513    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7514    /// data is transferred in this amount of time, the request will be aborted and returned.
7515    ///
7516    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7517    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7518    ///
7519    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually written.
7520    /// A message addressed to this callback is posted to the Async port
7521    /// upon completion.
7522    ///
7523    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7524    ///
7525    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
7526    /// kIOReturnNotOpen if the interface is not open for exclusive access.
7527    pub WriteStreamsPipeAsyncTO: Option<
7528        unsafe extern "C-unwind" fn(
7529            *mut c_void,
7530            u8,
7531            u32,
7532            *mut c_void,
7533            u32,
7534            u32,
7535            u32,
7536            IOAsyncCallback1,
7537            *mut c_void,
7538        ) -> IOReturn,
7539    >,
7540    /// This method causes all outstanding I/O on a stream of a pipe to complete with return code kIOReturnAborted.
7541    ///
7542    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen.
7543    /// Note that this command will also clear the halted bit on the endpoint
7544    /// in the controller, but will NOT clear the data toggle bit.  If you want to clear the data toggle bit as well, see
7545    ///
7546    /// ```text
7547    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7548    /// ```
7549    ///
7550    /// or
7551    ///
7552    /// ```text
7553    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7554    /// ```
7555    ///
7556    /// for more information.  The interface must be open for the pipe to exist.
7557    ///
7558    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7559    ///
7560    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7561    ///
7562    /// Parameter `streamID`: ID of the stream to abort
7563    ///
7564    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7565    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7566    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7567}
7568
7569#[cfg(all(
7570    feature = "AppleUSBDefinitions",
7571    feature = "USB",
7572    feature = "libc",
7573    feature = "objc2"
7574))]
7575unsafe impl Encode for IOUSBInterfaceStruct550 {
7576    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct550", &[
7577        <*mut c_void>::ENCODING,
7578        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
7579        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
7580        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
7581        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
7582        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
7583        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
7584        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
7585        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
7586        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
7587        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7588        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7589        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7590        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7591        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7592        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7593        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7594        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7595        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7596        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7597        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7598        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
7599        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7600        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7601        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
7602        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7603        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
7604        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7605        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7606        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7607        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7608        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7609        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
7610        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7611        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7612        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7613        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7614        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
7615        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7616        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
7617        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
7618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7619        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7620        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7621        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
7622        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7623        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
7624        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7625        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
7626        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7627        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7628        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
7629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
7630        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7631        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7632        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
7633        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
7634        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
7635        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7636        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
7637        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
7638        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
7639        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
7640        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
7641        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
7642        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
7643        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
7644        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7645        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7646        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
7647    ]);
7648}
7649
7650#[cfg(all(
7651    feature = "AppleUSBDefinitions",
7652    feature = "USB",
7653    feature = "libc",
7654    feature = "objc2"
7655))]
7656unsafe impl RefEncode for IOUSBInterfaceStruct550 {
7657    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
7658}
7659
7660/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
7661/// version 5.5.0 and above.
7662///
7663/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface500, as well as some new functions that are available on Mac OS X version 10.8.2 and later.
7664/// Super: IOUSBInterfaceInterface500
7665///
7666/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface550?language=objc)
7667#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
7668pub type IOUSBInterfaceInterface550 = IOUSBInterfaceStruct550;
7669
7670/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
7671/// version 6.5.0 and above.
7672///
7673/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface550, as well as some new functions that are available on
7674/// Mac OS X version 10.9 and later.
7675/// Super: IOUSBInterfaceInterface550
7676///
7677/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct650?language=objc)
7678#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
7679#[repr(C)]
7680#[allow(unpredictable_function_pointer_comparisons)]
7681#[derive(Clone, Copy, Debug, PartialEq)]
7682pub struct IOUSBInterfaceStruct650 {
7683    pub(crate) _reserved: *mut c_void,
7684    pub QueryInterface:
7685        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
7686    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7687    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7688    pub CreateInterfaceAsyncEventSource:
7689        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
7690    pub GetInterfaceAsyncEventSource:
7691        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
7692    pub CreateInterfaceAsyncPort:
7693        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
7694    pub GetInterfaceAsyncPort:
7695        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
7696    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7697    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7698    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7699    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7700    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7701    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7702    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7703    pub GetDeviceReleaseNumber:
7704        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7705    pub GetConfigurationValue:
7706        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7707    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7708    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7709    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7710    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7711    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
7712    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7713    pub GetBusFrameNumber:
7714        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7715    pub ControlRequest:
7716        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
7717    pub ControlRequestAsync: Option<
7718        unsafe extern "C-unwind" fn(
7719            *mut c_void,
7720            u8,
7721            *mut IOUSBDevRequest,
7722            IOAsyncCallback1,
7723            *mut c_void,
7724        ) -> IOReturn,
7725    >,
7726    pub GetPipeProperties: Option<
7727        unsafe extern "C-unwind" fn(
7728            *mut c_void,
7729            u8,
7730            *mut u8,
7731            *mut u8,
7732            *mut u8,
7733            *mut u16,
7734            *mut u8,
7735        ) -> IOReturn,
7736    >,
7737    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7738    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7739    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7740    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7741    pub ReadPipe:
7742        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
7743    pub WritePipe:
7744        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
7745    pub ReadPipeAsync: Option<
7746        unsafe extern "C-unwind" fn(
7747            *mut c_void,
7748            u8,
7749            *mut c_void,
7750            u32,
7751            IOAsyncCallback1,
7752            *mut c_void,
7753        ) -> IOReturn,
7754    >,
7755    pub WritePipeAsync: Option<
7756        unsafe extern "C-unwind" fn(
7757            *mut c_void,
7758            u8,
7759            *mut c_void,
7760            u32,
7761            IOAsyncCallback1,
7762            *mut c_void,
7763        ) -> IOReturn,
7764    >,
7765    pub ReadIsochPipeAsync: Option<
7766        unsafe extern "C-unwind" fn(
7767            *mut c_void,
7768            u8,
7769            *mut c_void,
7770            u64,
7771            u32,
7772            *mut IOUSBIsocFrame,
7773            IOAsyncCallback1,
7774            *mut c_void,
7775        ) -> IOReturn,
7776    >,
7777    pub WriteIsochPipeAsync: Option<
7778        unsafe extern "C-unwind" fn(
7779            *mut c_void,
7780            u8,
7781            *mut c_void,
7782            u64,
7783            u32,
7784            *mut IOUSBIsocFrame,
7785            IOAsyncCallback1,
7786            *mut c_void,
7787        ) -> IOReturn,
7788    >,
7789    pub ControlRequestTO:
7790        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
7791    pub ControlRequestAsyncTO: Option<
7792        unsafe extern "C-unwind" fn(
7793            *mut c_void,
7794            u8,
7795            *mut IOUSBDevRequestTO,
7796            IOAsyncCallback1,
7797            *mut c_void,
7798        ) -> IOReturn,
7799    >,
7800    pub ReadPipeTO: Option<
7801        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
7802    >,
7803    pub WritePipeTO: Option<
7804        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
7805    >,
7806    pub ReadPipeAsyncTO: Option<
7807        unsafe extern "C-unwind" fn(
7808            *mut c_void,
7809            u8,
7810            *mut c_void,
7811            u32,
7812            u32,
7813            u32,
7814            IOAsyncCallback1,
7815            *mut c_void,
7816        ) -> IOReturn,
7817    >,
7818    pub WritePipeAsyncTO: Option<
7819        unsafe extern "C-unwind" fn(
7820            *mut c_void,
7821            u8,
7822            *mut c_void,
7823            u32,
7824            u32,
7825            u32,
7826            IOAsyncCallback1,
7827            *mut c_void,
7828        ) -> IOReturn,
7829    >,
7830    pub USBInterfaceGetStringIndex:
7831        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7832    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7833    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7834    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
7835    pub GetBandwidthAvailable:
7836        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7837    pub GetEndpointProperties: Option<
7838        unsafe extern "C-unwind" fn(
7839            *mut c_void,
7840            u8,
7841            u8,
7842            u8,
7843            *mut u8,
7844            *mut u16,
7845            *mut u8,
7846        ) -> IOReturn,
7847    >,
7848    pub LowLatencyReadIsochPipeAsync: Option<
7849        unsafe extern "C-unwind" fn(
7850            *mut c_void,
7851            u8,
7852            *mut c_void,
7853            u64,
7854            u32,
7855            u32,
7856            *mut IOUSBLowLatencyIsocFrame,
7857            IOAsyncCallback1,
7858            *mut c_void,
7859        ) -> IOReturn,
7860    >,
7861    pub LowLatencyWriteIsochPipeAsync: Option<
7862        unsafe extern "C-unwind" fn(
7863            *mut c_void,
7864            u8,
7865            *mut c_void,
7866            u64,
7867            u32,
7868            u32,
7869            *mut IOUSBLowLatencyIsocFrame,
7870            IOAsyncCallback1,
7871            *mut c_void,
7872        ) -> IOReturn,
7873    >,
7874    pub LowLatencyCreateBuffer: Option<
7875        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
7876    >,
7877    pub LowLatencyDestroyBuffer:
7878        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
7879    pub GetBusMicroFrameNumber:
7880        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7881    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7882    pub GetIOUSBLibVersion: Option<
7883        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
7884    >,
7885    pub FindNextAssociatedDescriptor: Option<
7886        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
7887    >,
7888    pub FindNextAltInterface: Option<
7889        unsafe extern "C-unwind" fn(
7890            *mut c_void,
7891            *const c_void,
7892            *mut IOUSBFindInterfaceRequest,
7893        ) -> *mut IOUSBDescriptorHeader,
7894    >,
7895    pub GetBusFrameNumberWithTime:
7896        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7897    pub GetPipePropertiesV2: Option<
7898        unsafe extern "C-unwind" fn(
7899            *mut c_void,
7900            u8,
7901            *mut u8,
7902            *mut u8,
7903            *mut u8,
7904            *mut u16,
7905            *mut u8,
7906            *mut u8,
7907            *mut u8,
7908            *mut u16,
7909        ) -> IOReturn,
7910    >,
7911    pub GetPipePropertiesV3: Option<
7912        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
7913    >,
7914    pub GetEndpointPropertiesV3:
7915        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
7916    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7917    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7918    pub GetConfiguredStreams:
7919        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7920    pub ReadStreamsPipeTO: Option<
7921        unsafe extern "C-unwind" fn(
7922            *mut c_void,
7923            u8,
7924            u32,
7925            *mut c_void,
7926            *mut u32,
7927            u32,
7928            u32,
7929        ) -> IOReturn,
7930    >,
7931    pub WriteStreamsPipeTO: Option<
7932        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
7933    >,
7934    pub ReadStreamsPipeAsyncTO: Option<
7935        unsafe extern "C-unwind" fn(
7936            *mut c_void,
7937            u8,
7938            u32,
7939            *mut c_void,
7940            u32,
7941            u32,
7942            u32,
7943            IOAsyncCallback1,
7944            *mut c_void,
7945        ) -> IOReturn,
7946    >,
7947    pub WriteStreamsPipeAsyncTO: Option<
7948        unsafe extern "C-unwind" fn(
7949            *mut c_void,
7950            u8,
7951            u32,
7952            *mut c_void,
7953            u32,
7954            u32,
7955            u32,
7956            IOAsyncCallback1,
7957            *mut c_void,
7958        ) -> IOReturn,
7959    >,
7960    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7961    /// Registers a callback routine to be invoked when certain events occur in the kernel.
7962    ///
7963    /// The callback function will be called, for example when the underlying IOUSBInterface is
7964    /// going to be suspended due to some kind of kernel activity. It will also be called when
7965    /// the underlying IOUSBInterface is resumed.
7966    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
7967    ///
7968    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7969    ///
7970    /// Parameter `notificationMask`: Specifies the desired type of notification (e.g. suspend/resume)
7971    ///
7972    /// Parameter `callback`: An IOAsyncCallback2 method. Upon completion, the arg0 argument of the AsyncCallback2 will contain the
7973    /// notification type, and arg1 will contain a notificationToken which should be used when calling AcknowledgeNotification
7974    ///
7975    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7976    ///
7977    /// Parameter `pRegistrationToken`: A pointer to a UInt64 which will contain a registration token if the function is
7978    /// successful. This registration token can then later be used to call UnregisterNotification.
7979    ///
7980    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7981    pub RegisterForNotification: Option<
7982        unsafe extern "C-unwind" fn(
7983            *mut c_void,
7984            u64,
7985            IOAsyncCallback2,
7986            *mut c_void,
7987            *mut u64,
7988        ) -> IOReturn,
7989    >,
7990    /// Unregisters a previously registered callback routine
7991    ///
7992    /// The callback routine will no longer be invoked when events occur
7993    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
7994    ///
7995    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7996    ///
7997    /// Parameter `registrationToken`: The registration token which was obtained in the call to RegisterForNotification
7998    ///
7999    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
8000    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8001    /// Acknowledges a notification event
8002    ///
8003    /// Some events in the kernel will wait for an acknowledgement from all interested parties before proceeding.
8004    /// For example, if an IOUSBInterface is about to be suspended, any User Code which has registered to receive
8005    /// that event will be notified and should acknowledge the notification when it is ready for the IOUSBInterface
8006    /// to be suspended.
8007    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
8008    ///
8009    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8010    ///
8011    /// Parameter `notificationToken`: The notification token which was passed in to the callback routine
8012    ///
8013    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
8014    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8015}
8016
8017#[cfg(all(
8018    feature = "AppleUSBDefinitions",
8019    feature = "USB",
8020    feature = "libc",
8021    feature = "objc2"
8022))]
8023unsafe impl Encode for IOUSBInterfaceStruct650 {
8024    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct650", &[
8025        <*mut c_void>::ENCODING,
8026        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8027        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8028        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8029        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8030        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8031        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8032        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8033        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8034        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8035        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8036        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8037        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8038        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8039        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8040        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8041        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8042        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8043        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8044        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8045        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8046        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8047        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8048        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8049        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8050        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8051        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8052        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8053        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8054        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8055        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8056        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8057        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8058        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8059        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8060        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8061        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8062        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8063        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8064        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8065        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8066        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8067        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8068        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8069        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8070        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8071        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
8072        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8073        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8074        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8075        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8076        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8077        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8078        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8079        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8080        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8081        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8082        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8083        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8084        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
8085        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8086        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8087        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8088        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8089        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8090        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8091        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8092        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8093        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8094        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8095        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8096        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8097        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8098    ]);
8099}
8100
8101#[cfg(all(
8102    feature = "AppleUSBDefinitions",
8103    feature = "USB",
8104    feature = "libc",
8105    feature = "objc2"
8106))]
8107unsafe impl RefEncode for IOUSBInterfaceStruct650 {
8108    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8109}
8110
8111/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
8112/// version 6.5.0 and above.
8113///
8114/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface550, as well as some new functions that are available on
8115/// Mac OS X version 10.9 and later.
8116/// Super: IOUSBInterfaceInterface550
8117///
8118/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface650?language=objc)
8119#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8120pub type IOUSBInterfaceInterface650 = IOUSBInterfaceStruct650;
8121
8122/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8123/// version 7.0.0 and above.
8124///
8125/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface650, as well as some new functions that are available on
8126/// Mac OS X version 10.9 and later.
8127/// Super: IOUSBInterfaceInterface650
8128///
8129/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct700?language=objc)
8130#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8131#[repr(C)]
8132#[allow(unpredictable_function_pointer_comparisons)]
8133#[derive(Clone, Copy, Debug, PartialEq)]
8134pub struct IOUSBInterfaceStruct700 {
8135    pub(crate) _reserved: *mut c_void,
8136    pub QueryInterface:
8137        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8138    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8139    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8140    pub CreateInterfaceAsyncEventSource:
8141        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8142    pub GetInterfaceAsyncEventSource:
8143        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
8144    pub CreateInterfaceAsyncPort:
8145        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
8146    pub GetInterfaceAsyncPort:
8147        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
8148    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8149    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8150    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8151    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8152    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8153    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8154    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8155    pub GetDeviceReleaseNumber:
8156        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8157    pub GetConfigurationValue:
8158        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8159    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8160    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8161    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8162    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8163    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
8164    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8165    pub GetBusFrameNumber:
8166        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8167    pub ControlRequest:
8168        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
8169    pub ControlRequestAsync: Option<
8170        unsafe extern "C-unwind" fn(
8171            *mut c_void,
8172            u8,
8173            *mut IOUSBDevRequest,
8174            IOAsyncCallback1,
8175            *mut c_void,
8176        ) -> IOReturn,
8177    >,
8178    pub GetPipeProperties: Option<
8179        unsafe extern "C-unwind" fn(
8180            *mut c_void,
8181            u8,
8182            *mut u8,
8183            *mut u8,
8184            *mut u8,
8185            *mut u16,
8186            *mut u8,
8187        ) -> IOReturn,
8188    >,
8189    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8190    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8191    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8192    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8193    pub ReadPipe:
8194        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
8195    pub WritePipe:
8196        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
8197    pub ReadPipeAsync: Option<
8198        unsafe extern "C-unwind" fn(
8199            *mut c_void,
8200            u8,
8201            *mut c_void,
8202            u32,
8203            IOAsyncCallback1,
8204            *mut c_void,
8205        ) -> IOReturn,
8206    >,
8207    pub WritePipeAsync: Option<
8208        unsafe extern "C-unwind" fn(
8209            *mut c_void,
8210            u8,
8211            *mut c_void,
8212            u32,
8213            IOAsyncCallback1,
8214            *mut c_void,
8215        ) -> IOReturn,
8216    >,
8217    pub ReadIsochPipeAsync: Option<
8218        unsafe extern "C-unwind" fn(
8219            *mut c_void,
8220            u8,
8221            *mut c_void,
8222            u64,
8223            u32,
8224            *mut IOUSBIsocFrame,
8225            IOAsyncCallback1,
8226            *mut c_void,
8227        ) -> IOReturn,
8228    >,
8229    pub WriteIsochPipeAsync: Option<
8230        unsafe extern "C-unwind" fn(
8231            *mut c_void,
8232            u8,
8233            *mut c_void,
8234            u64,
8235            u32,
8236            *mut IOUSBIsocFrame,
8237            IOAsyncCallback1,
8238            *mut c_void,
8239        ) -> IOReturn,
8240    >,
8241    pub ControlRequestTO:
8242        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
8243    pub ControlRequestAsyncTO: Option<
8244        unsafe extern "C-unwind" fn(
8245            *mut c_void,
8246            u8,
8247            *mut IOUSBDevRequestTO,
8248            IOAsyncCallback1,
8249            *mut c_void,
8250        ) -> IOReturn,
8251    >,
8252    pub ReadPipeTO: Option<
8253        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
8254    >,
8255    pub WritePipeTO: Option<
8256        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
8257    >,
8258    pub ReadPipeAsyncTO: Option<
8259        unsafe extern "C-unwind" fn(
8260            *mut c_void,
8261            u8,
8262            *mut c_void,
8263            u32,
8264            u32,
8265            u32,
8266            IOAsyncCallback1,
8267            *mut c_void,
8268        ) -> IOReturn,
8269    >,
8270    pub WritePipeAsyncTO: Option<
8271        unsafe extern "C-unwind" fn(
8272            *mut c_void,
8273            u8,
8274            *mut c_void,
8275            u32,
8276            u32,
8277            u32,
8278            IOAsyncCallback1,
8279            *mut c_void,
8280        ) -> IOReturn,
8281    >,
8282    pub USBInterfaceGetStringIndex:
8283        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8284    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8285    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8286    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
8287    pub GetBandwidthAvailable:
8288        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8289    pub GetEndpointProperties: Option<
8290        unsafe extern "C-unwind" fn(
8291            *mut c_void,
8292            u8,
8293            u8,
8294            u8,
8295            *mut u8,
8296            *mut u16,
8297            *mut u8,
8298        ) -> IOReturn,
8299    >,
8300    pub LowLatencyReadIsochPipeAsync: Option<
8301        unsafe extern "C-unwind" fn(
8302            *mut c_void,
8303            u8,
8304            *mut c_void,
8305            u64,
8306            u32,
8307            u32,
8308            *mut IOUSBLowLatencyIsocFrame,
8309            IOAsyncCallback1,
8310            *mut c_void,
8311        ) -> IOReturn,
8312    >,
8313    pub LowLatencyWriteIsochPipeAsync: Option<
8314        unsafe extern "C-unwind" fn(
8315            *mut c_void,
8316            u8,
8317            *mut c_void,
8318            u64,
8319            u32,
8320            u32,
8321            *mut IOUSBLowLatencyIsocFrame,
8322            IOAsyncCallback1,
8323            *mut c_void,
8324        ) -> IOReturn,
8325    >,
8326    pub LowLatencyCreateBuffer: Option<
8327        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
8328    >,
8329    pub LowLatencyDestroyBuffer:
8330        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
8331    pub GetBusMicroFrameNumber:
8332        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8333    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8334    pub GetIOUSBLibVersion: Option<
8335        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
8336    >,
8337    pub FindNextAssociatedDescriptor: Option<
8338        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
8339    >,
8340    pub FindNextAltInterface: Option<
8341        unsafe extern "C-unwind" fn(
8342            *mut c_void,
8343            *const c_void,
8344            *mut IOUSBFindInterfaceRequest,
8345        ) -> *mut IOUSBDescriptorHeader,
8346    >,
8347    pub GetBusFrameNumberWithTime:
8348        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8349    pub GetPipePropertiesV2: Option<
8350        unsafe extern "C-unwind" fn(
8351            *mut c_void,
8352            u8,
8353            *mut u8,
8354            *mut u8,
8355            *mut u8,
8356            *mut u16,
8357            *mut u8,
8358            *mut u8,
8359            *mut u8,
8360            *mut u16,
8361        ) -> IOReturn,
8362    >,
8363    pub GetPipePropertiesV3: Option<
8364        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
8365    >,
8366    pub GetEndpointPropertiesV3:
8367        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
8368    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8369    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8370    pub GetConfiguredStreams:
8371        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8372    pub ReadStreamsPipeTO: Option<
8373        unsafe extern "C-unwind" fn(
8374            *mut c_void,
8375            u8,
8376            u32,
8377            *mut c_void,
8378            *mut u32,
8379            u32,
8380            u32,
8381        ) -> IOReturn,
8382    >,
8383    pub WriteStreamsPipeTO: Option<
8384        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
8385    >,
8386    pub ReadStreamsPipeAsyncTO: Option<
8387        unsafe extern "C-unwind" fn(
8388            *mut c_void,
8389            u8,
8390            u32,
8391            *mut c_void,
8392            u32,
8393            u32,
8394            u32,
8395            IOAsyncCallback1,
8396            *mut c_void,
8397        ) -> IOReturn,
8398    >,
8399    pub WriteStreamsPipeAsyncTO: Option<
8400        unsafe extern "C-unwind" fn(
8401            *mut c_void,
8402            u8,
8403            u32,
8404            *mut c_void,
8405            u32,
8406            u32,
8407            u32,
8408            IOAsyncCallback1,
8409            *mut c_void,
8410        ) -> IOReturn,
8411    >,
8412    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8413    pub RegisterForNotification: Option<
8414        unsafe extern "C-unwind" fn(
8415            *mut c_void,
8416            u64,
8417            IOAsyncCallback2,
8418            *mut c_void,
8419            *mut u64,
8420        ) -> IOReturn,
8421    >,
8422    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8423    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8424    /// Triggers IOKit driver matching for this interface
8425    ///
8426    /// This function will call IOKit's registerService on the IOUSBInterface, which will load any kernel drivers for the interface. The SetConfigurationV2 API can be told to not load
8427    /// drivers for ALL IOUSBInterfaces.  This call will then allow a client to load a driver for just one of the interfaces.  The client must have the "com.apple.vm.device-access" entitlement or run with root privileges to call this API.
8428    /// Availability: This function is only available with IOUSBInterfaceInterface700 and above.
8429    ///
8430    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8431    ///
8432    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNotPermitted if the client does not have the "com.apple.vm.device-access" entitlement or does not have root privileges.
8433    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8434}
8435
8436#[cfg(all(
8437    feature = "AppleUSBDefinitions",
8438    feature = "USB",
8439    feature = "libc",
8440    feature = "objc2"
8441))]
8442unsafe impl Encode for IOUSBInterfaceStruct700 {
8443    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct700", &[
8444        <*mut c_void>::ENCODING,
8445        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8446        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8447        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8448        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8449        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8450        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8451        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8452        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8453        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8454        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8455        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8456        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8457        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8458        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8459        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8460        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8461        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8462        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8463        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8464        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8465        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8466        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8467        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8468        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8469        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8470        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8471        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8472        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8473        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8474        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8475        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8476        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8477        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8478        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8479        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8480        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8481        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8482        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8483        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8484        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8485        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8486        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8487        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8488        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8489        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8490        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
8491        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8492        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8493        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8494        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8495        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8496        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8497        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8498        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8499        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8500        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8501        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8502        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8503        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
8504        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8505        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8506        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8507        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8508        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8509        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8510        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8511        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8512        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8513        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8514        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8515        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8516        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8517        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8518    ]);
8519}
8520
8521#[cfg(all(
8522    feature = "AppleUSBDefinitions",
8523    feature = "USB",
8524    feature = "libc",
8525    feature = "objc2"
8526))]
8527unsafe impl RefEncode for IOUSBInterfaceStruct700 {
8528    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8529}
8530
8531/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8532/// version 7.0.0 and above.
8533///
8534/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface650, as well as some new functions that are available on
8535/// Mac OS X version 10.9 and later.
8536/// Super: IOUSBInterfaceInterface650
8537///
8538/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface700?language=objc)
8539#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8540pub type IOUSBInterfaceInterface700 = IOUSBInterfaceStruct700;
8541
8542/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8543/// version 8.0.0 and above.
8544///
8545/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface700, as well as some new functions that are available on
8546/// Mac OS X version 10.11 and later.
8547/// Super: IOUSBInterfaceInterface700
8548///
8549/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct800?language=objc)
8550#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8551#[repr(C)]
8552#[allow(unpredictable_function_pointer_comparisons)]
8553#[derive(Clone, Copy, Debug, PartialEq)]
8554pub struct IOUSBInterfaceStruct800 {
8555    pub(crate) _reserved: *mut c_void,
8556    pub QueryInterface:
8557        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8558    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8559    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8560    pub CreateInterfaceAsyncEventSource:
8561        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8562    pub GetInterfaceAsyncEventSource:
8563        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
8564    pub CreateInterfaceAsyncPort:
8565        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
8566    pub GetInterfaceAsyncPort:
8567        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
8568    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8569    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8570    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8571    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8572    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8573    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8574    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8575    pub GetDeviceReleaseNumber:
8576        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8577    pub GetConfigurationValue:
8578        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8579    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8580    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8581    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8582    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8583    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
8584    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8585    pub GetBusFrameNumber:
8586        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8587    pub ControlRequest:
8588        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
8589    pub ControlRequestAsync: Option<
8590        unsafe extern "C-unwind" fn(
8591            *mut c_void,
8592            u8,
8593            *mut IOUSBDevRequest,
8594            IOAsyncCallback1,
8595            *mut c_void,
8596        ) -> IOReturn,
8597    >,
8598    pub GetPipeProperties: Option<
8599        unsafe extern "C-unwind" fn(
8600            *mut c_void,
8601            u8,
8602            *mut u8,
8603            *mut u8,
8604            *mut u8,
8605            *mut u16,
8606            *mut u8,
8607        ) -> IOReturn,
8608    >,
8609    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8610    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8611    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8612    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8613    pub ReadPipe:
8614        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
8615    pub WritePipe:
8616        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
8617    pub ReadPipeAsync: Option<
8618        unsafe extern "C-unwind" fn(
8619            *mut c_void,
8620            u8,
8621            *mut c_void,
8622            u32,
8623            IOAsyncCallback1,
8624            *mut c_void,
8625        ) -> IOReturn,
8626    >,
8627    pub WritePipeAsync: Option<
8628        unsafe extern "C-unwind" fn(
8629            *mut c_void,
8630            u8,
8631            *mut c_void,
8632            u32,
8633            IOAsyncCallback1,
8634            *mut c_void,
8635        ) -> IOReturn,
8636    >,
8637    pub ReadIsochPipeAsync: Option<
8638        unsafe extern "C-unwind" fn(
8639            *mut c_void,
8640            u8,
8641            *mut c_void,
8642            u64,
8643            u32,
8644            *mut IOUSBIsocFrame,
8645            IOAsyncCallback1,
8646            *mut c_void,
8647        ) -> IOReturn,
8648    >,
8649    pub WriteIsochPipeAsync: Option<
8650        unsafe extern "C-unwind" fn(
8651            *mut c_void,
8652            u8,
8653            *mut c_void,
8654            u64,
8655            u32,
8656            *mut IOUSBIsocFrame,
8657            IOAsyncCallback1,
8658            *mut c_void,
8659        ) -> IOReturn,
8660    >,
8661    pub ControlRequestTO:
8662        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
8663    pub ControlRequestAsyncTO: Option<
8664        unsafe extern "C-unwind" fn(
8665            *mut c_void,
8666            u8,
8667            *mut IOUSBDevRequestTO,
8668            IOAsyncCallback1,
8669            *mut c_void,
8670        ) -> IOReturn,
8671    >,
8672    pub ReadPipeTO: Option<
8673        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
8674    >,
8675    pub WritePipeTO: Option<
8676        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
8677    >,
8678    pub ReadPipeAsyncTO: Option<
8679        unsafe extern "C-unwind" fn(
8680            *mut c_void,
8681            u8,
8682            *mut c_void,
8683            u32,
8684            u32,
8685            u32,
8686            IOAsyncCallback1,
8687            *mut c_void,
8688        ) -> IOReturn,
8689    >,
8690    pub WritePipeAsyncTO: Option<
8691        unsafe extern "C-unwind" fn(
8692            *mut c_void,
8693            u8,
8694            *mut c_void,
8695            u32,
8696            u32,
8697            u32,
8698            IOAsyncCallback1,
8699            *mut c_void,
8700        ) -> IOReturn,
8701    >,
8702    pub USBInterfaceGetStringIndex:
8703        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8704    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8705    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8706    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
8707    pub GetBandwidthAvailable:
8708        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8709    pub GetEndpointProperties: Option<
8710        unsafe extern "C-unwind" fn(
8711            *mut c_void,
8712            u8,
8713            u8,
8714            u8,
8715            *mut u8,
8716            *mut u16,
8717            *mut u8,
8718        ) -> IOReturn,
8719    >,
8720    pub LowLatencyReadIsochPipeAsync: Option<
8721        unsafe extern "C-unwind" fn(
8722            *mut c_void,
8723            u8,
8724            *mut c_void,
8725            u64,
8726            u32,
8727            u32,
8728            *mut IOUSBLowLatencyIsocFrame,
8729            IOAsyncCallback1,
8730            *mut c_void,
8731        ) -> IOReturn,
8732    >,
8733    pub LowLatencyWriteIsochPipeAsync: Option<
8734        unsafe extern "C-unwind" fn(
8735            *mut c_void,
8736            u8,
8737            *mut c_void,
8738            u64,
8739            u32,
8740            u32,
8741            *mut IOUSBLowLatencyIsocFrame,
8742            IOAsyncCallback1,
8743            *mut c_void,
8744        ) -> IOReturn,
8745    >,
8746    pub LowLatencyCreateBuffer: Option<
8747        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
8748    >,
8749    pub LowLatencyDestroyBuffer:
8750        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
8751    pub GetBusMicroFrameNumber:
8752        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8753    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8754    pub GetIOUSBLibVersion: Option<
8755        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
8756    >,
8757    pub FindNextAssociatedDescriptor: Option<
8758        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
8759    >,
8760    pub FindNextAltInterface: Option<
8761        unsafe extern "C-unwind" fn(
8762            *mut c_void,
8763            *const c_void,
8764            *mut IOUSBFindInterfaceRequest,
8765        ) -> *mut IOUSBDescriptorHeader,
8766    >,
8767    pub GetBusFrameNumberWithTime:
8768        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8769    pub GetPipePropertiesV2: Option<
8770        unsafe extern "C-unwind" fn(
8771            *mut c_void,
8772            u8,
8773            *mut u8,
8774            *mut u8,
8775            *mut u8,
8776            *mut u16,
8777            *mut u8,
8778            *mut u8,
8779            *mut u8,
8780            *mut u16,
8781        ) -> IOReturn,
8782    >,
8783    pub GetPipePropertiesV3: Option<
8784        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
8785    >,
8786    pub GetEndpointPropertiesV3:
8787        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
8788    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8789    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8790    pub GetConfiguredStreams:
8791        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8792    pub ReadStreamsPipeTO: Option<
8793        unsafe extern "C-unwind" fn(
8794            *mut c_void,
8795            u8,
8796            u32,
8797            *mut c_void,
8798            *mut u32,
8799            u32,
8800            u32,
8801        ) -> IOReturn,
8802    >,
8803    pub WriteStreamsPipeTO: Option<
8804        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
8805    >,
8806    pub ReadStreamsPipeAsyncTO: Option<
8807        unsafe extern "C-unwind" fn(
8808            *mut c_void,
8809            u8,
8810            u32,
8811            *mut c_void,
8812            u32,
8813            u32,
8814            u32,
8815            IOAsyncCallback1,
8816            *mut c_void,
8817        ) -> IOReturn,
8818    >,
8819    pub WriteStreamsPipeAsyncTO: Option<
8820        unsafe extern "C-unwind" fn(
8821            *mut c_void,
8822            u8,
8823            u32,
8824            *mut c_void,
8825            u32,
8826            u32,
8827            u32,
8828            IOAsyncCallback1,
8829            *mut c_void,
8830        ) -> IOReturn,
8831    >,
8832    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8833    pub RegisterForNotification: Option<
8834        unsafe extern "C-unwind" fn(
8835            *mut c_void,
8836            u64,
8837            IOAsyncCallback2,
8838            *mut c_void,
8839            *mut u64,
8840        ) -> IOReturn,
8841    >,
8842    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8843    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8844    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8845    /// Define an idling policy for the interface.
8846    ///
8847    /// This method is called to enforce an an idle policy for the device.  Note, the idle policy is only active while the interface is open and is reset when closed.
8848    /// Availability: This function is only available with IOUSBInterfaceInterface800 and above.
8849    ///
8850    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8851    ///
8852    /// Parameter `deviceIdleTimeout`: The amount of time in ms a device is idle before it can be suspended.  Use 0 to prevent suspending an idle device.
8853    ///
8854    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnUnsupported is the bus doesn't support this function.
8855    pub SetDeviceIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
8856    /// Define an idling policy for the interface.
8857    ///
8858    /// This method is called to enforce an an idle policy for the pipes. Note, the idle policy is only active while the interface is open and is reset when closed.
8859    /// Availability: This function is only available with IOUSBInterfaceInterface800 and above.
8860    ///
8861    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8862    ///
8863    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
8864    ///
8865    /// Parameter `ioIdleTimeout`: The amount of time in ms an IO is pending before it allows the device to be considered idle.  Use 0 to prevent idling the device while the IO is in progress, regardless of how long it takes.
8866    ///
8867    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnUnsupported is the bus doesn't support this function.
8868    pub SetPipeIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8869}
8870
8871#[cfg(all(
8872    feature = "AppleUSBDefinitions",
8873    feature = "USB",
8874    feature = "libc",
8875    feature = "objc2"
8876))]
8877unsafe impl Encode for IOUSBInterfaceStruct800 {
8878    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct800", &[
8879        <*mut c_void>::ENCODING,
8880        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8881        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8882        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8883        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8884        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8885        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8886        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8887        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8888        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8889        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8890        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8891        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8892        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8893        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8894        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8895        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8896        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8897        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8898        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8899        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8900        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8901        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8902        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8903        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8904        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8905        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8906        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8907        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8908        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8909        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8910        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8911        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8912        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8913        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8914        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8915        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8916        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8917        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8918        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8919        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8920        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8921        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8922        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8923        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8924        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8925        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
8926        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8927        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8928        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8929        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8930        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8931        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8932        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8933        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8934        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8935        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8936        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8937        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8938        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
8939        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8940        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8941        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8942        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8943        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8944        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8945        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8946        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8947        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8948        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8949        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8950        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8951        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8952        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8953        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
8954        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8955    ]);
8956}
8957
8958#[cfg(all(
8959    feature = "AppleUSBDefinitions",
8960    feature = "USB",
8961    feature = "libc",
8962    feature = "objc2"
8963))]
8964unsafe impl RefEncode for IOUSBInterfaceStruct800 {
8965    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8966}
8967
8968/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8969/// version 8.0.0 and above.
8970///
8971/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface700, as well as some new functions that are available on
8972/// Mac OS X version 10.11 and later.
8973/// Super: IOUSBInterfaceInterface700
8974///
8975/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface800?language=objc)
8976#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8977pub type IOUSBInterfaceInterface800 = IOUSBInterfaceStruct800;
8978
8979/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8980/// version 900.4.2 and above.
8981///
8982/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface800, as well as some new functions that are available on
8983/// macOS 10.14 and later.
8984/// Super: IOUSBInterfaceInterface800
8985///
8986/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct942?language=objc)
8987#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8988#[repr(C)]
8989#[allow(unpredictable_function_pointer_comparisons)]
8990#[derive(Clone, Copy, Debug, PartialEq)]
8991pub struct IOUSBInterfaceStruct942 {
8992    pub(crate) _reserved: *mut c_void,
8993    pub QueryInterface:
8994        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8995    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8996    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8997    pub CreateInterfaceAsyncEventSource:
8998        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8999    pub GetInterfaceAsyncEventSource:
9000        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
9001    pub CreateInterfaceAsyncPort:
9002        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
9003    pub GetInterfaceAsyncPort:
9004        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
9005    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9006    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9007    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9008    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9009    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9010    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
9011    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
9012    pub GetDeviceReleaseNumber:
9013        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
9014    pub GetConfigurationValue:
9015        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9016    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9017    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9018    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9019    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
9020    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
9021    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9022    pub GetBusFrameNumber:
9023        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
9024    pub ControlRequest:
9025        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
9026    pub ControlRequestAsync: Option<
9027        unsafe extern "C-unwind" fn(
9028            *mut c_void,
9029            u8,
9030            *mut IOUSBDevRequest,
9031            IOAsyncCallback1,
9032            *mut c_void,
9033        ) -> IOReturn,
9034    >,
9035    pub GetPipeProperties: Option<
9036        unsafe extern "C-unwind" fn(
9037            *mut c_void,
9038            u8,
9039            *mut u8,
9040            *mut u8,
9041            *mut u8,
9042            *mut u16,
9043            *mut u8,
9044        ) -> IOReturn,
9045    >,
9046    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9047    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9048    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9049    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9050    pub ReadPipe:
9051        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
9052    pub WritePipe:
9053        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
9054    pub ReadPipeAsync: Option<
9055        unsafe extern "C-unwind" fn(
9056            *mut c_void,
9057            u8,
9058            *mut c_void,
9059            u32,
9060            IOAsyncCallback1,
9061            *mut c_void,
9062        ) -> IOReturn,
9063    >,
9064    pub WritePipeAsync: Option<
9065        unsafe extern "C-unwind" fn(
9066            *mut c_void,
9067            u8,
9068            *mut c_void,
9069            u32,
9070            IOAsyncCallback1,
9071            *mut c_void,
9072        ) -> IOReturn,
9073    >,
9074    pub ReadIsochPipeAsync: Option<
9075        unsafe extern "C-unwind" fn(
9076            *mut c_void,
9077            u8,
9078            *mut c_void,
9079            u64,
9080            u32,
9081            *mut IOUSBIsocFrame,
9082            IOAsyncCallback1,
9083            *mut c_void,
9084        ) -> IOReturn,
9085    >,
9086    pub WriteIsochPipeAsync: Option<
9087        unsafe extern "C-unwind" fn(
9088            *mut c_void,
9089            u8,
9090            *mut c_void,
9091            u64,
9092            u32,
9093            *mut IOUSBIsocFrame,
9094            IOAsyncCallback1,
9095            *mut c_void,
9096        ) -> IOReturn,
9097    >,
9098    pub ControlRequestTO:
9099        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
9100    pub ControlRequestAsyncTO: Option<
9101        unsafe extern "C-unwind" fn(
9102            *mut c_void,
9103            u8,
9104            *mut IOUSBDevRequestTO,
9105            IOAsyncCallback1,
9106            *mut c_void,
9107        ) -> IOReturn,
9108    >,
9109    pub ReadPipeTO: Option<
9110        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
9111    >,
9112    pub WritePipeTO: Option<
9113        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
9114    >,
9115    pub ReadPipeAsyncTO: Option<
9116        unsafe extern "C-unwind" fn(
9117            *mut c_void,
9118            u8,
9119            *mut c_void,
9120            u32,
9121            u32,
9122            u32,
9123            IOAsyncCallback1,
9124            *mut c_void,
9125        ) -> IOReturn,
9126    >,
9127    pub WritePipeAsyncTO: Option<
9128        unsafe extern "C-unwind" fn(
9129            *mut c_void,
9130            u8,
9131            *mut c_void,
9132            u32,
9133            u32,
9134            u32,
9135            IOAsyncCallback1,
9136            *mut c_void,
9137        ) -> IOReturn,
9138    >,
9139    pub USBInterfaceGetStringIndex:
9140        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9141    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9142    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9143    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
9144    pub GetBandwidthAvailable:
9145        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
9146    pub GetEndpointProperties: Option<
9147        unsafe extern "C-unwind" fn(
9148            *mut c_void,
9149            u8,
9150            u8,
9151            u8,
9152            *mut u8,
9153            *mut u16,
9154            *mut u8,
9155        ) -> IOReturn,
9156    >,
9157    pub LowLatencyReadIsochPipeAsync: Option<
9158        unsafe extern "C-unwind" fn(
9159            *mut c_void,
9160            u8,
9161            *mut c_void,
9162            u64,
9163            u32,
9164            u32,
9165            *mut IOUSBLowLatencyIsocFrame,
9166            IOAsyncCallback1,
9167            *mut c_void,
9168        ) -> IOReturn,
9169    >,
9170    pub LowLatencyWriteIsochPipeAsync: Option<
9171        unsafe extern "C-unwind" fn(
9172            *mut c_void,
9173            u8,
9174            *mut c_void,
9175            u64,
9176            u32,
9177            u32,
9178            *mut IOUSBLowLatencyIsocFrame,
9179            IOAsyncCallback1,
9180            *mut c_void,
9181        ) -> IOReturn,
9182    >,
9183    pub LowLatencyCreateBuffer: Option<
9184        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
9185    >,
9186    pub LowLatencyDestroyBuffer:
9187        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
9188    pub GetBusMicroFrameNumber:
9189        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
9190    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
9191    pub GetIOUSBLibVersion: Option<
9192        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
9193    >,
9194    pub FindNextAssociatedDescriptor: Option<
9195        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
9196    >,
9197    pub FindNextAltInterface: Option<
9198        unsafe extern "C-unwind" fn(
9199            *mut c_void,
9200            *const c_void,
9201            *mut IOUSBFindInterfaceRequest,
9202        ) -> *mut IOUSBDescriptorHeader,
9203    >,
9204    pub GetBusFrameNumberWithTime:
9205        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
9206    pub GetPipePropertiesV2: Option<
9207        unsafe extern "C-unwind" fn(
9208            *mut c_void,
9209            u8,
9210            *mut u8,
9211            *mut u8,
9212            *mut u8,
9213            *mut u16,
9214            *mut u8,
9215            *mut u8,
9216            *mut u8,
9217            *mut u16,
9218        ) -> IOReturn,
9219    >,
9220    pub GetPipePropertiesV3: Option<
9221        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
9222    >,
9223    pub GetEndpointPropertiesV3:
9224        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
9225    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
9226    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9227    pub GetConfiguredStreams:
9228        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
9229    pub ReadStreamsPipeTO: Option<
9230        unsafe extern "C-unwind" fn(
9231            *mut c_void,
9232            u8,
9233            u32,
9234            *mut c_void,
9235            *mut u32,
9236            u32,
9237            u32,
9238        ) -> IOReturn,
9239    >,
9240    pub WriteStreamsPipeTO: Option<
9241        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
9242    >,
9243    pub ReadStreamsPipeAsyncTO: Option<
9244        unsafe extern "C-unwind" fn(
9245            *mut c_void,
9246            u8,
9247            u32,
9248            *mut c_void,
9249            u32,
9250            u32,
9251            u32,
9252            IOAsyncCallback1,
9253            *mut c_void,
9254        ) -> IOReturn,
9255    >,
9256    pub WriteStreamsPipeAsyncTO: Option<
9257        unsafe extern "C-unwind" fn(
9258            *mut c_void,
9259            u8,
9260            u32,
9261            *mut c_void,
9262            u32,
9263            u32,
9264            u32,
9265            IOAsyncCallback1,
9266            *mut c_void,
9267        ) -> IOReturn,
9268    >,
9269    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9270    pub RegisterForNotification: Option<
9271        unsafe extern "C-unwind" fn(
9272            *mut c_void,
9273            u64,
9274            IOAsyncCallback2,
9275            *mut c_void,
9276            *mut u64,
9277        ) -> IOReturn,
9278    >,
9279    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
9280    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
9281    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9282    pub SetDeviceIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
9283    pub SetPipeIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9284    /// Returns the IONotificationPort for this IOService instance.
9285    /// Availability: This function is only available with IOUSBInterfaceInterface942 and above.
9286    ///
9287    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
9288    ///
9289    /// Returns: Returns the IONotificationPortRef if one exists, MACH_PORT_NULL otherwise.
9290    pub GetInterfaceAsyncNotificationPort:
9291        Option<unsafe extern "C-unwind" fn(*mut c_void) -> IONotificationPortRef>,
9292}
9293
9294#[cfg(all(
9295    feature = "AppleUSBDefinitions",
9296    feature = "USB",
9297    feature = "libc",
9298    feature = "objc2"
9299))]
9300unsafe impl Encode for IOUSBInterfaceStruct942 {
9301    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct942", &[
9302        <*mut c_void>::ENCODING,
9303        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
9304        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
9305        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
9306        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
9307        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
9308        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
9309        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
9310        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9311        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9312        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9313        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9314        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9315        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9316        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9317        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9318        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9319        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9320        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9321        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9322        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9323        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
9324        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9325        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9326        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
9327        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9328        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
9329        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9330        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9331        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9332        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9333        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9334        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
9335        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9336        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9337        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9338        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9339        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
9340        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9341        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
9342        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
9343        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9344        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9345        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9346        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9347        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9348        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
9349        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9350        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
9351        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9352        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9353        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
9354        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
9355        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9356        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9357        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
9358        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
9359        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
9360        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9361        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,*mut u8,*mut u8,*mut u16,) -> IOReturn>>::ENCODING,
9362        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
9363        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
9364        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
9365        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9366        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
9367        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
9368        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
9369        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9370        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9371        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9372        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
9373        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
9374        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
9375        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9376        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
9377        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9378        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IONotificationPortRef>>::ENCODING,
9379    ]);
9380}
9381
9382#[cfg(all(
9383    feature = "AppleUSBDefinitions",
9384    feature = "USB",
9385    feature = "libc",
9386    feature = "objc2"
9387))]
9388unsafe impl RefEncode for IOUSBInterfaceStruct942 {
9389    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
9390}
9391
9392/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
9393/// version 900.4.2 and above.
9394///
9395/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface800, as well as some new functions that are available on
9396/// macOS 10.14 and later.
9397/// Super: IOUSBInterfaceInterface800
9398///
9399/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface942?language=objc)
9400#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
9401pub type IOUSBInterfaceInterface942 = IOUSBInterfaceStruct942;
9402
9403/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface?language=objc)
9404#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
9405pub type IOUSBInterfaceInterface = IOUSBInterfaceInterface942;