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#[derive(Clone, Copy, Debug, PartialEq)]
27pub struct IOUSBDeviceStruct100 {
28    pub(crate) _reserved: *mut c_void,
29    pub QueryInterface:
30        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
31    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
32    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
33    /// Creates a run loop source for delivery of all asynchronous notifications on this device.
34    ///
35    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers
36    /// completion notifications (see
37    ///
38    /// ```text
39    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/CreateInterfaceAsyncPort/ CreateInterfaceAsyncPort
40    /// ```
41    ///
42    /// ). This routine
43    /// wraps that port with the appropriate routing code so that the completion notifications can be
44    /// automatically routed through the client's CFRunLoop.
45    ///
46    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
47    ///
48    /// Parameter `source`: Pointer to a CFRunLoopSourceRef to return the newly created run loop event source.
49    ///
50    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
51    pub CreateDeviceAsyncEventSource:
52        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
53    /// Returns the CFRunLoopSourceRef for this IOService instance.
54    ///
55    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
56    ///
57    /// Returns: Returns the run loop source if one has been created, 0 otherwise.
58    pub GetDeviceAsyncEventSource:
59        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
60    /// Creates and registers a mach_port_t for asynchronous communications.
61    ///
62    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers
63    /// completion notifications on this mach port. After receiving a message on this port the
64    /// client is obliged to call the IOKitLib.h IODispatchCalloutFromMessage() function for
65    /// decoding the notification message.
66    ///
67    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
68    ///
69    /// Parameter `port`: Pointer to a mach_port_t to return the newly created port.
70    ///
71    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
72    pub CreateDeviceAsyncPort:
73        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
74    /// Returns the mach_port_t port for this IOService instance.
75    ///
76    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
77    ///
78    /// Returns: Returns the port if one exists, 0 otherwise.
79    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
80    /// Opens the IOUSBDevice for exclusive access.
81    ///
82    /// Before the client can issue commands that change the state of the device, it
83    /// must have succeeded in opening the device. This establishes an exclusive link
84    /// between the client's task and the actual device.
85    ///
86    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
87    ///
88    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already,
89    /// kIOReturnError if the connection with the kernel cannot be established or kIOReturnSuccess if successful.
90    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
91    /// Closes the task's connection to the IOUSBDevice.
92    ///
93    /// Releases the client's exclusive access to the IOUSBDevice.
94    ///
95    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
96    ///
97    /// Returns: Returns kIOReturnSuccess if successful, some other mach error if the connection is no longer valid.
98    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
99    /// Returns the USB Class (bDeviceClass) of the device.
100    ///
101    /// The device does not have to be open to use this function.
102    ///
103    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
104    ///
105    /// Parameter `devClass`: Pointer to UInt8 to hold the device Class.
106    ///
107    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
108    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
109    /// Returns the USB Subclass (bDeviceSubClass) of the device.
110    ///
111    /// The device does not have to be open to use this function.
112    ///
113    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
114    ///
115    /// Parameter `devSubClass`: Pointer to UInt8 to hold the device Subclass.
116    ///
117    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
118    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
119    /// Returns the USB Protocol (bDeviceProtocol) of the interface.
120    ///
121    /// The device does not have to be open to use this function.
122    ///
123    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
124    ///
125    /// Parameter `devProtocol`: Pointer to UInt8 to hold the device Protocol.
126    ///
127    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
128    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
129    /// Returns the USB Vendor ID (idVendor) of the device.
130    ///
131    /// The device does not have to be open to use this function.
132    ///
133    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
134    ///
135    /// Parameter `devVendor`: Pointer to UInt16 to hold the vendorID.
136    ///
137    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
138    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
139    /// Returns the USB Product ID (idProduct) of the device.
140    ///
141    /// The device does not have to be open to use this function.
142    ///
143    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
144    ///
145    /// Parameter `devProduct`: Pointer to UInt16 to hold the ProductID.
146    ///
147    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
148    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
149    /// Returns the Device Release Number (bcdDevice) of the device.
150    ///
151    /// The device does not have to be open to use this function.
152    ///
153    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
154    ///
155    /// Parameter `devRelNum`: Pointer to UInt16 to hold the Device Release Number.
156    ///
157    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
158    pub GetDeviceReleaseNumber:
159        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
160    /// Returns the address of the device on its bus.
161    ///
162    /// The device does not have to be open to use this function.
163    ///
164    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
165    ///
166    /// Parameter `addr`: Pointer to USBDeviceAddress to hold the result.
167    ///
168    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
169    pub GetDeviceAddress:
170        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
171    /// Returns the power available to the device.
172    ///
173    /// The device does not have to be open to use this function.
174    ///
175    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
176    ///
177    /// Parameter `powerAvailable`: Pointer to UInt32 to hold the power available (in 2 mA increments).
178    ///
179    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
180    pub GetDeviceBusPowerAvailable:
181        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
182    /// Returns the speed of the device.
183    ///
184    /// The device does not have to be open to use this function.
185    ///
186    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
187    ///
188    /// Parameter `devSpeed`: Pointer to UInt8 to hold the speed (kUSBDeviceSpeedLow, kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh, or kUSBDeviceSpeedSuper).
189    ///
190    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
191    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
192    /// Returns the number of supported configurations in this device.
193    ///
194    /// The device does not have to be open to use this function.
195    ///
196    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
197    ///
198    /// Parameter `numConfig`: Pointer to UInt8 to hold the number of configurations.
199    ///
200    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
201    pub GetNumberOfConfigurations:
202        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
203    /// Returns the location ID.
204    ///
205    /// The location ID is a 32 bit number which is unique among all USB devices in the system, and
206    /// which will not change on a system reboot unless the topology of the bus itself changes. The
207    /// device does not have to be open to use this function.
208    ///
209    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
210    ///
211    /// Parameter `locationID`: Pointer to UInt32 to hold the location ID.
212    ///
213    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
214    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
215    /// Returns a pointer to a configuration descriptor for a given index.
216    ///
217    /// Note that this will point to the data as received from the USB bus and hence will be in USB bus
218    /// order (i.e. little endian).  The device does not have to be open to use this function.
219    ///
220    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
221    ///
222    /// Parameter `configIndex`: The index (zero based) of the desired config descriptor.
223    ///
224    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
225    pub GetConfigurationDescriptorPtr: Option<
226        unsafe extern "C-unwind" fn(
227            *mut c_void,
228            u8,
229            *mut IOUSBConfigurationDescriptorPtr,
230        ) -> IOReturn,
231    >,
232    /// Returns the currently selected configuration in the device.
233    ///
234    /// The device does not have to be open to use this function.
235    ///
236    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
237    ///
238    /// Parameter `configNum`: Pointer to UInt8 to hold the configuration value.
239    ///
240    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
241    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
242    /// Sets the configuration in the device.
243    ///
244    /// Note that setting the configuration causes any existing IOUSBInterface objects attached to the
245    /// IOUSBDevice to be destroyed, and all of the interfaces in the new configuration to be instantiated
246    /// as new IOUSBInterface objects.  The device must be open to use this function.
247    ///
248    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
249    ///
250    /// Parameter `configNum`: The value of the desired configuration (from IOUSBConfigurationDescriptor.bConfigurationValue).
251    ///
252    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
253    /// or kIOReturnNotOpen if the device is not open for exclusive access.
254    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
255    /// Gets the current frame number of the bus to which the device is attached.
256    ///
257    /// The device does not have to be open to use this function.
258    ///
259    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
260    ///
261    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
262    ///
263    /// Parameter `atTime`: Pointer to a returned AbsoluteTime, which is the system time ("wall time") when the frame number register was read. This
264    /// system time could be the time at the beginning, middle, or end of the given frame.
265    ///
266    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
267    pub GetBusFrameNumber:
268        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
269    /// Tells the IOUSBFamily to issue a reset to the device.
270    ///
271    /// It will not reenumerate the device, which means that the cached device descriptor values will not
272    /// be updated after the reset. (If you want the IOUSBFamily to reload the cached values, use the call
273    /// USBDeviceReEnumerate). Prior to version 1.8.5 of the IOUSBFamily, this call also sent a message to
274    /// all clients of the IOUSBDevice (IOUSBInterfaces and their drivers).  The device must be open to use
275    /// this function.
276    ///
277    /// This behavior was eliminated in version 1.8.5 of the IOUSBFamily.
278    ///
279    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
280    ///
281    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
282    /// or kIOReturnNotOpen if the device is not open for exclusive access.
283    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
284    /// Sends a USB request on the default control pipe.
285    ///
286    /// The device does not have to be open to use this function, but standard requests that change the state of the device
287    /// may require that the device is opened first.
288    ///
289    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
290    ///
291    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
292    ///
293    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
294    /// kIOReturnAborted if the thread is interrupted before the call completes,
295    /// or kIOReturnNotOpen if the device is not open for exclusive access.
296    pub DeviceRequest:
297        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
298    /// Sends an asynchronous USB request on the default control pipe.
299    ///
300    /// The device does not have to be open to use this function, but standard requests that change the state of the device
301    /// may require that the device is opened first.
302    ///
303    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
304    ///
305    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
306    ///
307    /// 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.
308    ///
309    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
310    ///
311    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
312    /// kIOReturnNotOpen if the device is not open for exclusive access, or kIOUSBNoAsyncPortErr if no Async
313    /// port has been created for this interface.
314    pub DeviceRequestAsync: Option<
315        unsafe extern "C-unwind" fn(
316            *mut c_void,
317            *mut IOUSBDevRequest,
318            IOAsyncCallback1,
319            *mut c_void,
320        ) -> IOReturn,
321    >,
322    /// Creates an iterator to iterate over some or all of the interfaces of a device.
323    ///
324    /// The device does not have to be open to use this function.
325    ///
326    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
327    ///
328    /// Parameter `req`: Pointer an IOUSBFindInterfaceRequest structure describing the desired interfaces.
329    ///
330    /// Parameter `iter`: Pointer to a an io_iterator_t to contain the new iterator.
331    ///
332    /// Returns: Returns kIOReturnSuccess if successful or kIOReturnNoDevice if there is no connection to an IOService.
333    pub CreateInterfaceIterator: Option<
334        unsafe extern "C-unwind" fn(
335            *mut c_void,
336            *mut IOUSBFindInterfaceRequest,
337            *mut io_iterator_t,
338        ) -> IOReturn,
339    >,
340}
341
342#[cfg(all(
343    feature = "AppleUSBDefinitions",
344    feature = "USB",
345    feature = "libc",
346    feature = "objc2"
347))]
348unsafe impl Encode for IOUSBDeviceStruct100 {
349    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct100", &[
350        <*mut c_void>::ENCODING,
351        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
352        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
353        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
354        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
355        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
356        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
357        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
358        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
359        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
360        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> 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 u16,) -> 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 USBDeviceAddress,) -> IOReturn>>::ENCODING,
367        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
368        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> 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 u32,) -> IOReturn>>::ENCODING,
371        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
372        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
373        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
374        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
375        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
376        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
377        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
378        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
379    ]);
380}
381
382#[cfg(all(
383    feature = "AppleUSBDefinitions",
384    feature = "USB",
385    feature = "libc",
386    feature = "objc2"
387))]
388unsafe impl RefEncode for IOUSBDeviceStruct100 {
389    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
390}
391
392/// The object you use to access USB devices from user space, returned by all versions of the IOUSBFamily
393/// currently shipping.
394///
395/// The functions listed here will work with any version of the IOUSBDeviceInterface, including
396/// the one shipped with Mac OS X version 10.0.
397///
398/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface100?language=objc)
399#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
400pub type IOUSBDeviceInterface100 = IOUSBDeviceStruct100;
401
402/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
403/// 1.8.2 and above.
404///
405/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface and
406/// some new functions that are available on Mac OS X version 10.0.4 and later.
407/// Super: IOUSBDeviceInterface
408///
409/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct182?language=objc)
410#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
411#[repr(C)]
412#[derive(Clone, Copy, Debug, PartialEq)]
413pub struct IOUSBDeviceStruct182 {
414    pub(crate) _reserved: *mut c_void,
415    pub QueryInterface:
416        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
417    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
418    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
419    pub CreateDeviceAsyncEventSource:
420        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
421    pub GetDeviceAsyncEventSource:
422        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
423    pub CreateDeviceAsyncPort:
424        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
425    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
426    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
427    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
428    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
429    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
430    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
431    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
432    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
433    pub GetDeviceReleaseNumber:
434        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
435    pub GetDeviceAddress:
436        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
437    pub GetDeviceBusPowerAvailable:
438        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
439    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
440    pub GetNumberOfConfigurations:
441        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
442    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
443    pub GetConfigurationDescriptorPtr: Option<
444        unsafe extern "C-unwind" fn(
445            *mut c_void,
446            u8,
447            *mut IOUSBConfigurationDescriptorPtr,
448        ) -> IOReturn,
449    >,
450    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
451    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
452    pub GetBusFrameNumber:
453        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
454    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
455    pub DeviceRequest:
456        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
457    pub DeviceRequestAsync: Option<
458        unsafe extern "C-unwind" fn(
459            *mut c_void,
460            *mut IOUSBDevRequest,
461            IOAsyncCallback1,
462            *mut c_void,
463        ) -> IOReturn,
464    >,
465    pub CreateInterfaceIterator: Option<
466        unsafe extern "C-unwind" fn(
467            *mut c_void,
468            *mut IOUSBFindInterfaceRequest,
469            *mut io_iterator_t,
470        ) -> IOReturn,
471    >,
472    /// Opens the IOUSBDevice for exclusive access.
473    ///
474    /// This function opens the IOUSBDevice for exclusive access. If another client
475    /// has the device opened, an attempt is made to get that client to close it before
476    /// returning.  Before the client can issue commands that change the state of the device,
477    /// it must have succeeded in opening the device. This establishes an exclusive
478    /// link between the client's task and the actual device.
479    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
480    ///
481    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
482    ///
483    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already and refuses
484    /// to close it, kIOReturnError if the connection with the kernel can not be established or kIOReturnSuccess if successful.
485    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
486    /// Sends a USB request on the default control pipe.
487    ///
488    /// 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.
489    ///
490    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
491    ///
492    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
493    ///
494    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
495    ///
496    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
497    /// kIOReturnAborted if the thread is interrupted before the call completes,
498    /// or kIOReturnNotOpen if the device is not open for exclusive access.
499    pub DeviceRequestTO:
500        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
501    /// Sends an asynchronous USB request on the default control pipe.
502    ///
503    /// 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.
504    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
505    ///
506    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
507    ///
508    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
509    ///
510    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred
511    /// in the DeviceRequest. A message addressed to this callback is posted to the
512    /// Async port upon completion.
513    ///
514    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
515    ///
516    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
517    /// kIOReturnNotOpen if the device is not open for exclusive access, orkIOUSBNoAsyncPortErr if no Async
518    /// port has been created for this interface.
519    pub DeviceRequestAsyncTO: Option<
520        unsafe extern "C-unwind" fn(
521            *mut c_void,
522            *mut IOUSBDevRequestTO,
523            IOAsyncCallback1,
524            *mut c_void,
525        ) -> IOReturn,
526    >,
527    /// Tells the USB Family to either suspend or resume the port to which a device is attached.
528    ///
529    /// The device must be open to use this function.
530    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
531    ///
532    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
533    ///
534    /// Parameter `suspend`: TRUE to cause the port to be suspended, FALSE to cause it to be resumed.
535    ///
536    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
537    /// or kIOReturnNotOpen if the device is not open for exclusive access.
538    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
539    /// Aborts a transaction on the default control pipe.
540    ///
541    /// The device does not have to be open to use this function.
542    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
543    ///
544    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
545    ///
546    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
547    /// or kIOReturnNotOpen if the device is not open for exclusive access.
548    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
549    /// Returns the manufacturer string index in the device descriptor.
550    ///
551    /// The device does not have to be open to use this function.
552    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
553    ///
554    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
555    ///
556    /// Parameter `msi`: Pointer to UInt8 to hold the string index.
557    ///
558    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
559    pub USBGetManufacturerStringIndex:
560        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
561    /// Returns the product string index in the device descriptor.
562    ///
563    /// The device does not have to be open to use this function.
564    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
565    ///
566    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
567    ///
568    /// Parameter `psi`: Pointer to UInt8 to hold the string index.
569    ///
570    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
571    pub USBGetProductStringIndex:
572        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
573    /// Returns the serial number string index in the device descriptor.
574    ///
575    /// The device does not have to be open to use this function.
576    /// Availability: This function is only available with IOUSBDeviceInterface182 and above.
577    ///
578    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
579    ///
580    /// Parameter `snsi`: Pointer to UInt8 to hold the string index.
581    ///
582    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
583    pub USBGetSerialNumberStringIndex:
584        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
585}
586
587#[cfg(all(
588    feature = "AppleUSBDefinitions",
589    feature = "USB",
590    feature = "libc",
591    feature = "objc2"
592))]
593unsafe impl Encode for IOUSBDeviceStruct182 {
594    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct182", &[
595        <*mut c_void>::ENCODING,
596        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
597        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
598        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
599        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
600        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
601        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
602        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
603        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
604        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
605        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
606        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> 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 u16,) -> IOReturn>>::ENCODING,
609        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> 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 USBDeviceAddress,) -> IOReturn>>::ENCODING,
612        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
613        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
614        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
615        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
616        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
617        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
620        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
621        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
622        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
623        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
624        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
625        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
626        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
627        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
628        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
630        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
631        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
632    ]);
633}
634
635#[cfg(all(
636    feature = "AppleUSBDefinitions",
637    feature = "USB",
638    feature = "libc",
639    feature = "objc2"
640))]
641unsafe impl RefEncode for IOUSBDeviceStruct182 {
642    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
643}
644
645/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
646/// 1.8.2 and above.
647///
648/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface and
649/// some new functions that are available on Mac OS X version 10.0.4 and later.
650/// Super: IOUSBDeviceInterface
651///
652/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface182?language=objc)
653#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
654pub type IOUSBDeviceInterface182 = IOUSBDeviceStruct182;
655
656/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
657/// 10.8.7 and above.
658///
659/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
660/// IOUSBDeviceInterface182, and some new functions that are available on Mac OS X version 10.1.2 and later.
661/// Super: IOUSBDeviceInterface182
662///
663/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct187?language=objc)
664#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
665#[repr(C)]
666#[derive(Clone, Copy, Debug, PartialEq)]
667pub struct IOUSBDeviceStruct187 {
668    pub(crate) _reserved: *mut c_void,
669    pub QueryInterface:
670        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
671    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
672    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
673    pub CreateDeviceAsyncEventSource:
674        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
675    pub GetDeviceAsyncEventSource:
676        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
677    pub CreateDeviceAsyncPort:
678        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
679    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
680    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
681    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
682    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
683    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
684    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
685    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
686    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
687    pub GetDeviceReleaseNumber:
688        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
689    pub GetDeviceAddress:
690        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
691    pub GetDeviceBusPowerAvailable:
692        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
693    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
694    pub GetNumberOfConfigurations:
695        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
696    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
697    pub GetConfigurationDescriptorPtr: Option<
698        unsafe extern "C-unwind" fn(
699            *mut c_void,
700            u8,
701            *mut IOUSBConfigurationDescriptorPtr,
702        ) -> IOReturn,
703    >,
704    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
705    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
706    pub GetBusFrameNumber:
707        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
708    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
709    pub DeviceRequest:
710        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
711    pub DeviceRequestAsync: Option<
712        unsafe extern "C-unwind" fn(
713            *mut c_void,
714            *mut IOUSBDevRequest,
715            IOAsyncCallback1,
716            *mut c_void,
717        ) -> IOReturn,
718    >,
719    pub CreateInterfaceIterator: Option<
720        unsafe extern "C-unwind" fn(
721            *mut c_void,
722            *mut IOUSBFindInterfaceRequest,
723            *mut io_iterator_t,
724        ) -> IOReturn,
725    >,
726    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
727    pub DeviceRequestTO:
728        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
729    pub DeviceRequestAsyncTO: Option<
730        unsafe extern "C-unwind" fn(
731            *mut c_void,
732            *mut IOUSBDevRequestTO,
733            IOAsyncCallback1,
734            *mut c_void,
735        ) -> IOReturn,
736    >,
737    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
738    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
739    pub USBGetManufacturerStringIndex:
740        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
741    pub USBGetProductStringIndex:
742        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
743    pub USBGetSerialNumberStringIndex:
744        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
745    /// Tells the IOUSBFamily to reenumerate the device.
746    ///
747    /// This function will send a terminate message to all clients of the IOUSBDevice (such as
748    /// IOUSBInterfaces and their drivers, as well as the current User Client), emulating an unplug
749    /// of the device. The IOUSBFamily will then enumerate the device as if it had just
750    /// been plugged in. This call should be used by clients wishing to take advantage
751    /// of the Device Firmware Update Class specification.  The device must be open to use this function, except when you are passing the kUSBReEnumerateCaptureDeviceBit or
752    /// 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
753    /// the IOKit's IOServiceAuthorize() APIs or (2) run with root privileges.
754    /// Availability: This function is only available with IOUSBDeviceInterface187 and above.
755    ///
756    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
757    ///
758    /// Parameter `options`: A UInt32 with a bit mask of options.  See USB.h and the USBReEnumerateOptions enum.  If the kUSBReEnumerateCaptureDeviceBit is used
759    /// 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
760    /// 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
761    /// 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
762    /// be returned to the OS and the driver for that device to be reloaded.
763    ///
764    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
765    /// or kIOReturnNotOpen if the device is not open for exclusive access.
766    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
767}
768
769#[cfg(all(
770    feature = "AppleUSBDefinitions",
771    feature = "USB",
772    feature = "libc",
773    feature = "objc2"
774))]
775unsafe impl Encode for IOUSBDeviceStruct187 {
776    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct187", &[
777        <*mut c_void>::ENCODING,
778        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
779        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
780        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
781        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
782        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
783        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
784        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
785        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
786        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
787        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
788        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
789        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
790        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
791        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
792        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
793        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
794        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
795        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
796        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> 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,u8,*mut IOUSBConfigurationDescriptorPtr,) -> 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,u8,) -> IOReturn>>::ENCODING,
801        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
802        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
803        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
804        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
805        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
806        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
807        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
808        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
809        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
810        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
811        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
812        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
813        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
814        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
815    ]);
816}
817
818#[cfg(all(
819    feature = "AppleUSBDefinitions",
820    feature = "USB",
821    feature = "libc",
822    feature = "objc2"
823))]
824unsafe impl RefEncode for IOUSBDeviceStruct187 {
825    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
826}
827
828/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
829/// 10.8.7 and above.
830///
831/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
832/// IOUSBDeviceInterface182, and some new functions that are available on Mac OS X version 10.1.2 and later.
833/// Super: IOUSBDeviceInterface182
834///
835/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface187?language=objc)
836#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
837pub type IOUSBDeviceInterface187 = IOUSBDeviceStruct187;
838
839/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
840/// 1.9.7 and above.
841///
842/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
843/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, and some new functions that are available
844/// on Mac OS X version 10.2.3 and later.
845/// Super: IOUSBDeviceInterface187
846///
847/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct197?language=objc)
848#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
849#[repr(C)]
850#[derive(Clone, Copy, Debug, PartialEq)]
851pub struct IOUSBDeviceStruct197 {
852    pub(crate) _reserved: *mut c_void,
853    pub QueryInterface:
854        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
855    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
856    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
857    pub CreateDeviceAsyncEventSource:
858        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
859    pub GetDeviceAsyncEventSource:
860        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
861    pub CreateDeviceAsyncPort:
862        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
863    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
864    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
865    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
866    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
867    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
868    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
869    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
870    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
871    pub GetDeviceReleaseNumber:
872        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
873    pub GetDeviceAddress:
874        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
875    pub GetDeviceBusPowerAvailable:
876        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
877    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
878    pub GetNumberOfConfigurations:
879        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
880    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
881    pub GetConfigurationDescriptorPtr: Option<
882        unsafe extern "C-unwind" fn(
883            *mut c_void,
884            u8,
885            *mut IOUSBConfigurationDescriptorPtr,
886        ) -> IOReturn,
887    >,
888    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
889    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
890    pub GetBusFrameNumber:
891        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
892    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
893    pub DeviceRequest:
894        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
895    pub DeviceRequestAsync: Option<
896        unsafe extern "C-unwind" fn(
897            *mut c_void,
898            *mut IOUSBDevRequest,
899            IOAsyncCallback1,
900            *mut c_void,
901        ) -> IOReturn,
902    >,
903    pub CreateInterfaceIterator: Option<
904        unsafe extern "C-unwind" fn(
905            *mut c_void,
906            *mut IOUSBFindInterfaceRequest,
907            *mut io_iterator_t,
908        ) -> IOReturn,
909    >,
910    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
911    pub DeviceRequestTO:
912        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
913    pub DeviceRequestAsyncTO: Option<
914        unsafe extern "C-unwind" fn(
915            *mut c_void,
916            *mut IOUSBDevRequestTO,
917            IOAsyncCallback1,
918            *mut c_void,
919        ) -> IOReturn,
920    >,
921    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
922    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
923    pub USBGetManufacturerStringIndex:
924        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
925    pub USBGetProductStringIndex:
926        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
927    pub USBGetSerialNumberStringIndex:
928        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
929    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
930    /// Gets the current micro frame number of the bus to which the device is attached.
931    ///
932    /// The device does not have to be open to use this function.
933    /// Availability: This function is only available with IOUSBDeviceInterface197 and above.
934    ///
935    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
936    ///
937    /// Parameter `microFrame`: Pointer to UInt64 to hold the microframe number.
938    ///
939    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus
940    /// frame number was acquired.
941    ///
942    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
943    pub GetBusMicroFrameNumber:
944        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
945    /// Returns the version of the IOUSBLib and the version of the IOUSBFamily.
946    ///
947    /// The device does not have to be open to use this function.
948    /// Availability: This function is only available with IOUSBDeviceInterface197 and above.
949    ///
950    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
951    ///
952    /// Parameter `ioUSBLibVersion`: Pointer to a NumVersion structure that on return will contain the version of
953    /// the IOUSBLib.
954    ///
955    /// Parameter `usbFamilyVersion`: Pointer to a NumVersion structure that on return will contain the version of
956    /// the IOUSBFamily.
957    ///
958    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
959    pub GetIOUSBLibVersion: Option<
960        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
961    >,
962}
963
964#[cfg(all(
965    feature = "AppleUSBDefinitions",
966    feature = "USB",
967    feature = "libc",
968    feature = "objc2"
969))]
970unsafe impl Encode for IOUSBDeviceStruct197 {
971    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct197", &[
972        <*mut c_void>::ENCODING,
973        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
974        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
975        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
976        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
977        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
978        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
979        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
980        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
981        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
982        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
983        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
984        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
985        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
986        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
987        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
988        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
989        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
990        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
991        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
992        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
993        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> 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,u8,) -> IOReturn>>::ENCODING,
996        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
997        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
998        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
999        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1000        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> 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 IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1003        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1004        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> 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 u8,) -> IOReturn>>::ENCODING,
1007        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1008        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1009        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1010        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1011        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1012    ]);
1013}
1014
1015#[cfg(all(
1016    feature = "AppleUSBDefinitions",
1017    feature = "USB",
1018    feature = "libc",
1019    feature = "objc2"
1020))]
1021unsafe impl RefEncode for IOUSBDeviceStruct197 {
1022    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1023}
1024
1025/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1026/// 1.9.7 and above.
1027///
1028/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1029/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, and some new functions that are available
1030/// on Mac OS X version 10.2.3 and later.
1031/// Super: IOUSBDeviceInterface187
1032///
1033/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface197?language=objc)
1034#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1035pub type IOUSBDeviceInterface197 = IOUSBDeviceStruct197;
1036
1037/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1038/// 2.4.5 and above.
1039///
1040/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1041/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, and some new functions that are available
1042/// on Mac OS X version 10.2.3 and later.
1043/// Super: IOUSBDeviceInterface197
1044///
1045/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct245?language=objc)
1046#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1047#[repr(C)]
1048#[derive(Clone, Copy, Debug, PartialEq)]
1049pub struct IOUSBDeviceStruct245 {
1050    pub(crate) _reserved: *mut c_void,
1051    pub QueryInterface:
1052        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1053    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1054    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1055    pub CreateDeviceAsyncEventSource:
1056        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1057    pub GetDeviceAsyncEventSource:
1058        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1059    pub CreateDeviceAsyncPort:
1060        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1061    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1062    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1063    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1064    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1065    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1066    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1067    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1068    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1069    pub GetDeviceReleaseNumber:
1070        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1071    pub GetDeviceAddress:
1072        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1073    pub GetDeviceBusPowerAvailable:
1074        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1075    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1076    pub GetNumberOfConfigurations:
1077        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1078    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1079    pub GetConfigurationDescriptorPtr: Option<
1080        unsafe extern "C-unwind" fn(
1081            *mut c_void,
1082            u8,
1083            *mut IOUSBConfigurationDescriptorPtr,
1084        ) -> IOReturn,
1085    >,
1086    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1087    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1088    pub GetBusFrameNumber:
1089        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1090    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1091    pub DeviceRequest:
1092        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1093    pub DeviceRequestAsync: Option<
1094        unsafe extern "C-unwind" fn(
1095            *mut c_void,
1096            *mut IOUSBDevRequest,
1097            IOAsyncCallback1,
1098            *mut c_void,
1099        ) -> IOReturn,
1100    >,
1101    pub CreateInterfaceIterator: Option<
1102        unsafe extern "C-unwind" fn(
1103            *mut c_void,
1104            *mut IOUSBFindInterfaceRequest,
1105            *mut io_iterator_t,
1106        ) -> IOReturn,
1107    >,
1108    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1109    pub DeviceRequestTO:
1110        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1111    pub DeviceRequestAsyncTO: Option<
1112        unsafe extern "C-unwind" fn(
1113            *mut c_void,
1114            *mut IOUSBDevRequestTO,
1115            IOAsyncCallback1,
1116            *mut c_void,
1117        ) -> IOReturn,
1118    >,
1119    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1120    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1121    pub USBGetManufacturerStringIndex:
1122        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1123    pub USBGetProductStringIndex:
1124        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1125    pub USBGetSerialNumberStringIndex:
1126        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1127    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1128    pub GetBusMicroFrameNumber:
1129        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1130    pub GetIOUSBLibVersion: Option<
1131        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1132    >,
1133}
1134
1135#[cfg(all(
1136    feature = "AppleUSBDefinitions",
1137    feature = "USB",
1138    feature = "libc",
1139    feature = "objc2"
1140))]
1141unsafe impl Encode for IOUSBDeviceStruct245 {
1142    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct245", &[
1143        <*mut c_void>::ENCODING,
1144        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1145        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1146        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1147        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1148        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1149        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1150        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1151        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1152        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1153        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1154        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1155        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1156        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1157        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1158        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1159        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1160        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1161        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1162        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1163        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1164        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1165        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1166        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1167        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1168        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1169        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1170        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1171        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1172        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1173        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1174        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1175        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1176        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1177        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1178        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1179        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1180        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1181        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1182        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1183    ]);
1184}
1185
1186#[cfg(all(
1187    feature = "AppleUSBDefinitions",
1188    feature = "USB",
1189    feature = "libc",
1190    feature = "objc2"
1191))]
1192unsafe impl RefEncode for IOUSBDeviceStruct245 {
1193    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1194}
1195
1196/// The object you use to access USB devices from user space, returned by the IOUSBFamily version
1197/// 2.4.5 and above.
1198///
1199/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1200/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, and some new functions that are available
1201/// on Mac OS X version 10.2.3 and later.
1202/// Super: IOUSBDeviceInterface197
1203///
1204/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface245?language=objc)
1205#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1206pub type IOUSBDeviceInterface245 = IOUSBDeviceStruct245;
1207
1208/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.0.0 and above.
1209///
1210/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1211/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245,
1212/// and some new functions that are available on Mac OS X version 10.5 and later.
1213/// Super: IOUSBDeviceInterface245
1214///
1215/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct300?language=objc)
1216#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1217#[repr(C)]
1218#[derive(Clone, Copy, Debug, PartialEq)]
1219pub struct IOUSBDeviceStruct300 {
1220    pub(crate) _reserved: *mut c_void,
1221    pub QueryInterface:
1222        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1223    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1224    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1225    pub CreateDeviceAsyncEventSource:
1226        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1227    pub GetDeviceAsyncEventSource:
1228        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1229    pub CreateDeviceAsyncPort:
1230        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1231    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1232    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1233    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1234    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1235    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1236    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1237    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1238    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1239    pub GetDeviceReleaseNumber:
1240        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1241    pub GetDeviceAddress:
1242        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1243    pub GetDeviceBusPowerAvailable:
1244        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1245    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1246    pub GetNumberOfConfigurations:
1247        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1248    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1249    pub GetConfigurationDescriptorPtr: Option<
1250        unsafe extern "C-unwind" fn(
1251            *mut c_void,
1252            u8,
1253            *mut IOUSBConfigurationDescriptorPtr,
1254        ) -> IOReturn,
1255    >,
1256    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1257    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1258    pub GetBusFrameNumber:
1259        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1260    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1261    pub DeviceRequest:
1262        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1263    pub DeviceRequestAsync: Option<
1264        unsafe extern "C-unwind" fn(
1265            *mut c_void,
1266            *mut IOUSBDevRequest,
1267            IOAsyncCallback1,
1268            *mut c_void,
1269        ) -> IOReturn,
1270    >,
1271    pub CreateInterfaceIterator: Option<
1272        unsafe extern "C-unwind" fn(
1273            *mut c_void,
1274            *mut IOUSBFindInterfaceRequest,
1275            *mut io_iterator_t,
1276        ) -> IOReturn,
1277    >,
1278    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1279    pub DeviceRequestTO:
1280        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1281    pub DeviceRequestAsyncTO: Option<
1282        unsafe extern "C-unwind" fn(
1283            *mut c_void,
1284            *mut IOUSBDevRequestTO,
1285            IOAsyncCallback1,
1286            *mut c_void,
1287        ) -> IOReturn,
1288    >,
1289    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1290    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1291    pub USBGetManufacturerStringIndex:
1292        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1293    pub USBGetProductStringIndex:
1294        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1295    pub USBGetSerialNumberStringIndex:
1296        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1297    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1298    pub GetBusMicroFrameNumber:
1299        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1300    pub GetIOUSBLibVersion: Option<
1301        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1302    >,
1303    /// 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
1304    ///
1305    /// The device does not have to be open to use this function.
1306    /// Availability: This function is only available with IOUSBDeviceInterface300 and above.
1307    ///
1308    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1309    ///
1310    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
1311    ///
1312    /// 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.
1313    ///
1314    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1315    pub GetBusFrameNumberWithTime:
1316        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1317}
1318
1319#[cfg(all(
1320    feature = "AppleUSBDefinitions",
1321    feature = "USB",
1322    feature = "libc",
1323    feature = "objc2"
1324))]
1325unsafe impl Encode for IOUSBDeviceStruct300 {
1326    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct300", &[
1327        <*mut c_void>::ENCODING,
1328        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1329        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1330        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1331        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1332        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1333        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1334        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1335        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1336        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1337        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1338        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1339        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1340        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1341        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1342        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1343        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1344        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> 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 u8,) -> IOReturn>>::ENCODING,
1347        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1348        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1349        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1350        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1351        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1352        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1353        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1354        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1355        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1356        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1357        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1358        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1359        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1360        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1361        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1362        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1363        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1364        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1365        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1366        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1367        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1368    ]);
1369}
1370
1371#[cfg(all(
1372    feature = "AppleUSBDefinitions",
1373    feature = "USB",
1374    feature = "libc",
1375    feature = "objc2"
1376))]
1377unsafe impl RefEncode for IOUSBDeviceStruct300 {
1378    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1379}
1380
1381/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.0.0 and above.
1382///
1383/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1384/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245,
1385/// and some new functions that are available on Mac OS X version 10.5 and later.
1386/// Super: IOUSBDeviceInterface245
1387///
1388/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface300?language=objc)
1389#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1390pub type IOUSBDeviceInterface300 = IOUSBDeviceStruct300;
1391
1392/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
1393///
1394/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1395/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300
1396/// and some new functions that are available on Mac OS X version 10.5.4 and later.
1397/// Super: IOUSBDeviceInterface300
1398///
1399/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct320?language=objc)
1400#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1401#[repr(C)]
1402#[derive(Clone, Copy, Debug, PartialEq)]
1403pub struct IOUSBDeviceStruct320 {
1404    pub(crate) _reserved: *mut c_void,
1405    pub QueryInterface:
1406        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1407    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1408    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1409    pub CreateDeviceAsyncEventSource:
1410        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1411    pub GetDeviceAsyncEventSource:
1412        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1413    pub CreateDeviceAsyncPort:
1414        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1415    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1416    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1417    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1418    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1419    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1420    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1421    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1422    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1423    pub GetDeviceReleaseNumber:
1424        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1425    pub GetDeviceAddress:
1426        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1427    pub GetDeviceBusPowerAvailable:
1428        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1429    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1430    pub GetNumberOfConfigurations:
1431        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1432    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1433    pub GetConfigurationDescriptorPtr: Option<
1434        unsafe extern "C-unwind" fn(
1435            *mut c_void,
1436            u8,
1437            *mut IOUSBConfigurationDescriptorPtr,
1438        ) -> IOReturn,
1439    >,
1440    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1441    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1442    pub GetBusFrameNumber:
1443        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1444    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1445    pub DeviceRequest:
1446        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1447    pub DeviceRequestAsync: Option<
1448        unsafe extern "C-unwind" fn(
1449            *mut c_void,
1450            *mut IOUSBDevRequest,
1451            IOAsyncCallback1,
1452            *mut c_void,
1453        ) -> IOReturn,
1454    >,
1455    pub CreateInterfaceIterator: Option<
1456        unsafe extern "C-unwind" fn(
1457            *mut c_void,
1458            *mut IOUSBFindInterfaceRequest,
1459            *mut io_iterator_t,
1460        ) -> IOReturn,
1461    >,
1462    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1463    pub DeviceRequestTO:
1464        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1465    pub DeviceRequestAsyncTO: Option<
1466        unsafe extern "C-unwind" fn(
1467            *mut c_void,
1468            *mut IOUSBDevRequestTO,
1469            IOAsyncCallback1,
1470            *mut c_void,
1471        ) -> IOReturn,
1472    >,
1473    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1474    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1475    pub USBGetManufacturerStringIndex:
1476        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1477    pub USBGetProductStringIndex:
1478        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1479    pub USBGetSerialNumberStringIndex:
1480        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1481    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1482    pub GetBusMicroFrameNumber:
1483        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1484    pub GetIOUSBLibVersion: Option<
1485        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1486    >,
1487    pub GetBusFrameNumberWithTime:
1488        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1489    /// Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state.
1490    ///
1491    /// The device does not have to be open to use this function.
1492    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1493    ///
1494    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1495    ///
1496    /// Parameter `info`: Pointer to a buffer that returns a bit field of information on the device (see the USBDeviceInformationBits in USB.h).
1497    ///
1498    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1499    pub GetUSBDeviceInformation:
1500        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1501    /// 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).
1502    ///
1503    /// The device has to be open to use this function.
1504    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1505    ///
1506    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1507    ///
1508    /// Parameter `type`: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1509    ///
1510    /// Parameter `requestedPower`: Amount of power desired, in mA
1511    ///
1512    /// Parameter `powerAvailable`: Amount of power that was reserved, in mA
1513    ///
1514    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
1515    pub RequestExtraPower:
1516        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1517    /// Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API.
1518    ///
1519    /// The device has to be open to use this function.
1520    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1521    ///
1522    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1523    ///
1524    /// Parameter `type`: Indicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1525    ///
1526    /// Parameter `powerReturned`: Amount of power to be returned, in mA.
1527    ///
1528    /// 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.
1529    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1530    /// Clients can use this API to ask how much extra power has already been reserved by this device.  Units are milliAmps (mA).
1531    ///
1532    /// The device has to be open to use this function.
1533    /// Availability: This function is only available with IOUSBDeviceInterface320 and above.
1534    ///
1535    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1536    ///
1537    /// Parameter `type`: Indicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
1538    ///
1539    /// Parameter `powerAllocated`: Amount of power to be returned, in mA.
1540    ///
1541    /// 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.
1542    pub GetExtraPowerAllocated:
1543        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1544}
1545
1546#[cfg(all(
1547    feature = "AppleUSBDefinitions",
1548    feature = "USB",
1549    feature = "libc",
1550    feature = "objc2"
1551))]
1552unsafe impl Encode for IOUSBDeviceStruct320 {
1553    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct320", &[
1554        <*mut c_void>::ENCODING,
1555        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1556        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1557        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1558        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1559        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1560        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1561        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1562        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1563        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1564        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1565        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1566        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1567        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1568        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1569        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1570        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1571        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> 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 u32,) -> IOReturn>>::ENCODING,
1575        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1576        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1577        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1578        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1579        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1580        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1581        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1582        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1583        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1584        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1585        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1586        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1587        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1588        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1589        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1590        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1591        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1592        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1593        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1594        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1595        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1596        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1597        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1598        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1599    ]);
1600}
1601
1602#[cfg(all(
1603    feature = "AppleUSBDefinitions",
1604    feature = "USB",
1605    feature = "libc",
1606    feature = "objc2"
1607))]
1608unsafe impl RefEncode for IOUSBDeviceStruct320 {
1609    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1610}
1611
1612/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
1613///
1614/// The functions listed here include all of the functions defined for the IOUSBDeviceInterface,
1615/// IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300
1616/// and some new functions that are available on Mac OS X version 10.5.4 and later.
1617/// Super: IOUSBDeviceInterface300
1618///
1619/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface320?language=objc)
1620#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1621pub type IOUSBDeviceInterface320 = IOUSBDeviceStruct320;
1622
1623/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 4.0.0 and above.
1624///
1625/// This object is functionally identical to IOUSBDeviceInterface320 on macOS, and includes some new functions that are only available on iOS.
1626/// Super: IOUSBDeviceInterface320
1627///
1628/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct400?language=objc)
1629#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1630#[repr(C)]
1631#[derive(Clone, Copy, Debug, PartialEq)]
1632pub struct IOUSBDeviceStruct400 {
1633    pub(crate) _reserved: *mut c_void,
1634    pub QueryInterface:
1635        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1636    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1637    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1638    pub CreateDeviceAsyncEventSource:
1639        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1640    pub GetDeviceAsyncEventSource:
1641        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1642    pub CreateDeviceAsyncPort:
1643        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1644    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1645    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1646    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1647    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1648    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1649    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1650    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1651    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1652    pub GetDeviceReleaseNumber:
1653        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1654    pub GetDeviceAddress:
1655        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1656    pub GetDeviceBusPowerAvailable:
1657        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1658    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1659    pub GetNumberOfConfigurations:
1660        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1661    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1662    pub GetConfigurationDescriptorPtr: Option<
1663        unsafe extern "C-unwind" fn(
1664            *mut c_void,
1665            u8,
1666            *mut IOUSBConfigurationDescriptorPtr,
1667        ) -> IOReturn,
1668    >,
1669    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1670    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1671    pub GetBusFrameNumber:
1672        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1673    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1674    pub DeviceRequest:
1675        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1676    pub DeviceRequestAsync: Option<
1677        unsafe extern "C-unwind" fn(
1678            *mut c_void,
1679            *mut IOUSBDevRequest,
1680            IOAsyncCallback1,
1681            *mut c_void,
1682        ) -> IOReturn,
1683    >,
1684    pub CreateInterfaceIterator: Option<
1685        unsafe extern "C-unwind" fn(
1686            *mut c_void,
1687            *mut IOUSBFindInterfaceRequest,
1688            *mut io_iterator_t,
1689        ) -> IOReturn,
1690    >,
1691    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1692    pub DeviceRequestTO:
1693        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1694    pub DeviceRequestAsyncTO: Option<
1695        unsafe extern "C-unwind" fn(
1696            *mut c_void,
1697            *mut IOUSBDevRequestTO,
1698            IOAsyncCallback1,
1699            *mut c_void,
1700        ) -> IOReturn,
1701    >,
1702    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1703    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1704    pub USBGetManufacturerStringIndex:
1705        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1706    pub USBGetProductStringIndex:
1707        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1708    pub USBGetSerialNumberStringIndex:
1709        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1710    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1711    pub GetBusMicroFrameNumber:
1712        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1713    pub GetIOUSBLibVersion: Option<
1714        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1715    >,
1716    pub GetBusFrameNumberWithTime:
1717        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1718    pub GetUSBDeviceInformation:
1719        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1720    pub RequestExtraPower:
1721        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1722    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1723    pub GetExtraPowerAllocated:
1724        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1725}
1726
1727#[cfg(all(
1728    feature = "AppleUSBDefinitions",
1729    feature = "USB",
1730    feature = "libc",
1731    feature = "objc2"
1732))]
1733unsafe impl Encode for IOUSBDeviceStruct400 {
1734    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct400", &[
1735        <*mut c_void>::ENCODING,
1736        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1737        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1738        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1739        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1740        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1741        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1742        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1743        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1744        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1745        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1746        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1747        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1748        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1749        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1750        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1751        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1752        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> 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 u32,) -> IOReturn>>::ENCODING,
1756        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1757        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1758        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1759        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1760        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1761        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1762        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1763        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1764        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1765        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1766        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1767        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> 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 u8,) -> IOReturn>>::ENCODING,
1770        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1771        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1772        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1773        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1774        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1775        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1776        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1777        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1778        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1779        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1780    ]);
1781}
1782
1783#[cfg(all(
1784    feature = "AppleUSBDefinitions",
1785    feature = "USB",
1786    feature = "libc",
1787    feature = "objc2"
1788))]
1789unsafe impl RefEncode for IOUSBDeviceStruct400 {
1790    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1791}
1792
1793/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 4.0.0 and above.
1794///
1795/// This object is functionally identical to IOUSBDeviceInterface320 on macOS, and includes some new functions that are only available on iOS.
1796/// Super: IOUSBDeviceInterface320
1797///
1798/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface400?language=objc)
1799#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1800pub type IOUSBDeviceInterface400 = IOUSBDeviceStruct400;
1801
1802/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 5.0.0 and above.
1803///
1804/// 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.
1805/// Super: IOUSBDeviceInterface400
1806///
1807/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct500?language=objc)
1808#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1809#[repr(C)]
1810#[derive(Clone, Copy, Debug, PartialEq)]
1811pub struct IOUSBDeviceStruct500 {
1812    pub(crate) _reserved: *mut c_void,
1813    pub QueryInterface:
1814        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
1815    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1816    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
1817    pub CreateDeviceAsyncEventSource:
1818        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
1819    pub GetDeviceAsyncEventSource:
1820        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
1821    pub CreateDeviceAsyncPort:
1822        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
1823    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
1824    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1825    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1826    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1827    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1828    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1829    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1830    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1831    pub GetDeviceReleaseNumber:
1832        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
1833    pub GetDeviceAddress:
1834        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
1835    pub GetDeviceBusPowerAvailable:
1836        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1837    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1838    pub GetNumberOfConfigurations:
1839        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1840    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1841    pub GetConfigurationDescriptorPtr: Option<
1842        unsafe extern "C-unwind" fn(
1843            *mut c_void,
1844            u8,
1845            *mut IOUSBConfigurationDescriptorPtr,
1846        ) -> IOReturn,
1847    >,
1848    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1849    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
1850    pub GetBusFrameNumber:
1851        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1852    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1853    pub DeviceRequest:
1854        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
1855    pub DeviceRequestAsync: Option<
1856        unsafe extern "C-unwind" fn(
1857            *mut c_void,
1858            *mut IOUSBDevRequest,
1859            IOAsyncCallback1,
1860            *mut c_void,
1861        ) -> IOReturn,
1862    >,
1863    pub CreateInterfaceIterator: Option<
1864        unsafe extern "C-unwind" fn(
1865            *mut c_void,
1866            *mut IOUSBFindInterfaceRequest,
1867            *mut io_iterator_t,
1868        ) -> IOReturn,
1869    >,
1870    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1871    pub DeviceRequestTO:
1872        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
1873    pub DeviceRequestAsyncTO: Option<
1874        unsafe extern "C-unwind" fn(
1875            *mut c_void,
1876            *mut IOUSBDevRequestTO,
1877            IOAsyncCallback1,
1878            *mut c_void,
1879        ) -> IOReturn,
1880    >,
1881    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
1882    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
1883    pub USBGetManufacturerStringIndex:
1884        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1885    pub USBGetProductStringIndex:
1886        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1887    pub USBGetSerialNumberStringIndex:
1888        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
1889    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
1890    pub GetBusMicroFrameNumber:
1891        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1892    pub GetIOUSBLibVersion: Option<
1893        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
1894    >,
1895    pub GetBusFrameNumberWithTime:
1896        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
1897    pub GetUSBDeviceInformation:
1898        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1899    pub RequestExtraPower:
1900        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
1901    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
1902    pub GetExtraPowerAllocated:
1903        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
1904    /// Returns the amount of bandwidth available on the bus for allocation to
1905    /// 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
1906    /// speed device, it will be the number of bytes per frame (1ms)
1907    ///
1908    /// This function is useful for determining the correct AltInterface setting as well as for using
1909    /// SetPipePolicy. The interface does not have to be open to use this function.
1910    /// Availability: This function is only available with IOUSBDeviceInterface500 and above.
1911    ///
1912    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
1913    ///
1914    /// Parameter `bandwidth`: Pointer to UInt32 to hold the amount of bandwidth available (in bytes per frame or microframe).
1915    ///
1916    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
1917    pub GetBandwidthAvailableForDevice:
1918        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
1919}
1920
1921#[cfg(all(
1922    feature = "AppleUSBDefinitions",
1923    feature = "USB",
1924    feature = "libc",
1925    feature = "objc2"
1926))]
1927unsafe impl Encode for IOUSBDeviceStruct500 {
1928    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct500", &[
1929        <*mut c_void>::ENCODING,
1930        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
1931        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1932        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
1933        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
1934        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
1935        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
1936        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
1937        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1938        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1939        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1940        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1941        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1942        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1943        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1944        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
1945        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
1946        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1947        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> 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 u32,) -> IOReturn>>::ENCODING,
1950        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> IOReturn>>::ENCODING,
1951        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1952        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
1953        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1954        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1955        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
1956        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1957        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
1958        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1959        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
1960        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
1961        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
1962        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
1963        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1964        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
1966        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
1967        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1968        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
1969        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
1970        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1971        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
1972        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
1973        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
1974        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
1975    ]);
1976}
1977
1978#[cfg(all(
1979    feature = "AppleUSBDefinitions",
1980    feature = "USB",
1981    feature = "libc",
1982    feature = "objc2"
1983))]
1984unsafe impl RefEncode for IOUSBDeviceStruct500 {
1985    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1986}
1987
1988/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 5.0.0 and above.
1989///
1990/// 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.
1991/// Super: IOUSBDeviceInterface400
1992///
1993/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface500?language=objc)
1994#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
1995pub type IOUSBDeviceInterface500 = IOUSBDeviceStruct500;
1996
1997/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 650.4.0 and above.
1998///
1999/// 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.
2000/// Super: IOUSBDeviceInterface500
2001///
2002/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct650?language=objc)
2003#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2004#[repr(C)]
2005#[derive(Clone, Copy, Debug, PartialEq)]
2006pub struct IOUSBDeviceStruct650 {
2007    pub(crate) _reserved: *mut c_void,
2008    pub QueryInterface:
2009        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2010    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2011    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2012    pub CreateDeviceAsyncEventSource:
2013        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2014    pub GetDeviceAsyncEventSource:
2015        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2016    pub CreateDeviceAsyncPort:
2017        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2018    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2019    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2020    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2021    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2022    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2023    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2024    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2025    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2026    pub GetDeviceReleaseNumber:
2027        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2028    pub GetDeviceAddress:
2029        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
2030    pub GetDeviceBusPowerAvailable:
2031        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2032    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2033    pub GetNumberOfConfigurations:
2034        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2035    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2036    pub GetConfigurationDescriptorPtr: Option<
2037        unsafe extern "C-unwind" fn(
2038            *mut c_void,
2039            u8,
2040            *mut IOUSBConfigurationDescriptorPtr,
2041        ) -> IOReturn,
2042    >,
2043    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2044    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2045    pub GetBusFrameNumber:
2046        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2047    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2048    pub DeviceRequest:
2049        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
2050    pub DeviceRequestAsync: Option<
2051        unsafe extern "C-unwind" fn(
2052            *mut c_void,
2053            *mut IOUSBDevRequest,
2054            IOAsyncCallback1,
2055            *mut c_void,
2056        ) -> IOReturn,
2057    >,
2058    pub CreateInterfaceIterator: Option<
2059        unsafe extern "C-unwind" fn(
2060            *mut c_void,
2061            *mut IOUSBFindInterfaceRequest,
2062            *mut io_iterator_t,
2063        ) -> IOReturn,
2064    >,
2065    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2066    pub DeviceRequestTO:
2067        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
2068    pub DeviceRequestAsyncTO: Option<
2069        unsafe extern "C-unwind" fn(
2070            *mut c_void,
2071            *mut IOUSBDevRequestTO,
2072            IOAsyncCallback1,
2073            *mut c_void,
2074        ) -> IOReturn,
2075    >,
2076    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
2077    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2078    pub USBGetManufacturerStringIndex:
2079        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2080    pub USBGetProductStringIndex:
2081        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2082    pub USBGetSerialNumberStringIndex:
2083        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2084    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
2085    pub GetBusMicroFrameNumber:
2086        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2087    pub GetIOUSBLibVersion: Option<
2088        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
2089    >,
2090    pub GetBusFrameNumberWithTime:
2091        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2092    pub GetUSBDeviceInformation:
2093        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2094    pub RequestExtraPower:
2095        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
2096    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
2097    pub GetExtraPowerAllocated:
2098        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
2099    pub GetBandwidthAvailableForDevice:
2100        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2101    /// Sets the configuration in the device.
2102    ///
2103    /// Note that setting the configuration causes any existing IOUSBInterface objects attached to the
2104    /// IOUSBDevice to be destroyed, and all of the interfaces in the new configuration to be instantiated
2105    /// as new IOUSBInterface objects.  The device must be open to use this function.
2106    ///
2107    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2108    ///
2109    /// Parameter `configNum`: The value of the desired configuration (from IOUSBConfigurationDescriptor.bConfigurationValue)
2110    ///
2111    /// Parameter `startInterfaceMatching`: true if IOUSBFamily should call IOKit to match the IOUSBInterface nubs.  If false is set, the client
2112    /// needs to either (1) have the "com.apple.vm.device-access" entitlement and have the IOUSBDevice authorized
2113    /// via the IOKit's IOServiceAuthorize() API or (1) have root privileges.
2114    ///
2115    /// Parameter `issueRemoteWakeup`: true if IOUSBFamily should send the command to enable remote wakeup in the device
2116    ///
2117    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2118    /// or kIOReturnNotOpen if the device is not open for exclusive access.
2119    pub SetConfigurationV2:
2120        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, bool, bool) -> IOReturn>,
2121    /// Registers a callback routine to be invoked when certain events occur in the kernel.
2122    ///
2123    /// The callback function will be called, for example when the underlying IOUSBDevice is
2124    /// going to be suspended due to some kind of kernel activity. It will also be called when
2125    /// the underlying IOUSBDevice is resumed.
2126    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2127    ///
2128    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2129    ///
2130    /// Parameter `notificationMask`: Specifies the desired type of notification
2131    ///
2132    /// Parameter `callback`: An IOAsyncCallback2 method. Upon completion, the arg0 argument of the AsyncCallback2 will contain the
2133    /// notification type, and arg1 will contain a notificationToken which should be used when calling AcknowledgeNotification
2134    ///
2135    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2136    ///
2137    /// Parameter `pRegistrationToken`: A pointer to a UInt64 which will contain a registration token if the function is
2138    /// successful. This registration token can then later be used to call UnregisterNotification.
2139    ///
2140    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2141    pub RegisterForNotification: Option<
2142        unsafe extern "C-unwind" fn(
2143            *mut c_void,
2144            u64,
2145            IOAsyncCallback2,
2146            *mut c_void,
2147            *mut u64,
2148        ) -> IOReturn,
2149    >,
2150    /// Unregisters a previously registered callback routine
2151    ///
2152    /// The callback routine will no longer be invoked when events occur
2153    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2154    ///
2155    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2156    ///
2157    /// Parameter `registrationToken`: The registration token which was obtained in the call to RegisterForNotification
2158    ///
2159    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2160    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2161    /// Acknowledges a notification event
2162    ///
2163    /// Some events in the kernel will wait for an acknowledgement from all interested parties before proceeding.
2164    /// For example, if an IOUSBDevice is about to be suspended, any User Code which has registered to receive
2165    /// that event will be notified and should acknowledge the notification when it is ready for the IOUSBDevice
2166    /// to be suspended.
2167    /// Availability: This function is only available with IOUSBDeviceInterface650 and above.
2168    ///
2169    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2170    ///
2171    /// Parameter `notificationToken`: The notification token which was passed in to the callback routine
2172    ///
2173    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2174    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2175}
2176
2177#[cfg(all(
2178    feature = "AppleUSBDefinitions",
2179    feature = "USB",
2180    feature = "libc",
2181    feature = "objc2"
2182))]
2183unsafe impl Encode for IOUSBDeviceStruct650 {
2184    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct650", &[
2185        <*mut c_void>::ENCODING,
2186        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
2187        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2188        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2189        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
2190        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
2191        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
2192        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
2193        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2194        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2195        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2196        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2197        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2198        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2199        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2200        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2201        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
2202        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2203        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2204        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2205        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2206        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> 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,u8,) -> IOReturn>>::ENCODING,
2209        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2210        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2211        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
2212        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2213        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
2214        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2215        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
2216        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2217        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
2218        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2219        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2220        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2221        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2222        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
2223        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2224        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
2225        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2226        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2227        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
2228        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
2229        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
2230        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2231        Encoding::Pointer(&Encoding::Unknown),
2232        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
2233        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2234        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2235    ]);
2236}
2237
2238#[cfg(all(
2239    feature = "AppleUSBDefinitions",
2240    feature = "USB",
2241    feature = "libc",
2242    feature = "objc2"
2243))]
2244unsafe impl RefEncode for IOUSBDeviceStruct650 {
2245    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2246}
2247
2248/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 650.4.0 and above.
2249///
2250/// 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.
2251/// Super: IOUSBDeviceInterface500
2252///
2253/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface650?language=objc)
2254#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2255pub type IOUSBDeviceInterface650 = IOUSBDeviceStruct650;
2256
2257/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 900.4.2 and above.
2258///
2259/// 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.
2260/// Super: IOUSBDeviceInterface650
2261///
2262/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicestruct942?language=objc)
2263#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2264#[repr(C)]
2265#[derive(Clone, Copy, Debug, PartialEq)]
2266pub struct IOUSBDeviceStruct942 {
2267    pub(crate) _reserved: *mut c_void,
2268    pub QueryInterface:
2269        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2270    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2271    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2272    pub CreateDeviceAsyncEventSource:
2273        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2274    pub GetDeviceAsyncEventSource:
2275        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2276    pub CreateDeviceAsyncPort:
2277        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2278    pub GetDeviceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2279    pub USBDeviceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2280    pub USBDeviceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2281    pub GetDeviceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2282    pub GetDeviceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2283    pub GetDeviceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2284    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2285    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2286    pub GetDeviceReleaseNumber:
2287        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2288    pub GetDeviceAddress:
2289        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut USBDeviceAddress) -> IOReturn>,
2290    pub GetDeviceBusPowerAvailable:
2291        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2292    pub GetDeviceSpeed: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2293    pub GetNumberOfConfigurations:
2294        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2295    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2296    pub GetConfigurationDescriptorPtr: Option<
2297        unsafe extern "C-unwind" fn(
2298            *mut c_void,
2299            u8,
2300            *mut IOUSBConfigurationDescriptorPtr,
2301        ) -> IOReturn,
2302    >,
2303    pub GetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2304    pub SetConfiguration: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2305    pub GetBusFrameNumber:
2306        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2307    pub ResetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2308    pub DeviceRequest:
2309        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequest) -> IOReturn>,
2310    pub DeviceRequestAsync: Option<
2311        unsafe extern "C-unwind" fn(
2312            *mut c_void,
2313            *mut IOUSBDevRequest,
2314            IOAsyncCallback1,
2315            *mut c_void,
2316        ) -> IOReturn,
2317    >,
2318    pub CreateInterfaceIterator: Option<
2319        unsafe extern "C-unwind" fn(
2320            *mut c_void,
2321            *mut IOUSBFindInterfaceRequest,
2322            *mut io_iterator_t,
2323        ) -> IOReturn,
2324    >,
2325    pub USBDeviceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2326    pub DeviceRequestTO:
2327        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBDevRequestTO) -> IOReturn>,
2328    pub DeviceRequestAsyncTO: Option<
2329        unsafe extern "C-unwind" fn(
2330            *mut c_void,
2331            *mut IOUSBDevRequestTO,
2332            IOAsyncCallback1,
2333            *mut c_void,
2334        ) -> IOReturn,
2335    >,
2336    pub USBDeviceSuspend: Option<unsafe extern "C-unwind" fn(*mut c_void, Boolean) -> IOReturn>,
2337    pub USBDeviceAbortPipeZero: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2338    pub USBGetManufacturerStringIndex:
2339        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2340    pub USBGetProductStringIndex:
2341        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2342    pub USBGetSerialNumberStringIndex:
2343        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2344    pub USBDeviceReEnumerate: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
2345    pub GetBusMicroFrameNumber:
2346        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2347    pub GetIOUSBLibVersion: Option<
2348        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
2349    >,
2350    pub GetBusFrameNumberWithTime:
2351        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2352    pub GetUSBDeviceInformation:
2353        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2354    pub RequestExtraPower:
2355        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, *mut u32) -> IOReturn>,
2356    pub ReturnExtraPower: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32) -> IOReturn>,
2357    pub GetExtraPowerAllocated:
2358        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, *mut u32) -> IOReturn>,
2359    pub GetBandwidthAvailableForDevice:
2360        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2361    pub SetConfigurationV2:
2362        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, bool, bool) -> IOReturn>,
2363    pub RegisterForNotification: Option<
2364        unsafe extern "C-unwind" fn(
2365            *mut c_void,
2366            u64,
2367            IOAsyncCallback2,
2368            *mut c_void,
2369            *mut u64,
2370        ) -> IOReturn,
2371    >,
2372    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2373    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
2374    /// Returns the IONotificationPort for this IOService instance.
2375    /// Availability: This function is only available with IOUSBDeviceInterface942 and above.
2376    ///
2377    /// Parameter `self`: Pointer to the IOUSBDeviceInterface.
2378    ///
2379    /// Returns: Returns the IONotificationPortRef if one exists, MACH_PORT_NULL otherwise.
2380    pub GetDeviceAsyncNotificationPort:
2381        Option<unsafe extern "C-unwind" fn(*mut c_void) -> IONotificationPortRef>,
2382}
2383
2384#[cfg(all(
2385    feature = "AppleUSBDefinitions",
2386    feature = "USB",
2387    feature = "libc",
2388    feature = "objc2"
2389))]
2390unsafe impl Encode for IOUSBDeviceStruct942 {
2391    const ENCODING: Encoding = Encoding::Struct("IOUSBDeviceStruct942", &[
2392        <*mut c_void>::ENCODING,
2393        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
2394        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2395        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
2396        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
2397        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
2398        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
2399        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
2400        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2401        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2402        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2403        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2404        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2405        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2406        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2407        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
2408        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut USBDeviceAddress,) -> IOReturn>>::ENCODING,
2409        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2410        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2411        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2412        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2413        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBConfigurationDescriptorPtr,) -> 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,u8,) -> IOReturn>>::ENCODING,
2416        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2417        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2418        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
2419        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2420        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBFindInterfaceRequest,*mut io_iterator_t,) -> IOReturn>>::ENCODING,
2421        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2422        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
2423        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
2424        <Option<unsafe extern "C-unwind" fn(*mut c_void,Boolean,) -> IOReturn>>::ENCODING,
2425        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
2426        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2427        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2428        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
2429        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
2430        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2431        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
2432        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
2433        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2434        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,*mut u32,) -> IOReturn>>::ENCODING,
2435        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,) -> IOReturn>>::ENCODING,
2436        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,*mut u32,) -> IOReturn>>::ENCODING,
2437        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
2438        Encoding::Pointer(&Encoding::Unknown),
2439        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
2440        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2441        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
2442        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IONotificationPortRef>>::ENCODING,
2443    ]);
2444}
2445
2446#[cfg(all(
2447    feature = "AppleUSBDefinitions",
2448    feature = "USB",
2449    feature = "libc",
2450    feature = "objc2"
2451))]
2452unsafe impl RefEncode for IOUSBDeviceStruct942 {
2453    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2454}
2455
2456/// The object you use to access USB devices from user space, returned by the IOUSBFamily version 900.4.2 and above.
2457///
2458/// 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.
2459/// Super: IOUSBDeviceInterface650
2460///
2461/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface942?language=objc)
2462#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2463pub type IOUSBDeviceInterface942 = IOUSBDeviceStruct942;
2464
2465/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdeviceinterface?language=objc)
2466#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
2467pub type IOUSBDeviceInterface = IOUSBDeviceInterface942;
2468
2469/// The object you use to access a USB device interface from user space, returned by all versions
2470/// of the IOUSBFamily currently shipping.
2471///
2472/// The functions listed here will work with any version of the IOUSBInterfaceInterface, including
2473/// the one shipped with Mac OS X version 10.0.
2474///
2475/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct100?language=objc)
2476#[cfg(all(feature = "USB", feature = "libc"))]
2477#[repr(C)]
2478#[derive(Clone, Copy, Debug, PartialEq)]
2479pub struct IOUSBInterfaceStruct100 {
2480    pub(crate) _reserved: *mut c_void,
2481    pub QueryInterface:
2482        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
2483    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2484    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
2485    /// Creates a run loop source for delivery of all asynchronous notifications on this device.
2486    ///
2487    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead
2488    /// it delivers completion notifications on a Mach port (see {
2489    ///
2490    /// ```text
2491    ///  CreateInterfaceAsyncPort}). This
2492    ///                 routine wraps that port with the appropriate routing code so that
2493    ///                 the completion notifications can be automatically routed through the client's
2494    ///                 CFRunLoop.
2495    ///        @param      self Pointer to the IOUSBInterfaceInterface.
2496    ///        @param      source Pointer to a CFRunLoopSourceRef to return the newly created run loop event source.
2497    ///        @result     Returns kIOReturnSuccess if successful or a kern_return_t if failed.
2498    ///      
2499    ///
2500    /// ```
2501    pub CreateInterfaceAsyncEventSource:
2502        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
2503    /// Returns the CFRunLoopSourceRef for this IOService instance.
2504    ///
2505    /// (description)
2506    ///
2507    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2508    ///
2509    /// Returns: Returns the run loop source if one has been created, 0 otherwise.
2510    pub GetInterfaceAsyncEventSource:
2511        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
2512    /// Creates and registers a mach_port_t for asynchronous communications.
2513    ///
2514    /// The Mac OS X kernel does not spawn a thread to callback to the client. Instead
2515    /// it delivers completion notifications on this Mach port. After receiving a message
2516    /// on this port the client is obliged to call the IOKitLib.h: IODispatchCalloutFromMessage()
2517    /// function for decoding the notification message.
2518    ///
2519    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2520    ///
2521    /// Returns: Returns kIOReturnSuccess if successful or a kern_return_t if failed.
2522    pub CreateInterfaceAsyncPort:
2523        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
2524    /// Returns the mach_port_t port for this IOService instance.
2525    ///
2526    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2527    ///
2528    /// Returns: Returns the port if one exists, 0 otherwise.
2529    pub GetInterfaceAsyncPort:
2530        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
2531    /// Opensthe IOUSBInterface for exclusive access.
2532    ///
2533    /// Before the client can transfer data to and from the interface, it must have
2534    /// succeeded in opening the interface. This establishes an exclusive link between
2535    /// the client's task and the actual interface device. Opening the interface causes
2536    /// pipes to be created on each endpoint contained in the interface. If the interface
2537    /// contains isochronous endpoints, an attempt is made to allocate bandwidth on
2538    /// the bus for each of those pipes. If there is not enough bandwidth available,
2539    /// an isochronous pipe may be created with a bandwidth of zero. The software must
2540    /// then call SetPipePolicy to change the size of that pipe before it can be used
2541    /// for I/O.
2542    ///
2543    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2544    ///
2545    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already,
2546    /// kIOReturnError if the connection with the kernel cannot be established or
2547    /// kIOReturnSuccess if successful.
2548    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2549    /// Closes the task's connection to the IOUSBInterface.
2550    ///
2551    /// Releases the client's exclusive access to the IOUSBInterface.
2552    ///
2553    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2554    ///
2555    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2556    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
2557    /// Returns the USB Class of the interface  (bInterfaceClass).
2558    ///
2559    /// The interface does not have to be open to use this function.
2560    ///
2561    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2562    ///
2563    /// Parameter `intfClass`: Pointer to UInt8 to hold the interface Class.
2564    ///
2565    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2566    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2567    /// Returns the USB Subclass of the interface (bInterfaceSubClass).
2568    ///
2569    /// The interface does not have to be open to use this function.
2570    ///
2571    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2572    ///
2573    /// Parameter `intfSubClass`: Pointer to UInt8 to hold the interface Subclass.
2574    ///
2575    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2576    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2577    /// Returns the USB Protocol of the interface (bInterfaceProtocol).
2578    ///
2579    /// The interface does not have to be open to use this function.
2580    ///
2581    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2582    ///
2583    /// Parameter `intfProtocol`: Pointer to UInt8 to hold the interface Protocol.
2584    ///
2585    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2586    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2587    /// Returns the USB Vendor ID (idVendor) of the device of which this interface is a part.
2588    ///
2589    /// The interface does not have to be open to use this function.
2590    ///
2591    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2592    ///
2593    /// Parameter `devVendor`: Pointer to UInt16 to hold the vendorID.
2594    ///
2595    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2596    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2597    /// Returns the USB Product ID (idProduct) of the device of which this interface is a part.
2598    ///
2599    /// The interface does not have to be open to use this function.
2600    ///
2601    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2602    ///
2603    /// Parameter `devProduct`: Pointer to UInt16 to hold the ProductID.
2604    ///
2605    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2606    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2607    /// Returns the Device Release Number (bcdDevice) of the device of which this interface is a part.
2608    ///
2609    /// The interface does not have to be open to use this function.
2610    ///
2611    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2612    ///
2613    /// Parameter `devRelNum`: Pointer to UInt16 to hold the Release Number.
2614    ///
2615    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2616    pub GetDeviceReleaseNumber:
2617        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
2618    /// Returns the current configuration value set in the device (the interface will be part of that configuration.)
2619    ///
2620    /// The interface does not have to be open to use this function.
2621    ///
2622    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2623    ///
2624    /// Parameter `configVal`: Pointer to UInt8 to hold the configuration value.
2625    ///
2626    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2627    pub GetConfigurationValue:
2628        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2629    /// Returns the interface number (zero-based index) of this interface within the current configuration of the device.
2630    ///
2631    /// The interface does not have to be open to use this function.
2632    ///
2633    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2634    ///
2635    /// Parameter `intfNumber`: Pointer to UInt8 to hold the interface number.
2636    ///
2637    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2638    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2639    /// Returns the alternate setting currently selected in this interface.
2640    ///
2641    /// The interface does not have to be open to use this function.
2642    ///
2643    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2644    ///
2645    /// Parameter `intfAltSetting`: Pointer to UInt8 to hold the alternate setting value.
2646    ///
2647    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2648    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2649    /// Returns the number of endpoints in this interface.
2650    ///
2651    /// The interface does not have to be open to use this function.
2652    ///
2653    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2654    ///
2655    /// Parameter `intfNumEndpoints`: Pointer to UInt8 to hold the number of endpoints.
2656    ///
2657    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2658    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
2659    /// Returns the location ID.
2660    ///
2661    /// The location ID is a 32 bit number which is unique among all USB devices in the system, and which
2662    /// will not change on a system reboot unless the topology of the bus itself changes.  The interface
2663    /// does not have to be open to use this function.
2664    ///
2665    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2666    ///
2667    /// Parameter `locationID`: Pointer to UInt32 to hold the location ID.
2668    ///
2669    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2670    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
2671    /// Returns the device of which this interface is part.
2672    ///
2673    /// The interface does not have to be open to use this function. The returned device can be used to
2674    /// create a CFPlugin to talk to the device.
2675    ///
2676    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2677    ///
2678    /// Parameter `device`: Pointer to io_service_t to hold the result.
2679    ///
2680    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2681    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
2682    /// Changes the AltInterface setting.
2683    ///
2684    /// The interface must be open to use this function.
2685    ///
2686    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2687    ///
2688    /// Parameter `alternateSetting`: The new alternate setting for the interface.
2689    ///
2690    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2691    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2692    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2693    /// Gets the current frame number of the bus to which the interface and its device are attached.
2694    ///
2695    /// The interface does not have to be open to use this function.
2696    ///
2697    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2698    ///
2699    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
2700    ///
2701    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus frame
2702    /// number was attained.
2703    ///
2704    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
2705    pub GetBusFrameNumber:
2706        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
2707    /// Sends a USB request on a control pipe.
2708    ///
2709    /// If the request is a standard request which will change the state of the device, the device must
2710    /// be open, which means you should be using the IOUSBDeviceInterface for this command.
2711    ///
2712    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2713    ///
2714    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
2715    ///
2716    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
2717    ///
2718    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2719    /// kIOReturnAborted if the thread is interrupted before the call completes,
2720    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2721    pub ControlRequest:
2722        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
2723    /// Sends an asynchronous USB request on a control pipe.
2724    ///
2725    /// Use pipeRef=0 for the default device control pipe.  If the request is a standard request which will
2726    /// change the state of the device, the device must be open, which means you should be using the
2727    /// IOUSBDeviceInterface for this command.
2728    ///
2729    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2730    ///
2731    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
2732    ///
2733    /// Parameter `req`: Pointer to an IOUSBDevRequest containing the request.
2734    ///
2735    /// 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.
2736    ///
2737    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2738    ///
2739    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2740    /// kIOReturnNotOpen if the interface is not open for exclusive access, or kIOUSBNoAsyncPortErr if no
2741    /// Async port has been created for this interface.
2742    pub ControlRequestAsync: Option<
2743        unsafe extern "C-unwind" fn(
2744            *mut c_void,
2745            u8,
2746            *mut IOUSBDevRequest,
2747            IOAsyncCallback1,
2748            *mut c_void,
2749        ) -> IOReturn,
2750    >,
2751    /// Gets the properties for a pipe.
2752    ///
2753    /// Once an interface is opened, all of the pipes in that interface get created by the kernel. The number
2754    /// of pipes can be retrieved by GetNumEndpoints. The client can then get the properties of any pipe
2755    /// using an index of 1 to GetNumEndpoints. Pipe 0 is the default control pipe in the device.
2756    ///
2757    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2758    ///
2759    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2760    ///
2761    /// Parameter `direction`: Pointer to an UInt8 to get the direction of the pipe.
2762    ///
2763    /// Parameter `number`: Pointer to an UInt8 to get the pipe number.
2764    ///
2765    /// Parameter `transferType`: Pointer to an UInt8 to get the transfer type of the pipe.
2766    ///
2767    /// 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
2768    /// and the burst and the multiplier for SS Isoc pipes. It could also have been adjusted by SetPipePolicy.
2769    ///
2770    /// Parameter `interval`: Pointer to an UInt8 to get the interval for polling the pipe for data (in milliseconds).
2771    ///
2772    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2773    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2774    pub GetPipeProperties: Option<
2775        unsafe extern "C-unwind" fn(
2776            *mut c_void,
2777            u8,
2778            *mut u8,
2779            *mut u8,
2780            *mut u8,
2781            *mut u16,
2782            *mut u8,
2783        ) -> IOReturn,
2784    >,
2785    /// Gets the current status of a pipe.
2786    ///
2787    /// The interface must be open for the pipe to exist.
2788    ///
2789    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2790    ///
2791    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2792    ///
2793    /// Returns: Returns kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen
2794    /// if the interface is not open for exclusive access. Otherwise, the status of the pipe is returned.
2795    /// Returns kIOUSBPipeStalled if the pipe is stalled. See
2796    ///
2797    /// ```text
2798    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
2799    /// ```
2800    ///
2801    /// or
2802    ///
2803    /// ```text
2804    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2805    /// ```
2806    ///
2807    /// for
2808    /// more information.
2809    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2810    /// Aborts any outstanding transactions on the pipe with status kIOReturnAborted.
2811    ///
2812    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen.
2813    /// Note that this command will also clear the halted bit on the endpoint
2814    /// in the controller, but will NOT clear the data toggle bit.  If you want to clear the data toggle bit as well, see
2815    ///
2816    /// ```text
2817    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
2818    /// ```
2819    ///
2820    /// or
2821    ///
2822    /// ```text
2823    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2824    /// ```
2825    ///
2826    /// for more information.  The interface must be open for the pipe to exist.
2827    ///
2828    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2829    ///
2830    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2831    ///
2832    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2833    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2834    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2835    /// Equivalent to ClearPipeStall.
2836    ///
2837    /// The interface must be open for the pipe to exist.
2838    ///
2839    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2840    ///
2841    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2842    ///
2843    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2844    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2845    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2846    /// Clears the halted bit and the data toggle bit on the pipe's endpoint in the controller.
2847    ///
2848    /// This function also returns any outstanding transactions on the pipe with status kIOUSBTransactionReturned.
2849    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen. The data
2850    /// toggle may need to be resynchronized. The driver may handle this by sending a ClearFeature(ENDPOINT_HALT)
2851    /// to the default control pipe, specifying the device's endpoint for this pipe. See also
2852    ///
2853    /// ```text
2854    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
2855    /// ```
2856    ///
2857    /// .
2858    ///
2859    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2860    ///
2861    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2862    ///
2863    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2864    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2865    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
2866    /// Reads data on a
2867    /// <b>
2868    /// BULK IN
2869    /// </b>
2870    /// or an
2871    /// <b>
2872    /// INTERRUPT
2873    /// </b>
2874    /// pipe.
2875    ///
2876    /// The interface must be open for the pipe to exist.
2877    ///
2878    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2879    ///
2880    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2881    ///
2882    /// Parameter `buf`: Buffer to hold the data.
2883    ///
2884    /// Parameter `size`: On entry: a pointer to the size of the buffer pointed to by buf.
2885    /// On exit: a pointer to the number of bytes actually read from the device.
2886    ///
2887    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2888    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2889    pub ReadPipe:
2890        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
2891    /// Writes data on a
2892    /// <b>
2893    /// BULK OUT
2894    /// </b>
2895    /// or
2896    /// <b>
2897    /// INTERRUPT OUT
2898    /// </b>
2899    /// pipe.
2900    ///
2901    /// The interface must be open for the pipe to exist.
2902    ///
2903    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2904    ///
2905    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2906    ///
2907    /// Parameter `buf`: Buffer to hold the data.
2908    ///
2909    /// Parameter `size`: The size of the data buffer.
2910    ///
2911    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2912    /// kIOReturnAborted if the thread is interrupted before the call completes,
2913    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2914    pub WritePipe:
2915        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
2916    /// Performs an asynchronous read on a
2917    /// <b>
2918    /// BULK IN
2919    /// </b>
2920    /// or an
2921    /// <b>
2922    /// INTERRUPT
2923    /// </b>
2924    /// pipe.
2925    ///
2926    /// The interface must be open for the pipe to exist.
2927    ///
2928    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2929    ///
2930    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2931    ///
2932    /// Parameter `buf`: Buffer to hold the data.
2933    ///
2934    /// Parameter `size`: The size of the buffer pointed to by buf.
2935    ///
2936    /// 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
2937    /// port upon completion.
2938    ///
2939    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2940    ///
2941    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2942    /// kIOReturnAborted if the thread is interrupted before the call completes,
2943    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2944    pub ReadPipeAsync: Option<
2945        unsafe extern "C-unwind" fn(
2946            *mut c_void,
2947            u8,
2948            *mut c_void,
2949            u32,
2950            IOAsyncCallback1,
2951            *mut c_void,
2952        ) -> IOReturn,
2953    >,
2954    /// Performs an asynchronous write on a
2955    /// <b>
2956    /// BULK OUT
2957    /// </b>
2958    /// or
2959    /// <b>
2960    /// INTERRUPT OUT
2961    /// </b>
2962    /// pipe.
2963    ///
2964    /// The interface must be open for the pipe to exist.
2965    ///
2966    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
2967    ///
2968    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
2969    ///
2970    /// Parameter `buf`: Buffer to hold the data.
2971    ///
2972    /// Parameter `size`: The size of the buffer pointed to by buf.
2973    ///
2974    /// 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
2975    /// port upon completion.
2976    ///
2977    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
2978    ///
2979    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
2980    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
2981    pub WritePipeAsync: Option<
2982        unsafe extern "C-unwind" fn(
2983            *mut c_void,
2984            u8,
2985            *mut c_void,
2986            u32,
2987            IOAsyncCallback1,
2988            *mut c_void,
2989        ) -> IOReturn,
2990    >,
2991    /// Performs a read on an
2992    /// <b>
2993    /// ISOCHRONOUS
2994    /// </b>
2995    /// pipe.
2996    ///
2997    /// The interface must be open for the pipe to exist.
2998    ///
2999    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3000    ///
3001    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3002    ///
3003    /// Parameter `buf`: Buffer to hold the data.
3004    ///
3005    /// Parameter `frameStart`: The bus frame number on which to start the read (obtained from GetBusFrameNumber).
3006    ///
3007    /// Parameter `numFrames`: The number of frames for which to transfer data.
3008    ///
3009    /// Parameter `frameList`: A pointer to an array of IOUSBIsocFrame structures describing the frames.
3010    ///
3011    /// 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
3012    /// port upon completion.
3013    ///
3014    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3015    ///
3016    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3017    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
3018    pub ReadIsochPipeAsync: Option<
3019        unsafe extern "C-unwind" fn(
3020            *mut c_void,
3021            u8,
3022            *mut c_void,
3023            u64,
3024            u32,
3025            *mut IOUSBIsocFrame,
3026            IOAsyncCallback1,
3027            *mut c_void,
3028        ) -> IOReturn,
3029    >,
3030    /// Performs an asynchronous write on an
3031    /// <b>
3032    /// ISOCHRONOUS
3033    /// </b>
3034    /// pipe.
3035    ///
3036    /// The interface must be open for the pipe to exist.
3037    ///
3038    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3039    ///
3040    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3041    ///
3042    /// Parameter `buf`: Buffer to hold the data.
3043    ///
3044    /// Parameter `frameStart`: The bus frame number on which to start the write (obtained from GetBusFrameNumber).
3045    ///
3046    /// Parameter `numFrames`: The number of frames for which to transfer data.
3047    ///
3048    /// Parameter `frameList`: A pointer to an array of IOUSBIsocFrame structures describing the frames.
3049    ///
3050    /// 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
3051    /// port upon completion.
3052    ///
3053    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3054    ///
3055    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3056    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
3057    pub WriteIsochPipeAsync: Option<
3058        unsafe extern "C-unwind" fn(
3059            *mut c_void,
3060            u8,
3061            *mut c_void,
3062            u64,
3063            u32,
3064            *mut IOUSBIsocFrame,
3065            IOAsyncCallback1,
3066            *mut c_void,
3067        ) -> IOReturn,
3068    >,
3069}
3070
3071#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3072unsafe impl Encode for IOUSBInterfaceStruct100 {
3073    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct100", &[
3074        <*mut c_void>::ENCODING,
3075        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3076        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3077        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3078        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3079        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3080        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3081        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3082        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3083        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3084        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3085        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3086        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3087        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3088        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3089        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3090        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3091        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3092        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3093        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3094        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3095        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3096        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3097        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3098        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3099        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3100        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3101        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3102        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3103        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3104        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3105        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3106        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3107        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3108        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3109        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3110        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3111    ]);
3112}
3113
3114#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3115unsafe impl RefEncode for IOUSBInterfaceStruct100 {
3116    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3117}
3118
3119/// The object you use to access a USB device interface from user space, returned by all versions
3120/// of the IOUSBFamily currently shipping.
3121///
3122/// The functions listed here will work with any version of the IOUSBInterfaceInterface, including
3123/// the one shipped with Mac OS X version 10.0.
3124///
3125/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface100?language=objc)
3126#[cfg(all(feature = "USB", feature = "libc"))]
3127pub type IOUSBInterfaceInterface100 = IOUSBInterfaceStruct100;
3128
3129/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3130/// version 1.8.2 and above.
3131///
3132/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface and
3133/// some new functions that are available on Mac OS X version 10.0.4 and later.
3134/// Super: IOUSBInterfaceInterface
3135///
3136/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct182?language=objc)
3137#[cfg(all(feature = "USB", feature = "libc"))]
3138#[repr(C)]
3139#[derive(Clone, Copy, Debug, PartialEq)]
3140pub struct IOUSBInterfaceStruct182 {
3141    pub(crate) _reserved: *mut c_void,
3142    pub QueryInterface:
3143        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3144    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3145    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3146    pub CreateInterfaceAsyncEventSource:
3147        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3148    pub GetInterfaceAsyncEventSource:
3149        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3150    pub CreateInterfaceAsyncPort:
3151        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3152    pub GetInterfaceAsyncPort:
3153        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3154    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3155    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3156    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3157    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3158    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3159    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3160    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3161    pub GetDeviceReleaseNumber:
3162        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3163    pub GetConfigurationValue:
3164        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3165    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3166    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3167    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3168    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3169    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3170    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3171    pub GetBusFrameNumber:
3172        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3173    pub ControlRequest:
3174        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3175    pub ControlRequestAsync: Option<
3176        unsafe extern "C-unwind" fn(
3177            *mut c_void,
3178            u8,
3179            *mut IOUSBDevRequest,
3180            IOAsyncCallback1,
3181            *mut c_void,
3182        ) -> IOReturn,
3183    >,
3184    pub GetPipeProperties: Option<
3185        unsafe extern "C-unwind" fn(
3186            *mut c_void,
3187            u8,
3188            *mut u8,
3189            *mut u8,
3190            *mut u8,
3191            *mut u16,
3192            *mut u8,
3193        ) -> IOReturn,
3194    >,
3195    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3196    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3197    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3198    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3199    pub ReadPipe:
3200        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3201    pub WritePipe:
3202        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3203    pub ReadPipeAsync: Option<
3204        unsafe extern "C-unwind" fn(
3205            *mut c_void,
3206            u8,
3207            *mut c_void,
3208            u32,
3209            IOAsyncCallback1,
3210            *mut c_void,
3211        ) -> IOReturn,
3212    >,
3213    pub WritePipeAsync: Option<
3214        unsafe extern "C-unwind" fn(
3215            *mut c_void,
3216            u8,
3217            *mut c_void,
3218            u32,
3219            IOAsyncCallback1,
3220            *mut c_void,
3221        ) -> IOReturn,
3222    >,
3223    pub ReadIsochPipeAsync: Option<
3224        unsafe extern "C-unwind" fn(
3225            *mut c_void,
3226            u8,
3227            *mut c_void,
3228            u64,
3229            u32,
3230            *mut IOUSBIsocFrame,
3231            IOAsyncCallback1,
3232            *mut c_void,
3233        ) -> IOReturn,
3234    >,
3235    pub WriteIsochPipeAsync: Option<
3236        unsafe extern "C-unwind" fn(
3237            *mut c_void,
3238            u8,
3239            *mut c_void,
3240            u64,
3241            u32,
3242            *mut IOUSBIsocFrame,
3243            IOAsyncCallback1,
3244            *mut c_void,
3245        ) -> IOReturn,
3246    >,
3247    /// Sends a USB request on a control pipe.
3248    ///
3249    /// The IOUSBDevRequestTO structure allows the client to specify timeout values for this request.  If
3250    /// the request is a standard request which will change the state of the device, the device must be open,
3251    /// which means you should be using the IOUSBDeviceInterface for this command.
3252    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3253    ///
3254    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3255    ///
3256    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
3257    ///
3258    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
3259    ///
3260    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3261    /// kIOReturnAborted if the thread is interrupted before the call completes,
3262    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3263    pub ControlRequestTO:
3264        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3265    /// Sends an asynchronous USB request on a control pipe.
3266    ///
3267    /// The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. Use
3268    /// pipeRef=0 for the default device control pipe.  If the request is a standard request which will
3269    /// change the state of the device, the device must be open, which means you should be using the
3270    /// IOUSBDeviceInterface for this command.
3271    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3272    ///
3273    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3274    ///
3275    /// Parameter `pipeRef`: Index of the control pipe to use. Use zero for the default control pipe on the device.
3276    ///
3277    /// Parameter `req`: Pointer to an IOUSBDevRequestTO containing the request.
3278    ///
3279    /// 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
3280    /// port upon completion.
3281    ///
3282    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3283    ///
3284    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3285    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3286    pub ControlRequestAsyncTO: Option<
3287        unsafe extern "C-unwind" fn(
3288            *mut c_void,
3289            u8,
3290            *mut IOUSBDevRequestTO,
3291            IOAsyncCallback1,
3292            *mut c_void,
3293        ) -> IOReturn,
3294    >,
3295    /// Performs a read on a
3296    /// <b>
3297    /// BULK IN
3298    /// </b>
3299    /// pipe, specifying timeout values.
3300    ///
3301    /// The interface must be open for the pipe to exist.
3302    ///
3303    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3304    /// toggle. See
3305    ///
3306    /// ```text
3307    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3308    /// ```
3309    ///
3310    /// or
3311    ///
3312    /// ```text
3313    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3314    /// ```
3315    ///
3316    /// .
3317    ///
3318    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipe API to perform a read from
3319    /// an interrupt pipe.
3320    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3321    ///
3322    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3323    ///
3324    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3325    ///
3326    /// Parameter `buf`: Buffer to hold the data.
3327    ///
3328    /// Parameter `size`: Pointer to the size of the buffer pointed to by buf.
3329    ///
3330    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3331    /// data is transferred in this amount of time, the request will be aborted and returned.
3332    ///
3333    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3334    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3335    ///
3336    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3337    /// kIOReturnAborted if the thread is interrupted before the call completes, or
3338    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
3339    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
3340    /// NOT contain any valid data.
3341    pub ReadPipeTO: Option<
3342        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3343    >,
3344    /// Performs a write on a
3345    /// <b>
3346    /// BULK OUT
3347    /// </b>
3348    /// pipe, with specified timeout values.
3349    ///
3350    /// The interface must be open for the pipe to exist.
3351    ///
3352    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3353    /// toggle. See
3354    ///
3355    /// ```text
3356    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3357    /// ```
3358    ///
3359    /// or
3360    ///
3361    /// ```text
3362    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3363    /// ```
3364    ///
3365    /// .
3366    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3367    ///
3368    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3369    ///
3370    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3371    ///
3372    /// Parameter `buf`: Buffer to hold the data.
3373    ///
3374    /// Parameter `size`: The size of the buffer pointed to by buf.
3375    ///
3376    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3377    /// data is transferred in this amount of time, the request will be aborted and returned.
3378    ///
3379    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3380    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3381    ///
3382    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
3383    /// kIOReturnAborted if the thread is interrupted before the call completes, or
3384    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3385    pub WritePipeTO: Option<
3386        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3387    >,
3388    /// Performs an asynchronous read on a
3389    /// <b>
3390    /// BULK IN
3391    /// </b>
3392    /// pipe, with specified timeout values.
3393    ///
3394    /// The interface must be open for the pipe to exist.
3395    ///
3396    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3397    /// toggle. See
3398    ///
3399    /// ```text
3400    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3401    /// ```
3402    ///
3403    /// or
3404    ///
3405    /// ```text
3406    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3407    /// ```
3408    ///
3409    /// .
3410    ///
3411    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync API to perform an
3412    /// asynchronous read from an interrupt pipe.
3413    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3414    ///
3415    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3416    ///
3417    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3418    ///
3419    /// Parameter `buf`: Buffer to hold the data.
3420    ///
3421    /// Parameter `size`: The size of the buffer pointed to by buf.
3422    ///
3423    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3424    /// data is transferred in this amount of time, the request will be aborted and returned.
3425    ///
3426    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3427    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3428    ///
3429    /// 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
3430    /// upon completion.
3431    ///
3432    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3433    ///
3434    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3435    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
3436    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
3437    /// NOT contain any valid data.
3438    pub ReadPipeAsyncTO: Option<
3439        unsafe extern "C-unwind" fn(
3440            *mut c_void,
3441            u8,
3442            *mut c_void,
3443            u32,
3444            u32,
3445            u32,
3446            IOAsyncCallback1,
3447            *mut c_void,
3448        ) -> IOReturn,
3449    >,
3450    /// Performs an asynchronous write on a
3451    /// <b>
3452    /// BULK OUT
3453    /// </b>
3454    /// pipe, with specified timeout values.
3455    ///
3456    /// The interface must be open for the pipe to exist.
3457    ///
3458    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
3459    /// toggle. See
3460    ///
3461    /// ```text
3462    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
3463    /// ```
3464    ///
3465    /// or
3466    ///
3467    /// ```text
3468    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
3469    /// ```
3470    ///
3471    /// .
3472    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3473    ///
3474    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3475    ///
3476    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
3477    ///
3478    /// Parameter `buf`: Buffer to hold the data.
3479    ///
3480    /// Parameter `size`: The size of the buffer pointed to by buf.
3481    ///
3482    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
3483    /// data is transferred in this amount of time, the request will be aborted and returned.
3484    ///
3485    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
3486    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
3487    ///
3488    /// 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
3489    /// upon completion.
3490    ///
3491    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
3492    ///
3493    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
3494    /// kIOReturnNotOpen if the interface is not open for exclusive access.
3495    pub WritePipeAsyncTO: Option<
3496        unsafe extern "C-unwind" fn(
3497            *mut c_void,
3498            u8,
3499            *mut c_void,
3500            u32,
3501            u32,
3502            u32,
3503            IOAsyncCallback1,
3504            *mut c_void,
3505        ) -> IOReturn,
3506    >,
3507    /// Returns the string index in the interface descriptor.
3508    ///
3509    /// The interface does not have to be open to use this function.
3510    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
3511    ///
3512    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3513    ///
3514    /// Parameter `si`: Pointer to UInt8 to hold the string index.
3515    ///
3516    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
3517    pub USBInterfaceGetStringIndex:
3518        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3519}
3520
3521#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3522unsafe impl Encode for IOUSBInterfaceStruct182 {
3523    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct182", &[
3524        <*mut c_void>::ENCODING,
3525        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3526        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3527        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3528        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3529        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3530        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3531        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3532        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3533        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3534        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3535        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3536        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3537        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3538        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3539        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3540        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3541        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3542        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3543        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3544        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3545        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3546        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3547        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3548        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3549        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3550        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3551        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3552        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3553        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3554        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3555        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3556        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3557        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3558        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3559        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3560        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3561        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
3562        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3563        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
3564        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
3565        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3566        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3567        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3568    ]);
3569}
3570
3571#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3572unsafe impl RefEncode for IOUSBInterfaceStruct182 {
3573    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3574}
3575
3576/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3577/// version 1.8.2 and above.
3578///
3579/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface and
3580/// some new functions that are available on Mac OS X version 10.0.4 and later.
3581/// Super: IOUSBInterfaceInterface
3582///
3583/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface182?language=objc)
3584#[cfg(all(feature = "USB", feature = "libc"))]
3585pub type IOUSBInterfaceInterface182 = IOUSBInterfaceStruct182;
3586
3587/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3588/// version 1.8.3 and above.
3589///
3590/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3591/// IOUSBInterfaceInterface182, and some new functions that are available on Mac OS X version 10.1
3592/// and later.
3593/// Super: IOUSBInterfaceInterface182
3594///
3595/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct183?language=objc)
3596#[cfg(all(feature = "USB", feature = "libc"))]
3597#[repr(C)]
3598#[derive(Clone, Copy, Debug, PartialEq)]
3599pub struct IOUSBInterfaceStruct183 {
3600    pub(crate) _reserved: *mut c_void,
3601    pub QueryInterface:
3602        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3603    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3604    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3605    pub CreateInterfaceAsyncEventSource:
3606        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3607    pub GetInterfaceAsyncEventSource:
3608        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3609    pub CreateInterfaceAsyncPort:
3610        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3611    pub GetInterfaceAsyncPort:
3612        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3613    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3614    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3615    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3616    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3617    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3618    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3619    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3620    pub GetDeviceReleaseNumber:
3621        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3622    pub GetConfigurationValue:
3623        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3624    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3625    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3626    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3627    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3628    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3629    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3630    pub GetBusFrameNumber:
3631        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3632    pub ControlRequest:
3633        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3634    pub ControlRequestAsync: Option<
3635        unsafe extern "C-unwind" fn(
3636            *mut c_void,
3637            u8,
3638            *mut IOUSBDevRequest,
3639            IOAsyncCallback1,
3640            *mut c_void,
3641        ) -> IOReturn,
3642    >,
3643    pub GetPipeProperties: Option<
3644        unsafe extern "C-unwind" fn(
3645            *mut c_void,
3646            u8,
3647            *mut u8,
3648            *mut u8,
3649            *mut u8,
3650            *mut u16,
3651            *mut u8,
3652        ) -> IOReturn,
3653    >,
3654    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3655    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3656    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3657    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3658    pub ReadPipe:
3659        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3660    pub WritePipe:
3661        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3662    pub ReadPipeAsync: Option<
3663        unsafe extern "C-unwind" fn(
3664            *mut c_void,
3665            u8,
3666            *mut c_void,
3667            u32,
3668            IOAsyncCallback1,
3669            *mut c_void,
3670        ) -> IOReturn,
3671    >,
3672    pub WritePipeAsync: Option<
3673        unsafe extern "C-unwind" fn(
3674            *mut c_void,
3675            u8,
3676            *mut c_void,
3677            u32,
3678            IOAsyncCallback1,
3679            *mut c_void,
3680        ) -> IOReturn,
3681    >,
3682    pub ReadIsochPipeAsync: Option<
3683        unsafe extern "C-unwind" fn(
3684            *mut c_void,
3685            u8,
3686            *mut c_void,
3687            u64,
3688            u32,
3689            *mut IOUSBIsocFrame,
3690            IOAsyncCallback1,
3691            *mut c_void,
3692        ) -> IOReturn,
3693    >,
3694    pub WriteIsochPipeAsync: Option<
3695        unsafe extern "C-unwind" fn(
3696            *mut c_void,
3697            u8,
3698            *mut c_void,
3699            u64,
3700            u32,
3701            *mut IOUSBIsocFrame,
3702            IOAsyncCallback1,
3703            *mut c_void,
3704        ) -> IOReturn,
3705    >,
3706    pub ControlRequestTO:
3707        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3708    pub ControlRequestAsyncTO: Option<
3709        unsafe extern "C-unwind" fn(
3710            *mut c_void,
3711            u8,
3712            *mut IOUSBDevRequestTO,
3713            IOAsyncCallback1,
3714            *mut c_void,
3715        ) -> IOReturn,
3716    >,
3717    pub ReadPipeTO: Option<
3718        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3719    >,
3720    pub WritePipeTO: Option<
3721        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3722    >,
3723    pub ReadPipeAsyncTO: Option<
3724        unsafe extern "C-unwind" fn(
3725            *mut c_void,
3726            u8,
3727            *mut c_void,
3728            u32,
3729            u32,
3730            u32,
3731            IOAsyncCallback1,
3732            *mut c_void,
3733        ) -> IOReturn,
3734    >,
3735    pub WritePipeAsyncTO: Option<
3736        unsafe extern "C-unwind" fn(
3737            *mut c_void,
3738            u8,
3739            *mut c_void,
3740            u32,
3741            u32,
3742            u32,
3743            IOAsyncCallback1,
3744            *mut c_void,
3745        ) -> IOReturn,
3746    >,
3747    pub USBInterfaceGetStringIndex:
3748        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3749    /// Opens the IOUSBInterface for exclusive access.
3750    ///
3751    /// If another client has the device open, an attempt is made to get that client to close it before
3752    /// returning.
3753    ///
3754    /// Before the client can issue commands that change the state of the device, it must have succeeded
3755    /// in opening the device. This establishes an exclusive link between the clients task and the actual
3756    /// device.
3757    /// Availability: This function is only available with IOUSBInterfaceInterface183 and above.
3758    ///
3759    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
3760    ///
3761    /// Returns: Returns kIOReturnExclusiveAccess if some other task has the interface open already and refuses to
3762    /// close it, kIOReturnError if the connection with the kernel cannot be established or kIOReturnSuccess
3763    /// if successful.
3764    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3765}
3766
3767#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3768unsafe impl Encode for IOUSBInterfaceStruct183 {
3769    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct183", &[
3770        <*mut c_void>::ENCODING,
3771        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
3772        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3773        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
3774        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
3775        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
3776        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
3777        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
3778        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3779        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3780        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3781        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3782        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3783        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3784        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3785        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
3786        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3787        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3788        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3789        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3790        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3791        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
3792        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3793        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
3794        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
3795        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3796        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
3797        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3798        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3799        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3800        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
3801        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
3802        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
3803        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3804        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3805        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3806        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3807        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
3808        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3809        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
3810        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
3811        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3812        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
3813        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
3814        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
3815    ]);
3816}
3817
3818#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
3819unsafe impl RefEncode for IOUSBInterfaceStruct183 {
3820    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3821}
3822
3823/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3824/// version 1.8.3 and above.
3825///
3826/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3827/// IOUSBInterfaceInterface182, and some new functions that are available on Mac OS X version 10.1
3828/// and later.
3829/// Super: IOUSBInterfaceInterface182
3830///
3831/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface183?language=objc)
3832#[cfg(all(feature = "USB", feature = "libc"))]
3833pub type IOUSBInterfaceInterface183 = IOUSBInterfaceStruct183;
3834
3835/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
3836/// version 1.9 and above.
3837///
3838/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
3839/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, and some new functions that are available
3840/// on Mac OS X version 10.2 and later.
3841/// Super: IOUSBInterfaceInterface183
3842///
3843/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct190?language=objc)
3844#[cfg(all(feature = "USB", feature = "libc"))]
3845#[repr(C)]
3846#[derive(Clone, Copy, Debug, PartialEq)]
3847pub struct IOUSBInterfaceStruct190 {
3848    pub(crate) _reserved: *mut c_void,
3849    pub QueryInterface:
3850        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
3851    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3852    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
3853    pub CreateInterfaceAsyncEventSource:
3854        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
3855    pub GetInterfaceAsyncEventSource:
3856        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
3857    pub CreateInterfaceAsyncPort:
3858        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
3859    pub GetInterfaceAsyncPort:
3860        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
3861    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3862    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3863    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3864    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3865    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3866    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3867    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3868    pub GetDeviceReleaseNumber:
3869        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
3870    pub GetConfigurationValue:
3871        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3872    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3873    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3874    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3875    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
3876    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
3877    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3878    pub GetBusFrameNumber:
3879        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
3880    pub ControlRequest:
3881        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
3882    pub ControlRequestAsync: Option<
3883        unsafe extern "C-unwind" fn(
3884            *mut c_void,
3885            u8,
3886            *mut IOUSBDevRequest,
3887            IOAsyncCallback1,
3888            *mut c_void,
3889        ) -> IOReturn,
3890    >,
3891    pub GetPipeProperties: Option<
3892        unsafe extern "C-unwind" fn(
3893            *mut c_void,
3894            u8,
3895            *mut u8,
3896            *mut u8,
3897            *mut u8,
3898            *mut u16,
3899            *mut u8,
3900        ) -> IOReturn,
3901    >,
3902    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3903    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3904    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3905    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
3906    pub ReadPipe:
3907        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
3908    pub WritePipe:
3909        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
3910    pub ReadPipeAsync: Option<
3911        unsafe extern "C-unwind" fn(
3912            *mut c_void,
3913            u8,
3914            *mut c_void,
3915            u32,
3916            IOAsyncCallback1,
3917            *mut c_void,
3918        ) -> IOReturn,
3919    >,
3920    pub WritePipeAsync: Option<
3921        unsafe extern "C-unwind" fn(
3922            *mut c_void,
3923            u8,
3924            *mut c_void,
3925            u32,
3926            IOAsyncCallback1,
3927            *mut c_void,
3928        ) -> IOReturn,
3929    >,
3930    pub ReadIsochPipeAsync: Option<
3931        unsafe extern "C-unwind" fn(
3932            *mut c_void,
3933            u8,
3934            *mut c_void,
3935            u64,
3936            u32,
3937            *mut IOUSBIsocFrame,
3938            IOAsyncCallback1,
3939            *mut c_void,
3940        ) -> IOReturn,
3941    >,
3942    pub WriteIsochPipeAsync: Option<
3943        unsafe extern "C-unwind" fn(
3944            *mut c_void,
3945            u8,
3946            *mut c_void,
3947            u64,
3948            u32,
3949            *mut IOUSBIsocFrame,
3950            IOAsyncCallback1,
3951            *mut c_void,
3952        ) -> IOReturn,
3953    >,
3954    pub ControlRequestTO:
3955        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
3956    pub ControlRequestAsyncTO: Option<
3957        unsafe extern "C-unwind" fn(
3958            *mut c_void,
3959            u8,
3960            *mut IOUSBDevRequestTO,
3961            IOAsyncCallback1,
3962            *mut c_void,
3963        ) -> IOReturn,
3964    >,
3965    pub ReadPipeTO: Option<
3966        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
3967    >,
3968    pub WritePipeTO: Option<
3969        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
3970    >,
3971    pub ReadPipeAsyncTO: Option<
3972        unsafe extern "C-unwind" fn(
3973            *mut c_void,
3974            u8,
3975            *mut c_void,
3976            u32,
3977            u32,
3978            u32,
3979            IOAsyncCallback1,
3980            *mut c_void,
3981        ) -> IOReturn,
3982    >,
3983    pub WritePipeAsyncTO: Option<
3984        unsafe extern "C-unwind" fn(
3985            *mut c_void,
3986            u8,
3987            *mut c_void,
3988            u32,
3989            u32,
3990            u32,
3991            IOAsyncCallback1,
3992            *mut c_void,
3993        ) -> IOReturn,
3994    >,
3995    pub USBInterfaceGetStringIndex:
3996        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
3997    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
3998    /// Equivalent to ClearPipeStall.
3999    ///
4000    /// This function is equivalent to ClearPipeStall except that it also attempts to clear the halt and
4001    /// toggle bits on the device's endpoint for the pipe by sending a ClearFeature(ENDPOINT_HALT) to the
4002    /// default control pipe in the device, specifying the endpoint for the pipe represented by pipeRef. For
4003    /// most devices, this resynchronizes the data toggle between the two endpoints to ensure that there is
4004    /// no loss of data.
4005    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4006    ///
4007    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4008    ///
4009    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4010    ///
4011    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4012    /// kIOReturnNotOpen if the interface is not open for exclusive access.
4013    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4014    /// Changes the amount of bandwidth of an isochronous pipe or interrupt pipe, or the polling interval of an interrupt pipe.
4015    ///
4016    /// A pipe may be made smaller or larger (up to the maxPacketSize specified in the endpoint descriptor).
4017    /// When an interface is first opened, all pipes are created with their descriptor-supplied maxPacketSize.
4018    /// For isochronous or interrupt pipes, if there is not enough bandwidth on the bus to allocate to the pipe, the pipe
4019    /// is created with a reserved bandwidth of zero. Any attempts to transfer data on a pipe with zero
4020    /// bandwidth will result in a kIOReturnNoBandwidth error. The pipe must first be given some bandwidth
4021    /// using this call.  This can also be used to return bandwidth for an isochronous or an interrupt pipe.  If the driver
4022    /// knows that the device will not be sending the maxPacketSize data, it can use this call to return that unused bandwidth to the
4023    /// system.  If an interrupt pipe wants to change the polling interval, it can do so with this call.
4024    ///
4025    /// The interface must be open for the pipe to exist.
4026    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4027    ///
4028    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4029    ///
4030    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4031    ///
4032    /// Parameter `maxPacketSize`: The desired size for the isochronous or interrupt pipe. For Full Speed endpoints and High Speed endpoints which
4033    /// are not High Bandwidth (i.e. only a single packet is transferred in a microframe), valid values are 0 through the maxPacketSize
4034    /// defined in the endpoint descriptor. For High Speed High Bandwidth (i.e. 2 or 3 packets transferred in a microframe) and Super Speed endpoints,
4035    /// valid values are 0 and the maxPacketSize of the endpoint. The maxPacketSize of the endpoint is calculated as the base maxPacketSize
4036    /// 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
4037    /// maintains the handle for the pipe but unreserves any bandwidth on the bus.
4038    ///
4039    /// Parameter `maxInterval`: applies only to interrupt endpoints. maxInterval has the same value as the bInterval field of the endpoint.
4040    /// For Low Speed and Full Speed interrupt endpoints, it is the desired polling interval in milliseconds, up to a maximum of 128 ms.
4041    /// The system can only poll devices powers of 2 (1, 2, 4, 8, 16, 32, 64, or 128 ms).
4042    /// For High Speed and Super Speed endpoints, maxInterval is used as an exponent for a (2 ^ (maxInterval-1)) value representing the number
4043    /// of 125uS microframes between service intervals. See the USB 2.0 and the USB 3.0 specifications for more info. The lower layers may
4044    /// schedule the endpoint for service at an interval value equal to or less than the value specified. A value of 0 is illegal.
4045    ///
4046    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4047    /// kIOReturnNotOpen if the interface is not open for exclusive access.  May also return kIOReturnNoBandwidth
4048    /// if there is not enough bandwidth available on the bus, or kIOReturnBadArgument if the desired
4049    /// maxPacketSize is outside of the allowed range.
4050    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4051    /// Returns the amount of bandwidth available on the bus for allocation to
4052    /// 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
4053    /// speed device, it will be the number of bytes per frame (1ms)
4054    ///
4055    /// This function is useful for determining the correct AltInterface setting as well as for using
4056    /// SetPipePolicy.
4057    ///
4058    /// The interface does not have to be open to use this function.
4059    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4060    ///
4061    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4062    ///
4063    /// Parameter `bandwidth`: Pointer to UInt32 to hold the amount of bandwidth available (in bytes per 1ms frame).
4064    ///
4065    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4066    pub GetBandwidthAvailable:
4067        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4068    /// Returns the transfer type, max packet size, and interval of a specified endpoint, whether or not
4069    /// the endpoint has a pipe currently established.
4070    ///
4071    /// This function may be useful for determining which alternate interface to select when trying to
4072    /// balance bandwidth allocations among isochronous pipes.
4073    ///
4074    /// The interface does not have to be open to use this function.
4075    /// Availability: This function is only available with IOUSBInterfaceInterface190 and above.
4076    ///
4077    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4078    ///
4079    /// Parameter `alternateSetting`: Specifies the alternate setting within the current interface.
4080    ///
4081    /// Parameter `endpointNumber`: Specifies the desired endpoint number.
4082    ///
4083    /// Parameter `direction`: Specifies the desired direction.
4084    ///
4085    /// Parameter `transferType`: Pointer to UInt8 to hold the endpoint's transfer type (kUSBControl, kUSBIsoc, etc).
4086    ///
4087    /// Parameter `maxPacketSize`: Pointer to UInt16 to hold the maxPacketSize of the endpoint.
4088    ///
4089    /// Parameter `interval`: Pointer to UInt8 to hold the polling interval for interrupt endpoints.
4090    ///
4091    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4092    pub GetEndpointProperties: Option<
4093        unsafe extern "C-unwind" fn(
4094            *mut c_void,
4095            u8,
4096            u8,
4097            u8,
4098            *mut u8,
4099            *mut u16,
4100            *mut u8,
4101        ) -> IOReturn,
4102    >,
4103}
4104
4105#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4106unsafe impl Encode for IOUSBInterfaceStruct190 {
4107    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct190", &[
4108        <*mut c_void>::ENCODING,
4109        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4110        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4111        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4112        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4113        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4114        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4115        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4116        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4117        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4118        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4119        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4120        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4121        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4122        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4123        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4124        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4125        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4126        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4127        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4128        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4129        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4130        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4131        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4132        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4133        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4134        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4135        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4136        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4137        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4138        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4139        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4140        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4141        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4142        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4143        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4144        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4145        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4146        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4147        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
4148        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
4149        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4150        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4151        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4152        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> 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,u16,u8,) -> IOReturn>>::ENCODING,
4155        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4156        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4157    ]);
4158}
4159
4160#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4161unsafe impl RefEncode for IOUSBInterfaceStruct190 {
4162    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4163}
4164
4165/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4166/// version 1.9 and above.
4167///
4168/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4169/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, and some new functions that are available
4170/// on Mac OS X version 10.2 and later.
4171/// Super: IOUSBInterfaceInterface183
4172///
4173/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface190?language=objc)
4174#[cfg(all(feature = "USB", feature = "libc"))]
4175pub type IOUSBInterfaceInterface190 = IOUSBInterfaceStruct190;
4176
4177/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4178/// version 1.9.2 and above.
4179///
4180/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4181/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, and some new
4182/// functions that are available on Mac OS X version 10.2.3 and later.
4183/// Super: IOUSBInterfaceInterface190
4184///
4185/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct192?language=objc)
4186#[cfg(all(feature = "USB", feature = "libc"))]
4187#[repr(C)]
4188#[derive(Clone, Copy, Debug, PartialEq)]
4189pub struct IOUSBInterfaceStruct192 {
4190    pub(crate) _reserved: *mut c_void,
4191    pub QueryInterface:
4192        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
4193    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4194    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4195    pub CreateInterfaceAsyncEventSource:
4196        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
4197    pub GetInterfaceAsyncEventSource:
4198        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
4199    pub CreateInterfaceAsyncPort:
4200        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
4201    pub GetInterfaceAsyncPort:
4202        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
4203    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4204    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4205    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4206    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4207    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4208    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4209    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4210    pub GetDeviceReleaseNumber:
4211        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4212    pub GetConfigurationValue:
4213        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4214    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4215    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4216    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4217    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4218    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
4219    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4220    pub GetBusFrameNumber:
4221        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4222    pub ControlRequest:
4223        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
4224    pub ControlRequestAsync: Option<
4225        unsafe extern "C-unwind" fn(
4226            *mut c_void,
4227            u8,
4228            *mut IOUSBDevRequest,
4229            IOAsyncCallback1,
4230            *mut c_void,
4231        ) -> IOReturn,
4232    >,
4233    pub GetPipeProperties: Option<
4234        unsafe extern "C-unwind" fn(
4235            *mut c_void,
4236            u8,
4237            *mut u8,
4238            *mut u8,
4239            *mut u8,
4240            *mut u16,
4241            *mut u8,
4242        ) -> IOReturn,
4243    >,
4244    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4245    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4246    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4247    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4248    pub ReadPipe:
4249        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
4250    pub WritePipe:
4251        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
4252    pub ReadPipeAsync: Option<
4253        unsafe extern "C-unwind" fn(
4254            *mut c_void,
4255            u8,
4256            *mut c_void,
4257            u32,
4258            IOAsyncCallback1,
4259            *mut c_void,
4260        ) -> IOReturn,
4261    >,
4262    pub WritePipeAsync: Option<
4263        unsafe extern "C-unwind" fn(
4264            *mut c_void,
4265            u8,
4266            *mut c_void,
4267            u32,
4268            IOAsyncCallback1,
4269            *mut c_void,
4270        ) -> IOReturn,
4271    >,
4272    pub ReadIsochPipeAsync: Option<
4273        unsafe extern "C-unwind" fn(
4274            *mut c_void,
4275            u8,
4276            *mut c_void,
4277            u64,
4278            u32,
4279            *mut IOUSBIsocFrame,
4280            IOAsyncCallback1,
4281            *mut c_void,
4282        ) -> IOReturn,
4283    >,
4284    pub WriteIsochPipeAsync: Option<
4285        unsafe extern "C-unwind" fn(
4286            *mut c_void,
4287            u8,
4288            *mut c_void,
4289            u64,
4290            u32,
4291            *mut IOUSBIsocFrame,
4292            IOAsyncCallback1,
4293            *mut c_void,
4294        ) -> IOReturn,
4295    >,
4296    pub ControlRequestTO:
4297        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
4298    pub ControlRequestAsyncTO: Option<
4299        unsafe extern "C-unwind" fn(
4300            *mut c_void,
4301            u8,
4302            *mut IOUSBDevRequestTO,
4303            IOAsyncCallback1,
4304            *mut c_void,
4305        ) -> IOReturn,
4306    >,
4307    pub ReadPipeTO: Option<
4308        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
4309    >,
4310    pub WritePipeTO: Option<
4311        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
4312    >,
4313    pub ReadPipeAsyncTO: Option<
4314        unsafe extern "C-unwind" fn(
4315            *mut c_void,
4316            u8,
4317            *mut c_void,
4318            u32,
4319            u32,
4320            u32,
4321            IOAsyncCallback1,
4322            *mut c_void,
4323        ) -> IOReturn,
4324    >,
4325    pub WritePipeAsyncTO: Option<
4326        unsafe extern "C-unwind" fn(
4327            *mut c_void,
4328            u8,
4329            *mut c_void,
4330            u32,
4331            u32,
4332            u32,
4333            IOAsyncCallback1,
4334            *mut c_void,
4335        ) -> IOReturn,
4336    >,
4337    pub USBInterfaceGetStringIndex:
4338        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4339    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4340    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4341    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4342    pub GetBandwidthAvailable:
4343        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4344    pub GetEndpointProperties: Option<
4345        unsafe extern "C-unwind" fn(
4346            *mut c_void,
4347            u8,
4348            u8,
4349            u8,
4350            *mut u8,
4351            *mut u16,
4352            *mut u8,
4353        ) -> IOReturn,
4354    >,
4355    /// Performs an asynchronous read on a isochronous pipe and updates the frame list at primary interrupt time.
4356    ///
4357    /// The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync()
4358    /// calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync(). They differ in that the frame
4359    /// list data is updated at
4360    /// <em>
4361    /// primary interrupt time
4362    /// </em>
4363    /// . This means that the client can inspect the
4364    /// frStatus and frActCount fields as soon as the transaction completes, without having to wait for the
4365    /// callback to happen (depending on the value of updateFrequency). The callback will still happen when
4366    /// all the frames have been received.
4367    ///
4368    /// The client can specify how often the USB stack should update the frame list data by specifying the
4369    /// updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the
4370    /// frame list will be updated every updateFrequency milliseconds. If the value is 0, the
4371    /// frame list will only be updated once all the frames in the transfer have been received. For example,
4372    /// consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame
4373    /// list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will
4374    /// only be updated at the end of the transfer, after the 64 frames have been sent or received. The
4375    /// difference between using an update frequency of 0 and using the non-low latency isoch calls is that
4376    /// in the former case, the frame list will be updated at primary interrupt time, while in the latter,
4377    /// it will be updated at secondary interrupt time. Regardless of the value of updateFrequency,
4378    /// the frame list will
4379    /// <em>
4380    /// always
4381    /// </em>
4382    /// be updated on the last frame of a transfer.
4383    ///
4384    /// The rationale for adding this call is that because completion routines run on the USB Workloop, they
4385    /// can be scheduled to run a number of milliseconds after the USB transfer has finished. This latency
4386    /// is variable and depends on what other higher priority threads are running on the system. This latency
4387    /// presents a problem for applications, such as audio processing, that depend on receiving data,
4388    /// processing it, and sending it back out, and need to do this as fast as possible. Since applications
4389    /// that use isochronous data know when the data should be available, they can look at the frame list at
4390    /// the expected time and note the frActCount and frStatus (and frTimeStamp
4391    /// if needed) and determine how many valid bytes are in their data buffer and whether there was an
4392    /// error. They can then access their data buffer and process the actual data.
4393    ///
4394    /// In order to update the frame list at primary interrupt time and to allow the client to see that
4395    /// update, the frame list buffer needs to be shared between the kernel and user space. The same thing
4396    /// applies to the data buffer. This is a difference between the low latency isoch calls and the regular
4397    /// isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The
4398    /// client
4399    /// <em>
4400    /// must
4401    /// </em>
4402    /// use that call to allocate the data and the frame list buffers. The client can
4403    /// pass a portion of the buffer that was previously allocated. The USB stack will range-check the data
4404    /// and frame list buffers to make sure they are within the ranges of the buffers previously allocated.
4405    /// This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to
4406    /// the read or write calls. The same applies to the frame list buffers. Of course, the client can also
4407    /// pre-allocate several data buffers and several frame list buffers and use those for each transfer.
4408    /// Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are
4409    /// finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was
4410    /// created with LowLatencyCreateBuffer().
4411    ///
4412    /// The interface must be open for the pipe to exist. The buf pointer and the frameList
4413    /// pointer need to be pre-allocated using LowLatencyCreateBuffer().
4414    /// After using them, they should be freed using LowLatencyDestroyBuffer().
4415    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4416    ///
4417    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4418    ///
4419    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4420    ///
4421    /// Parameter `buf`: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
4422    /// using a kUSBLowLatencyReadBuffer type.
4423    ///
4424    /// Parameter `frameStart`: The bus frame number on which to start the read (obtained from GetBusFrameNumber).
4425    ///
4426    /// Parameter `numFrames`: The number of frames for which to transfer data.
4427    ///
4428    /// Parameter `updateFrequency`: Specifies how often, in milliseconds, the frame list data should be updated. Valid
4429    /// range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
4430    ///
4431    /// Parameter `frameList`: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
4432    ///
4433    /// 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
4434    /// the Async port upon completion.
4435    ///
4436    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
4437    ///
4438    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4439    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated
4440    /// or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were
4441    /// not previously allocated using LowLatencyCreateBuffer().
4442    pub LowLatencyReadIsochPipeAsync: Option<
4443        unsafe extern "C-unwind" fn(
4444            *mut c_void,
4445            u8,
4446            *mut c_void,
4447            u64,
4448            u32,
4449            u32,
4450            *mut IOUSBLowLatencyIsocFrame,
4451            IOAsyncCallback1,
4452            *mut c_void,
4453        ) -> IOReturn,
4454    >,
4455    /// Performs an asynchronous write on an isochronous pipe and updates the frame list at primary interrupt time.
4456    ///
4457    /// The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync()
4458    /// calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync().
4459    /// They differ in that the frame list data is updated at
4460    /// <em>
4461    /// primary interrupt time
4462    /// </em>
4463    /// . This means that
4464    /// the client can inspect the frStatus and frActCount fields as soon as the
4465    /// transaction completes, without having to wait for the callback to happen (depending on the value of
4466    /// updateFrequency). The callback will still happen when the all the frames have been received.
4467    ///
4468    /// The client can specify how often the USB stack should update the frame list data by specifying the
4469    /// updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the
4470    /// frame list will be updated every updateFrequency milliseconds. If the value is 0, the
4471    /// frame list will only be updated once all the frames in the transfer have been received. For example,
4472    /// consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame
4473    /// list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will
4474    /// only be updated at the end of the transfer, after the 64 frames have been sent or received. The
4475    /// difference between using an update frequency of 0 and using the non-low latency isoch calls is that
4476    /// in the former case, the frame list will be updated at primary interrupt time, while in the latter,
4477    /// it will be updated at secondary interrupt time. Regardless of the value of updateFrequency,
4478    /// the frame list will
4479    /// <em>
4480    /// always
4481    /// </em>
4482    /// be updated on the last frame of a transfer.
4483    ///
4484    /// The rationale for adding this call is that because completion routines run on the USB Workloop,
4485    /// they can be scheduled to run a number of milliseconds after the USB transfer has finished. This
4486    /// latency is variable and depends on what other higher priority threads are running on the system.
4487    /// This latency presents a problem for applications, such as audio processing, that depend on receiving
4488    /// data, processing it, and sending it back out, and need to do this as fast as possible. Since applications
4489    /// that use isochronous data know when the data should be available, they can look at the frame list at
4490    /// the expected time and note the frActCount and frStatus (and frTimeStamp
4491    /// if needed) and determine how many valid bytes are in their data buffer and whether there was an error.
4492    /// They can then access their data buffer and process the actual data.
4493    ///
4494    /// In order to update the frame list at primary interrupt time and to allow the client to see that
4495    /// update, the frame list buffer needs to be shared between the kernel and user space. The same thing
4496    /// applies to the data buffer. This is a difference between the low latency isoch calls and the regular
4497    /// isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The
4498    /// <em>
4499    /// client
4500    /// </em>
4501    /// must use that call to allocate the data and the frame list buffers. The client can
4502    /// pass a portion of the buffer that was previously allocated. The USB stack will range-check the data
4503    /// and frame list buffers to make sure they are within the ranges of the buffers previously allocated.
4504    /// This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to
4505    /// the read or write calls. The same applies to the frame list buffers. Of course, the client can also
4506    /// pre-allocate several data buffers and several frame list buffers and use those for each transfer.
4507    /// Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are
4508    /// finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was
4509    /// created with LowLatencyCreateBuffer().
4510    ///
4511    /// The interface must be open for the pipe to exist. The buf pointer and the frameList
4512    /// pointer need to be pre-allocated using LowLatencyCreateBuffer(). After using them, they
4513    /// should be freed using LowLatencyDestroyBuffer().
4514    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4515    ///
4516    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4517    ///
4518    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
4519    ///
4520    /// Parameter `buf`: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
4521    /// using a kUSBLowLatencyWriteBuffer type.
4522    ///
4523    /// Parameter `frameStart`: The bus frame number on which to start the write (obtained from GetBusFrameNumber).
4524    ///
4525    /// Parameter `numFrames`: The number of frames for which to transfer data.
4526    ///
4527    /// Parameter `updateFrequency`: Specifies how often, in milliseconds, should the frame list data be updated. Valid
4528    /// range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
4529    ///
4530    /// Parameter `frameList`: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
4531    ///
4532    /// 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
4533    /// the Async port upon completion.
4534    ///
4535    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
4536    ///
4537    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4538    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated
4539    /// or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were
4540    /// not previously allocated using LowLatencyCreateBuffer().
4541    pub LowLatencyWriteIsochPipeAsync: Option<
4542        unsafe extern "C-unwind" fn(
4543            *mut c_void,
4544            u8,
4545            *mut c_void,
4546            u64,
4547            u32,
4548            u32,
4549            *mut IOUSBLowLatencyIsocFrame,
4550            IOAsyncCallback1,
4551            *mut c_void,
4552        ) -> IOReturn,
4553    >,
4554    /// Allocates a buffer of type bufferType.
4555    ///
4556    /// This function allocates a buffer of type bufferType. The buffer can then be used with
4557    /// the LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls.
4558    ///
4559    /// The LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls
4560    /// require the clients to pre-allocate the data buffer and the frame list buffer parameters. This call
4561    /// is used to allocate those buffers. After the client is done using the buffers, they need to be
4562    /// released through the LowLatencyDestroyBuffer() call.
4563    ///
4564    /// If the buffer is to be used for reading data, the type passed in should be kUSBLowLatencyReadBuffer.
4565    /// If the buffer is to be used for writing data, the type should be kUSBLowLatencyWriteBuffer. For
4566    /// frame list data, the type should be kUSBLowLatencyFrameListBuffer.
4567    ///
4568    /// The client can create multiple data and frame list buffers, or it can allocate a large buffer and
4569    /// then use only a portion of the buffer in calls to LowLatencyReadIsochPipeAsync()
4570    /// or LowLatencyWriteIsochPipeAsync().
4571    ///
4572    /// The interface must be open for the pipe to exist.
4573    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4574    ///
4575    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4576    ///
4577    /// Parameter `buffer`: Pointer to a pointer that will receive the pointer to the buffer created by this call.
4578    ///
4579    /// Parameter `size`: The size of the buffer to be created in bytes.
4580    ///
4581    /// Parameter `bufferType`: Type of buffer: one of kUSBLowLatencyWriteBuffer, kUSBLowLatencyReadBuffer,
4582    /// or kUSBLowLatencyFrameListBuffer. See the documentation for USB.h.
4583    ///
4584    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4585    /// kIOReturnNotOpen if the interface is not open for exclusive access.  If the buffer can't be allocated,
4586    /// it will return kIOReturnNoMemory.
4587    pub LowLatencyCreateBuffer: Option<
4588        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
4589    >,
4590    /// Releases a buffer that was previously allocated using LowLatencyCreateBuffer().
4591    ///
4592    /// The interface must be open for the pipe to exist.
4593    /// Availability: This function is only available with IOUSBInterfaceInterface192 and above.
4594    ///
4595    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4596    ///
4597    /// Parameter `buffer`: Pointer to the buffer previously allocated using LowLatencyCreateBuffer().
4598    ///
4599    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
4600    /// kIOReturnNotOpen if the interface is not open for exclusive access.  If the buffer was not previously
4601    /// allocated using LowLatencyCreateBuffer() it will return kIOReturnBadArgument.
4602    pub LowLatencyDestroyBuffer:
4603        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
4604}
4605
4606#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4607unsafe impl Encode for IOUSBInterfaceStruct192 {
4608    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct192", &[
4609        <*mut c_void>::ENCODING,
4610        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4611        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4612        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4613        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4614        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4615        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4616        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4617        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4618        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4620        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4621        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4622        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4623        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4624        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4625        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4626        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4627        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4628        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4629        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4630        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4631        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4632        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4633        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4634        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4635        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4636        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4637        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4638        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4639        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4640        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4641        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4642        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4643        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4644        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4645        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4646        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4647        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4648        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
4649        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
4650        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4651        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4652        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4653        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> 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,u16,u8,) -> IOReturn>>::ENCODING,
4656        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4657        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4658        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4659        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4660        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
4661        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
4662    ]);
4663}
4664
4665#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4666unsafe impl RefEncode for IOUSBInterfaceStruct192 {
4667    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4668}
4669
4670/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4671/// version 1.9.2 and above.
4672///
4673/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4674/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, and some new
4675/// functions that are available on Mac OS X version 10.2.3 and later.
4676/// Super: IOUSBInterfaceInterface190
4677///
4678/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface192?language=objc)
4679#[cfg(all(feature = "USB", feature = "libc"))]
4680pub type IOUSBInterfaceInterface192 = IOUSBInterfaceStruct192;
4681
4682/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
4683/// version 1.9.7 and above.
4684///
4685/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
4686/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
4687/// and some new functions that are available on Mac OS X version 10.2.5 and later.
4688/// Super: IOUSBInterfaceInterface192
4689///
4690/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct197?language=objc)
4691#[cfg(all(feature = "USB", feature = "libc"))]
4692#[repr(C)]
4693#[derive(Clone, Copy, Debug, PartialEq)]
4694pub struct IOUSBInterfaceStruct197 {
4695    pub(crate) _reserved: *mut c_void,
4696    pub QueryInterface:
4697        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
4698    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4699    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
4700    pub CreateInterfaceAsyncEventSource:
4701        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
4702    pub GetInterfaceAsyncEventSource:
4703        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
4704    pub CreateInterfaceAsyncPort:
4705        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
4706    pub GetInterfaceAsyncPort:
4707        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
4708    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4709    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4710    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4711    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4712    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4713    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4714    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4715    pub GetDeviceReleaseNumber:
4716        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
4717    pub GetConfigurationValue:
4718        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4719    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4720    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4721    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4722    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4723    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
4724    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4725    pub GetBusFrameNumber:
4726        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4727    pub ControlRequest:
4728        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
4729    pub ControlRequestAsync: Option<
4730        unsafe extern "C-unwind" fn(
4731            *mut c_void,
4732            u8,
4733            *mut IOUSBDevRequest,
4734            IOAsyncCallback1,
4735            *mut c_void,
4736        ) -> IOReturn,
4737    >,
4738    pub GetPipeProperties: Option<
4739        unsafe extern "C-unwind" fn(
4740            *mut c_void,
4741            u8,
4742            *mut u8,
4743            *mut u8,
4744            *mut u8,
4745            *mut u16,
4746            *mut u8,
4747        ) -> IOReturn,
4748    >,
4749    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4750    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4751    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4752    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4753    pub ReadPipe:
4754        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
4755    pub WritePipe:
4756        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
4757    pub ReadPipeAsync: Option<
4758        unsafe extern "C-unwind" fn(
4759            *mut c_void,
4760            u8,
4761            *mut c_void,
4762            u32,
4763            IOAsyncCallback1,
4764            *mut c_void,
4765        ) -> IOReturn,
4766    >,
4767    pub WritePipeAsync: Option<
4768        unsafe extern "C-unwind" fn(
4769            *mut c_void,
4770            u8,
4771            *mut c_void,
4772            u32,
4773            IOAsyncCallback1,
4774            *mut c_void,
4775        ) -> IOReturn,
4776    >,
4777    pub ReadIsochPipeAsync: Option<
4778        unsafe extern "C-unwind" fn(
4779            *mut c_void,
4780            u8,
4781            *mut c_void,
4782            u64,
4783            u32,
4784            *mut IOUSBIsocFrame,
4785            IOAsyncCallback1,
4786            *mut c_void,
4787        ) -> IOReturn,
4788    >,
4789    pub WriteIsochPipeAsync: Option<
4790        unsafe extern "C-unwind" fn(
4791            *mut c_void,
4792            u8,
4793            *mut c_void,
4794            u64,
4795            u32,
4796            *mut IOUSBIsocFrame,
4797            IOAsyncCallback1,
4798            *mut c_void,
4799        ) -> IOReturn,
4800    >,
4801    pub ControlRequestTO:
4802        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
4803    pub ControlRequestAsyncTO: Option<
4804        unsafe extern "C-unwind" fn(
4805            *mut c_void,
4806            u8,
4807            *mut IOUSBDevRequestTO,
4808            IOAsyncCallback1,
4809            *mut c_void,
4810        ) -> IOReturn,
4811    >,
4812    pub ReadPipeTO: Option<
4813        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
4814    >,
4815    pub WritePipeTO: Option<
4816        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
4817    >,
4818    pub ReadPipeAsyncTO: Option<
4819        unsafe extern "C-unwind" fn(
4820            *mut c_void,
4821            u8,
4822            *mut c_void,
4823            u32,
4824            u32,
4825            u32,
4826            IOAsyncCallback1,
4827            *mut c_void,
4828        ) -> IOReturn,
4829    >,
4830    pub WritePipeAsyncTO: Option<
4831        unsafe extern "C-unwind" fn(
4832            *mut c_void,
4833            u8,
4834            *mut c_void,
4835            u32,
4836            u32,
4837            u32,
4838            IOAsyncCallback1,
4839            *mut c_void,
4840        ) -> IOReturn,
4841    >,
4842    pub USBInterfaceGetStringIndex:
4843        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
4844    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
4845    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
4846    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
4847    pub GetBandwidthAvailable:
4848        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4849    pub GetEndpointProperties: Option<
4850        unsafe extern "C-unwind" fn(
4851            *mut c_void,
4852            u8,
4853            u8,
4854            u8,
4855            *mut u8,
4856            *mut u16,
4857            *mut u8,
4858        ) -> IOReturn,
4859    >,
4860    pub LowLatencyReadIsochPipeAsync: Option<
4861        unsafe extern "C-unwind" fn(
4862            *mut c_void,
4863            u8,
4864            *mut c_void,
4865            u64,
4866            u32,
4867            u32,
4868            *mut IOUSBLowLatencyIsocFrame,
4869            IOAsyncCallback1,
4870            *mut c_void,
4871        ) -> IOReturn,
4872    >,
4873    pub LowLatencyWriteIsochPipeAsync: Option<
4874        unsafe extern "C-unwind" fn(
4875            *mut c_void,
4876            u8,
4877            *mut c_void,
4878            u64,
4879            u32,
4880            u32,
4881            *mut IOUSBLowLatencyIsocFrame,
4882            IOAsyncCallback1,
4883            *mut c_void,
4884        ) -> IOReturn,
4885    >,
4886    pub LowLatencyCreateBuffer: Option<
4887        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
4888    >,
4889    pub LowLatencyDestroyBuffer:
4890        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
4891    /// Gets the current micro frame number of the bus to which the interface and its device are attached.
4892    ///
4893    /// The interface does not have to be open to use this function.
4894    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4895    ///
4896    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4897    ///
4898    /// Parameter `microFrame`: Pointer to UInt64 to hold the microrame number.
4899    ///
4900    /// Parameter `atTime`: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus frame number
4901    /// was attained.
4902    ///
4903    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4904    pub GetBusMicroFrameNumber:
4905        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
4906    /// Returns the number of microseconds in each USB Frame.
4907    ///
4908    /// This function can be used to determine whether the device is functioning in full speed or a high
4909    /// speed. In the case of a full speed device, the returned value will be kUSBFullSpeedMicrosecondsInFrame.
4910    /// In the case of a high speed device, the return value will be kUSBHighSpeedMicrosecondsInFrame.
4911    /// (This API should really be called GetUSBFrameTime).
4912    ///
4913    /// The interface does not have to be open to use this function.
4914    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4915    ///
4916    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4917    ///
4918    /// Parameter `microsecondsInFrame`: Pointer to UInt32 to hold the number of microseconds in each USB frame.
4919    ///
4920    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4921    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
4922    /// Returns the version of the IOUSBLib and the version of the IOUSBFamily.
4923    ///
4924    /// The interface does not have to be open to use this function.
4925    /// Availability: This function is only available with IOUSBInterfaceInterface197 and above.
4926    ///
4927    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
4928    ///
4929    /// Parameter `ioUSBLibVersion`: Pointer to a NumVersion structure that on return will contain
4930    /// the version of the IOUSBLib.
4931    ///
4932    /// Parameter `usbFamilyVersion`: Pointer to a NumVersion structure that on return will contain
4933    /// the version of the IOUSBFamily.
4934    ///
4935    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
4936    pub GetIOUSBLibVersion: Option<
4937        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
4938    >,
4939}
4940
4941#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
4942unsafe impl Encode for IOUSBInterfaceStruct197 {
4943    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct197", &[
4944        <*mut c_void>::ENCODING,
4945        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
4946        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4947        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
4948        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
4949        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
4950        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
4951        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
4952        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4953        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
4954        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4955        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4956        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4957        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4958        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4959        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
4960        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4961        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4962        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4963        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4964        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4965        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
4966        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4967        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4968        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
4969        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4970        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4971        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4972        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4973        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4974        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
4975        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4976        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
4977        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4978        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4979        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4980        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4981        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
4982        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4983        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
4984        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
4985        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4986        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4987        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
4988        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> 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,u16,u8,) -> IOReturn>>::ENCODING,
4991        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4992        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
4993        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4994        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
4995        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
4996        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
4997        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
4998        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
4999        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5000    ]);
5001}
5002
5003#[cfg(all(feature = "USB", feature = "libc", feature = "objc2"))]
5004unsafe impl RefEncode for IOUSBInterfaceStruct197 {
5005    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5006}
5007
5008/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5009/// version 1.9.7 and above.
5010///
5011/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5012/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5013/// and some new functions that are available on Mac OS X version 10.2.5 and later.
5014/// Super: IOUSBInterfaceInterface192
5015///
5016/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface197?language=objc)
5017#[cfg(all(feature = "USB", feature = "libc"))]
5018pub type IOUSBInterfaceInterface197 = IOUSBInterfaceStruct197;
5019
5020/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5021/// version 2.2.0 and above.
5022///
5023/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5024/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192
5025/// and IOUSBInterfaceInterface197, as well as some new functions that are available on Mac OS X version 10.4 and later.
5026/// Super: IOUSBInterfaceInterface197
5027///
5028/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct220?language=objc)
5029#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5030#[repr(C)]
5031#[derive(Clone, Copy, Debug, PartialEq)]
5032pub struct IOUSBInterfaceStruct220 {
5033    pub(crate) _reserved: *mut c_void,
5034    pub QueryInterface:
5035        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5036    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5037    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5038    pub CreateInterfaceAsyncEventSource:
5039        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5040    pub GetInterfaceAsyncEventSource:
5041        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5042    pub CreateInterfaceAsyncPort:
5043        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5044    pub GetInterfaceAsyncPort:
5045        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5046    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5047    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5048    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5049    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5050    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5051    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5052    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5053    pub GetDeviceReleaseNumber:
5054        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5055    pub GetConfigurationValue:
5056        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5057    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5058    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5059    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5060    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5061    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5062    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5063    pub GetBusFrameNumber:
5064        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5065    pub ControlRequest:
5066        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5067    pub ControlRequestAsync: Option<
5068        unsafe extern "C-unwind" fn(
5069            *mut c_void,
5070            u8,
5071            *mut IOUSBDevRequest,
5072            IOAsyncCallback1,
5073            *mut c_void,
5074        ) -> IOReturn,
5075    >,
5076    pub GetPipeProperties: Option<
5077        unsafe extern "C-unwind" fn(
5078            *mut c_void,
5079            u8,
5080            *mut u8,
5081            *mut u8,
5082            *mut u8,
5083            *mut u16,
5084            *mut u8,
5085        ) -> IOReturn,
5086    >,
5087    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5088    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5089    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5090    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5091    pub ReadPipe:
5092        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5093    pub WritePipe:
5094        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5095    pub ReadPipeAsync: Option<
5096        unsafe extern "C-unwind" fn(
5097            *mut c_void,
5098            u8,
5099            *mut c_void,
5100            u32,
5101            IOAsyncCallback1,
5102            *mut c_void,
5103        ) -> IOReturn,
5104    >,
5105    pub WritePipeAsync: Option<
5106        unsafe extern "C-unwind" fn(
5107            *mut c_void,
5108            u8,
5109            *mut c_void,
5110            u32,
5111            IOAsyncCallback1,
5112            *mut c_void,
5113        ) -> IOReturn,
5114    >,
5115    pub ReadIsochPipeAsync: Option<
5116        unsafe extern "C-unwind" fn(
5117            *mut c_void,
5118            u8,
5119            *mut c_void,
5120            u64,
5121            u32,
5122            *mut IOUSBIsocFrame,
5123            IOAsyncCallback1,
5124            *mut c_void,
5125        ) -> IOReturn,
5126    >,
5127    pub WriteIsochPipeAsync: Option<
5128        unsafe extern "C-unwind" fn(
5129            *mut c_void,
5130            u8,
5131            *mut c_void,
5132            u64,
5133            u32,
5134            *mut IOUSBIsocFrame,
5135            IOAsyncCallback1,
5136            *mut c_void,
5137        ) -> IOReturn,
5138    >,
5139    pub ControlRequestTO:
5140        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5141    pub ControlRequestAsyncTO: Option<
5142        unsafe extern "C-unwind" fn(
5143            *mut c_void,
5144            u8,
5145            *mut IOUSBDevRequestTO,
5146            IOAsyncCallback1,
5147            *mut c_void,
5148        ) -> IOReturn,
5149    >,
5150    pub ReadPipeTO: Option<
5151        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5152    >,
5153    pub WritePipeTO: Option<
5154        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5155    >,
5156    pub ReadPipeAsyncTO: Option<
5157        unsafe extern "C-unwind" fn(
5158            *mut c_void,
5159            u8,
5160            *mut c_void,
5161            u32,
5162            u32,
5163            u32,
5164            IOAsyncCallback1,
5165            *mut c_void,
5166        ) -> IOReturn,
5167    >,
5168    pub WritePipeAsyncTO: Option<
5169        unsafe extern "C-unwind" fn(
5170            *mut c_void,
5171            u8,
5172            *mut c_void,
5173            u32,
5174            u32,
5175            u32,
5176            IOAsyncCallback1,
5177            *mut c_void,
5178        ) -> IOReturn,
5179    >,
5180    pub USBInterfaceGetStringIndex:
5181        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5182    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5183    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5184    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5185    pub GetBandwidthAvailable:
5186        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5187    pub GetEndpointProperties: Option<
5188        unsafe extern "C-unwind" fn(
5189            *mut c_void,
5190            u8,
5191            u8,
5192            u8,
5193            *mut u8,
5194            *mut u16,
5195            *mut u8,
5196        ) -> IOReturn,
5197    >,
5198    pub LowLatencyReadIsochPipeAsync: Option<
5199        unsafe extern "C-unwind" fn(
5200            *mut c_void,
5201            u8,
5202            *mut c_void,
5203            u64,
5204            u32,
5205            u32,
5206            *mut IOUSBLowLatencyIsocFrame,
5207            IOAsyncCallback1,
5208            *mut c_void,
5209        ) -> IOReturn,
5210    >,
5211    pub LowLatencyWriteIsochPipeAsync: Option<
5212        unsafe extern "C-unwind" fn(
5213            *mut c_void,
5214            u8,
5215            *mut c_void,
5216            u64,
5217            u32,
5218            u32,
5219            *mut IOUSBLowLatencyIsocFrame,
5220            IOAsyncCallback1,
5221            *mut c_void,
5222        ) -> IOReturn,
5223    >,
5224    pub LowLatencyCreateBuffer: Option<
5225        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5226    >,
5227    pub LowLatencyDestroyBuffer:
5228        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5229    pub GetBusMicroFrameNumber:
5230        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5231    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5232    pub GetIOUSBLibVersion: Option<
5233        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5234    >,
5235    /// Find the next descriptor of the requested type associated with the interface.
5236    ///
5237    /// The interface does not have to be open to use this function.
5238    /// Availability: This function is only available with IOUSBInterfaceInterface220 and above.
5239    ///
5240    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5241    ///
5242    /// Parameter `currentDescriptor`: Descriptor to start searching from, NULL to start from beginning of list.
5243    ///
5244    /// Parameter `descriptorType`: Descriptor type to search for, or kUSBAnyDesc to return any descriptor type.
5245    ///
5246    /// Returns: Pointer to the descriptor, or NULL if no matching descriptors found.
5247    pub FindNextAssociatedDescriptor: Option<
5248        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5249    >,
5250    /// return alternate interface descriptor satisfying the requirements specified in request, or NULL if there aren't any.
5251    /// discussion request is updated with the properties of the returned interface.
5252    ///
5253    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5254    ///
5255    /// Parameter `current`: interface descriptor to start searching from, NULL to start at alternate interface 0.
5256    ///
5257    /// Parameter `request`: specifies what properties an interface must have to match.
5258    ///
5259    /// Returns: Pointer to a matching interface descriptor, or NULL if none match.
5260    pub FindNextAltInterface: Option<
5261        unsafe extern "C-unwind" fn(
5262            *mut c_void,
5263            *const c_void,
5264            *mut IOUSBFindInterfaceRequest,
5265        ) -> *mut IOUSBDescriptorHeader,
5266    >,
5267}
5268
5269#[cfg(all(
5270    feature = "AppleUSBDefinitions",
5271    feature = "USB",
5272    feature = "libc",
5273    feature = "objc2"
5274))]
5275unsafe impl Encode for IOUSBInterfaceStruct220 {
5276    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct220", &[
5277        <*mut c_void>::ENCODING,
5278        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5279        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5280        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5281        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5282        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5283        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5284        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5285        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5286        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5287        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5288        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5289        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5290        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5291        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5292        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5293        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5294        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5295        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5296        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5297        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5298        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5299        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5300        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5301        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5302        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5303        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5304        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5305        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5306        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5307        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5308        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5309        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5310        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5311        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5312        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5313        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5314        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5315        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5316        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5317        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5318        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5319        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5320        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5321        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> 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,u16,u8,) -> IOReturn>>::ENCODING,
5324        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5325        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5326        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5327        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5328        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5329        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5330        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5331        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5332        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5333        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5334        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5335    ]);
5336}
5337
5338#[cfg(all(
5339    feature = "AppleUSBDefinitions",
5340    feature = "USB",
5341    feature = "libc",
5342    feature = "objc2"
5343))]
5344unsafe impl RefEncode for IOUSBInterfaceStruct220 {
5345    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5346}
5347
5348/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5349/// version 2.2.0 and above.
5350///
5351/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5352/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192
5353/// and IOUSBInterfaceInterface197, as well as some new functions that are available on Mac OS X version 10.4 and later.
5354/// Super: IOUSBInterfaceInterface197
5355///
5356/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface220?language=objc)
5357#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5358pub type IOUSBInterfaceInterface220 = IOUSBInterfaceStruct220;
5359
5360/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5361/// version 2.4.5 and above.
5362///
5363/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5364/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5365/// IOUSBInterfaceInterface197 and IOUSBInterfaceInterface220, as well as some new functions that are available on
5366/// Mac OS X version 10.4.6 and later.
5367/// Super: IOUSBInterfaceInterface220
5368///
5369/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct245?language=objc)
5370#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5371#[repr(C)]
5372#[derive(Clone, Copy, Debug, PartialEq)]
5373pub struct IOUSBInterfaceStruct245 {
5374    pub(crate) _reserved: *mut c_void,
5375    pub QueryInterface:
5376        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5377    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5378    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5379    pub CreateInterfaceAsyncEventSource:
5380        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5381    pub GetInterfaceAsyncEventSource:
5382        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5383    pub CreateInterfaceAsyncPort:
5384        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5385    pub GetInterfaceAsyncPort:
5386        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5387    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5388    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5389    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5390    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5391    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5392    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5393    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5394    pub GetDeviceReleaseNumber:
5395        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5396    pub GetConfigurationValue:
5397        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5398    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5399    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5400    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5401    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5402    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5403    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5404    pub GetBusFrameNumber:
5405        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5406    pub ControlRequest:
5407        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5408    pub ControlRequestAsync: Option<
5409        unsafe extern "C-unwind" fn(
5410            *mut c_void,
5411            u8,
5412            *mut IOUSBDevRequest,
5413            IOAsyncCallback1,
5414            *mut c_void,
5415        ) -> IOReturn,
5416    >,
5417    pub GetPipeProperties: Option<
5418        unsafe extern "C-unwind" fn(
5419            *mut c_void,
5420            u8,
5421            *mut u8,
5422            *mut u8,
5423            *mut u8,
5424            *mut u16,
5425            *mut u8,
5426        ) -> IOReturn,
5427    >,
5428    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5429    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5430    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5431    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5432    pub ReadPipe:
5433        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5434    pub WritePipe:
5435        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5436    pub ReadPipeAsync: Option<
5437        unsafe extern "C-unwind" fn(
5438            *mut c_void,
5439            u8,
5440            *mut c_void,
5441            u32,
5442            IOAsyncCallback1,
5443            *mut c_void,
5444        ) -> IOReturn,
5445    >,
5446    pub WritePipeAsync: Option<
5447        unsafe extern "C-unwind" fn(
5448            *mut c_void,
5449            u8,
5450            *mut c_void,
5451            u32,
5452            IOAsyncCallback1,
5453            *mut c_void,
5454        ) -> IOReturn,
5455    >,
5456    pub ReadIsochPipeAsync: Option<
5457        unsafe extern "C-unwind" fn(
5458            *mut c_void,
5459            u8,
5460            *mut c_void,
5461            u64,
5462            u32,
5463            *mut IOUSBIsocFrame,
5464            IOAsyncCallback1,
5465            *mut c_void,
5466        ) -> IOReturn,
5467    >,
5468    pub WriteIsochPipeAsync: Option<
5469        unsafe extern "C-unwind" fn(
5470            *mut c_void,
5471            u8,
5472            *mut c_void,
5473            u64,
5474            u32,
5475            *mut IOUSBIsocFrame,
5476            IOAsyncCallback1,
5477            *mut c_void,
5478        ) -> IOReturn,
5479    >,
5480    pub ControlRequestTO:
5481        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5482    pub ControlRequestAsyncTO: Option<
5483        unsafe extern "C-unwind" fn(
5484            *mut c_void,
5485            u8,
5486            *mut IOUSBDevRequestTO,
5487            IOAsyncCallback1,
5488            *mut c_void,
5489        ) -> IOReturn,
5490    >,
5491    pub ReadPipeTO: Option<
5492        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5493    >,
5494    pub WritePipeTO: Option<
5495        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5496    >,
5497    pub ReadPipeAsyncTO: Option<
5498        unsafe extern "C-unwind" fn(
5499            *mut c_void,
5500            u8,
5501            *mut c_void,
5502            u32,
5503            u32,
5504            u32,
5505            IOAsyncCallback1,
5506            *mut c_void,
5507        ) -> IOReturn,
5508    >,
5509    pub WritePipeAsyncTO: Option<
5510        unsafe extern "C-unwind" fn(
5511            *mut c_void,
5512            u8,
5513            *mut c_void,
5514            u32,
5515            u32,
5516            u32,
5517            IOAsyncCallback1,
5518            *mut c_void,
5519        ) -> IOReturn,
5520    >,
5521    pub USBInterfaceGetStringIndex:
5522        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5523    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5524    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5525    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5526    pub GetBandwidthAvailable:
5527        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5528    pub GetEndpointProperties: Option<
5529        unsafe extern "C-unwind" fn(
5530            *mut c_void,
5531            u8,
5532            u8,
5533            u8,
5534            *mut u8,
5535            *mut u16,
5536            *mut u8,
5537        ) -> IOReturn,
5538    >,
5539    pub LowLatencyReadIsochPipeAsync: Option<
5540        unsafe extern "C-unwind" fn(
5541            *mut c_void,
5542            u8,
5543            *mut c_void,
5544            u64,
5545            u32,
5546            u32,
5547            *mut IOUSBLowLatencyIsocFrame,
5548            IOAsyncCallback1,
5549            *mut c_void,
5550        ) -> IOReturn,
5551    >,
5552    pub LowLatencyWriteIsochPipeAsync: Option<
5553        unsafe extern "C-unwind" fn(
5554            *mut c_void,
5555            u8,
5556            *mut c_void,
5557            u64,
5558            u32,
5559            u32,
5560            *mut IOUSBLowLatencyIsocFrame,
5561            IOAsyncCallback1,
5562            *mut c_void,
5563        ) -> IOReturn,
5564    >,
5565    pub LowLatencyCreateBuffer: Option<
5566        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5567    >,
5568    pub LowLatencyDestroyBuffer:
5569        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5570    pub GetBusMicroFrameNumber:
5571        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5572    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5573    pub GetIOUSBLibVersion: Option<
5574        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5575    >,
5576    pub FindNextAssociatedDescriptor: Option<
5577        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5578    >,
5579    pub FindNextAltInterface: Option<
5580        unsafe extern "C-unwind" fn(
5581            *mut c_void,
5582            *const c_void,
5583            *mut IOUSBFindInterfaceRequest,
5584        ) -> *mut IOUSBDescriptorHeader,
5585    >,
5586}
5587
5588#[cfg(all(
5589    feature = "AppleUSBDefinitions",
5590    feature = "USB",
5591    feature = "libc",
5592    feature = "objc2"
5593))]
5594unsafe impl Encode for IOUSBInterfaceStruct245 {
5595    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct245", &[
5596        <*mut c_void>::ENCODING,
5597        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5598        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5599        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5600        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5601        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5602        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5603        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5604        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5605        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5606        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5607        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5608        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5609        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5610        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5611        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5612        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5613        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5614        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5615        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5616        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5617        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5620        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5621        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5622        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5623        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5624        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5625        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5626        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5627        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5628        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5629        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5630        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5631        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5632        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5633        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5634        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5635        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5636        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5637        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5638        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5639        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5640        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5641        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5642        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5643        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5644        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5645        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5646        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5647        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5648        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5649        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5650        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5651        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5652        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5653        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5654    ]);
5655}
5656
5657#[cfg(all(
5658    feature = "AppleUSBDefinitions",
5659    feature = "USB",
5660    feature = "libc",
5661    feature = "objc2"
5662))]
5663unsafe impl RefEncode for IOUSBInterfaceStruct245 {
5664    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
5665}
5666
5667/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5668/// version 2.4.5 and above.
5669///
5670/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5671/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5672/// IOUSBInterfaceInterface197 and IOUSBInterfaceInterface220, as well as some new functions that are available on
5673/// Mac OS X version 10.4.6 and later.
5674/// Super: IOUSBInterfaceInterface220
5675///
5676/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface245?language=objc)
5677#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5678pub type IOUSBInterfaceInterface245 = IOUSBInterfaceStruct245;
5679
5680/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
5681/// version 3.0.0 and above.
5682///
5683/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
5684/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
5685/// IOUSBInterfaceInterface197, IOUSBInterfaceInterface220 and IOUSBInterfaceInterface245, as well as some new functions
5686/// that are available on Mac OS X version 10.5 and later.
5687/// Super: IOUSBInterfaceInterface245
5688///
5689/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct300?language=objc)
5690#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
5691#[repr(C)]
5692#[derive(Clone, Copy, Debug, PartialEq)]
5693pub struct IOUSBInterfaceStruct300 {
5694    pub(crate) _reserved: *mut c_void,
5695    pub QueryInterface:
5696        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
5697    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5698    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
5699    pub CreateInterfaceAsyncEventSource:
5700        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
5701    pub GetInterfaceAsyncEventSource:
5702        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
5703    pub CreateInterfaceAsyncPort:
5704        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
5705    pub GetInterfaceAsyncPort:
5706        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
5707    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5708    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5709    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5710    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5711    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5712    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5713    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5714    pub GetDeviceReleaseNumber:
5715        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
5716    pub GetConfigurationValue:
5717        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5718    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5719    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5720    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5721    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5722    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
5723    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5724    pub GetBusFrameNumber:
5725        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5726    pub ControlRequest:
5727        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
5728    pub ControlRequestAsync: Option<
5729        unsafe extern "C-unwind" fn(
5730            *mut c_void,
5731            u8,
5732            *mut IOUSBDevRequest,
5733            IOAsyncCallback1,
5734            *mut c_void,
5735        ) -> IOReturn,
5736    >,
5737    pub GetPipeProperties: Option<
5738        unsafe extern "C-unwind" fn(
5739            *mut c_void,
5740            u8,
5741            *mut u8,
5742            *mut u8,
5743            *mut u8,
5744            *mut u16,
5745            *mut u8,
5746        ) -> IOReturn,
5747    >,
5748    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5749    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5750    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5751    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5752    pub ReadPipe:
5753        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
5754    pub WritePipe:
5755        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
5756    pub ReadPipeAsync: Option<
5757        unsafe extern "C-unwind" fn(
5758            *mut c_void,
5759            u8,
5760            *mut c_void,
5761            u32,
5762            IOAsyncCallback1,
5763            *mut c_void,
5764        ) -> IOReturn,
5765    >,
5766    pub WritePipeAsync: Option<
5767        unsafe extern "C-unwind" fn(
5768            *mut c_void,
5769            u8,
5770            *mut c_void,
5771            u32,
5772            IOAsyncCallback1,
5773            *mut c_void,
5774        ) -> IOReturn,
5775    >,
5776    pub ReadIsochPipeAsync: Option<
5777        unsafe extern "C-unwind" fn(
5778            *mut c_void,
5779            u8,
5780            *mut c_void,
5781            u64,
5782            u32,
5783            *mut IOUSBIsocFrame,
5784            IOAsyncCallback1,
5785            *mut c_void,
5786        ) -> IOReturn,
5787    >,
5788    pub WriteIsochPipeAsync: Option<
5789        unsafe extern "C-unwind" fn(
5790            *mut c_void,
5791            u8,
5792            *mut c_void,
5793            u64,
5794            u32,
5795            *mut IOUSBIsocFrame,
5796            IOAsyncCallback1,
5797            *mut c_void,
5798        ) -> IOReturn,
5799    >,
5800    pub ControlRequestTO:
5801        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
5802    pub ControlRequestAsyncTO: Option<
5803        unsafe extern "C-unwind" fn(
5804            *mut c_void,
5805            u8,
5806            *mut IOUSBDevRequestTO,
5807            IOAsyncCallback1,
5808            *mut c_void,
5809        ) -> IOReturn,
5810    >,
5811    pub ReadPipeTO: Option<
5812        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
5813    >,
5814    pub WritePipeTO: Option<
5815        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
5816    >,
5817    pub ReadPipeAsyncTO: Option<
5818        unsafe extern "C-unwind" fn(
5819            *mut c_void,
5820            u8,
5821            *mut c_void,
5822            u32,
5823            u32,
5824            u32,
5825            IOAsyncCallback1,
5826            *mut c_void,
5827        ) -> IOReturn,
5828    >,
5829    pub WritePipeAsyncTO: Option<
5830        unsafe extern "C-unwind" fn(
5831            *mut c_void,
5832            u8,
5833            *mut c_void,
5834            u32,
5835            u32,
5836            u32,
5837            IOAsyncCallback1,
5838            *mut c_void,
5839        ) -> IOReturn,
5840    >,
5841    pub USBInterfaceGetStringIndex:
5842        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
5843    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
5844    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
5845    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
5846    pub GetBandwidthAvailable:
5847        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5848    pub GetEndpointProperties: Option<
5849        unsafe extern "C-unwind" fn(
5850            *mut c_void,
5851            u8,
5852            u8,
5853            u8,
5854            *mut u8,
5855            *mut u16,
5856            *mut u8,
5857        ) -> IOReturn,
5858    >,
5859    pub LowLatencyReadIsochPipeAsync: Option<
5860        unsafe extern "C-unwind" fn(
5861            *mut c_void,
5862            u8,
5863            *mut c_void,
5864            u64,
5865            u32,
5866            u32,
5867            *mut IOUSBLowLatencyIsocFrame,
5868            IOAsyncCallback1,
5869            *mut c_void,
5870        ) -> IOReturn,
5871    >,
5872    pub LowLatencyWriteIsochPipeAsync: Option<
5873        unsafe extern "C-unwind" fn(
5874            *mut c_void,
5875            u8,
5876            *mut c_void,
5877            u64,
5878            u32,
5879            u32,
5880            *mut IOUSBLowLatencyIsocFrame,
5881            IOAsyncCallback1,
5882            *mut c_void,
5883        ) -> IOReturn,
5884    >,
5885    pub LowLatencyCreateBuffer: Option<
5886        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
5887    >,
5888    pub LowLatencyDestroyBuffer:
5889        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
5890    pub GetBusMicroFrameNumber:
5891        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5892    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
5893    pub GetIOUSBLibVersion: Option<
5894        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
5895    >,
5896    pub FindNextAssociatedDescriptor: Option<
5897        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
5898    >,
5899    pub FindNextAltInterface: Option<
5900        unsafe extern "C-unwind" fn(
5901            *mut c_void,
5902            *const c_void,
5903            *mut IOUSBFindInterfaceRequest,
5904        ) -> *mut IOUSBDescriptorHeader,
5905    >,
5906    /// 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
5907    ///
5908    /// The device does not have to be open to use this function.
5909    /// Availability: This function is only available with IOUSBInterfaceInterface300 and above.
5910    ///
5911    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
5912    ///
5913    /// Parameter `frame`: Pointer to UInt64 to hold the frame number.
5914    ///
5915    /// 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.
5916    ///
5917    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
5918    pub GetBusFrameNumberWithTime:
5919        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
5920}
5921
5922#[cfg(all(
5923    feature = "AppleUSBDefinitions",
5924    feature = "USB",
5925    feature = "libc",
5926    feature = "objc2"
5927))]
5928unsafe impl Encode for IOUSBInterfaceStruct300 {
5929    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct300", &[
5930        <*mut c_void>::ENCODING,
5931        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
5932        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5933        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
5934        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
5935        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
5936        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
5937        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
5938        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5939        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5940        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5941        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5942        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5943        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5944        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5945        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
5946        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5947        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5948        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5949        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5950        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5951        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
5952        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5953        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5954        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
5955        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5956        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5957        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5958        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5959        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5960        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5961        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5962        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
5963        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5964        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5965        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5966        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5967        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
5968        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5969        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
5970        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
5971        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5972        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5973        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
5974        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
5975        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
5976        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
5977        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5978        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
5979        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5980        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
5981        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
5982        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
5983        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5984        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
5985        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
5986        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5987        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
5988        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
5989    ]);
5990}
5991
5992#[cfg(all(
5993    feature = "AppleUSBDefinitions",
5994    feature = "USB",
5995    feature = "libc",
5996    feature = "objc2"
5997))]
5998unsafe impl RefEncode for IOUSBInterfaceStruct300 {
5999    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6000}
6001
6002/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6003/// version 3.0.0 and above.
6004///
6005/// The functions listed here include all of the functions defined for the IOUSBInterfaceInterface,
6006/// IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, IOUSBInterfaceInterface192,
6007/// IOUSBInterfaceInterface197, IOUSBInterfaceInterface220 and IOUSBInterfaceInterface245, as well as some new functions
6008/// that are available on Mac OS X version 10.5 and later.
6009/// Super: IOUSBInterfaceInterface245
6010///
6011/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface300?language=objc)
6012#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6013pub type IOUSBInterfaceInterface300 = IOUSBInterfaceStruct300;
6014
6015/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 3.9.8 and above.
6016///
6017/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6018/// Super: IOUSBInterfaceInterface300
6019///
6020/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct398?language=objc)
6021#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6022#[repr(C)]
6023#[derive(Clone, Copy, Debug, PartialEq)]
6024pub struct IOUSBInterfaceStruct398 {
6025    pub(crate) _reserved: *mut c_void,
6026    pub QueryInterface:
6027        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6028    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6029    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6030    pub CreateInterfaceAsyncEventSource:
6031        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6032    pub GetInterfaceAsyncEventSource:
6033        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6034    pub CreateInterfaceAsyncPort:
6035        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6036    pub GetInterfaceAsyncPort:
6037        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6038    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6039    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6040    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6041    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6042    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6043    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6044    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6045    pub GetDeviceReleaseNumber:
6046        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6047    pub GetConfigurationValue:
6048        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6049    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6050    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6051    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6052    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6053    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6054    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6055    pub GetBusFrameNumber:
6056        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6057    pub ControlRequest:
6058        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6059    pub ControlRequestAsync: Option<
6060        unsafe extern "C-unwind" fn(
6061            *mut c_void,
6062            u8,
6063            *mut IOUSBDevRequest,
6064            IOAsyncCallback1,
6065            *mut c_void,
6066        ) -> IOReturn,
6067    >,
6068    pub GetPipeProperties: Option<
6069        unsafe extern "C-unwind" fn(
6070            *mut c_void,
6071            u8,
6072            *mut u8,
6073            *mut u8,
6074            *mut u8,
6075            *mut u16,
6076            *mut u8,
6077        ) -> IOReturn,
6078    >,
6079    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6080    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6081    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6082    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6083    pub ReadPipe:
6084        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6085    pub WritePipe:
6086        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6087    pub ReadPipeAsync: Option<
6088        unsafe extern "C-unwind" fn(
6089            *mut c_void,
6090            u8,
6091            *mut c_void,
6092            u32,
6093            IOAsyncCallback1,
6094            *mut c_void,
6095        ) -> IOReturn,
6096    >,
6097    pub WritePipeAsync: Option<
6098        unsafe extern "C-unwind" fn(
6099            *mut c_void,
6100            u8,
6101            *mut c_void,
6102            u32,
6103            IOAsyncCallback1,
6104            *mut c_void,
6105        ) -> IOReturn,
6106    >,
6107    pub ReadIsochPipeAsync: Option<
6108        unsafe extern "C-unwind" fn(
6109            *mut c_void,
6110            u8,
6111            *mut c_void,
6112            u64,
6113            u32,
6114            *mut IOUSBIsocFrame,
6115            IOAsyncCallback1,
6116            *mut c_void,
6117        ) -> IOReturn,
6118    >,
6119    pub WriteIsochPipeAsync: Option<
6120        unsafe extern "C-unwind" fn(
6121            *mut c_void,
6122            u8,
6123            *mut c_void,
6124            u64,
6125            u32,
6126            *mut IOUSBIsocFrame,
6127            IOAsyncCallback1,
6128            *mut c_void,
6129        ) -> IOReturn,
6130    >,
6131    pub ControlRequestTO:
6132        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6133    pub ControlRequestAsyncTO: Option<
6134        unsafe extern "C-unwind" fn(
6135            *mut c_void,
6136            u8,
6137            *mut IOUSBDevRequestTO,
6138            IOAsyncCallback1,
6139            *mut c_void,
6140        ) -> IOReturn,
6141    >,
6142    pub ReadPipeTO: Option<
6143        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6144    >,
6145    pub WritePipeTO: Option<
6146        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6147    >,
6148    pub ReadPipeAsyncTO: Option<
6149        unsafe extern "C-unwind" fn(
6150            *mut c_void,
6151            u8,
6152            *mut c_void,
6153            u32,
6154            u32,
6155            u32,
6156            IOAsyncCallback1,
6157            *mut c_void,
6158        ) -> IOReturn,
6159    >,
6160    pub WritePipeAsyncTO: Option<
6161        unsafe extern "C-unwind" fn(
6162            *mut c_void,
6163            u8,
6164            *mut c_void,
6165            u32,
6166            u32,
6167            u32,
6168            IOAsyncCallback1,
6169            *mut c_void,
6170        ) -> IOReturn,
6171    >,
6172    pub USBInterfaceGetStringIndex:
6173        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6174    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6175    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6176    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6177    pub GetBandwidthAvailable:
6178        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6179    pub GetEndpointProperties: Option<
6180        unsafe extern "C-unwind" fn(
6181            *mut c_void,
6182            u8,
6183            u8,
6184            u8,
6185            *mut u8,
6186            *mut u16,
6187            *mut u8,
6188        ) -> IOReturn,
6189    >,
6190    pub LowLatencyReadIsochPipeAsync: Option<
6191        unsafe extern "C-unwind" fn(
6192            *mut c_void,
6193            u8,
6194            *mut c_void,
6195            u64,
6196            u32,
6197            u32,
6198            *mut IOUSBLowLatencyIsocFrame,
6199            IOAsyncCallback1,
6200            *mut c_void,
6201        ) -> IOReturn,
6202    >,
6203    pub LowLatencyWriteIsochPipeAsync: Option<
6204        unsafe extern "C-unwind" fn(
6205            *mut c_void,
6206            u8,
6207            *mut c_void,
6208            u64,
6209            u32,
6210            u32,
6211            *mut IOUSBLowLatencyIsocFrame,
6212            IOAsyncCallback1,
6213            *mut c_void,
6214        ) -> IOReturn,
6215    >,
6216    pub LowLatencyCreateBuffer: Option<
6217        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6218    >,
6219    pub LowLatencyDestroyBuffer:
6220        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6221    pub GetBusMicroFrameNumber:
6222        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6223    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6224    pub GetIOUSBLibVersion: Option<
6225        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6226    >,
6227    pub FindNextAssociatedDescriptor: Option<
6228        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6229    >,
6230    pub FindNextAltInterface: Option<
6231        unsafe extern "C-unwind" fn(
6232            *mut c_void,
6233            *const c_void,
6234            *mut IOUSBFindInterfaceRequest,
6235        ) -> *mut IOUSBDescriptorHeader,
6236    >,
6237    pub GetBusFrameNumberWithTime:
6238        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6239}
6240
6241#[cfg(all(
6242    feature = "AppleUSBDefinitions",
6243    feature = "USB",
6244    feature = "libc",
6245    feature = "objc2"
6246))]
6247unsafe impl Encode for IOUSBInterfaceStruct398 {
6248    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct398", &[
6249        <*mut c_void>::ENCODING,
6250        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6251        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6252        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6253        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6254        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6255        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6256        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6257        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6258        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6259        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6260        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6261        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6262        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6263        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6264        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6265        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6266        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6267        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6268        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6269        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6270        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6271        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6272        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6273        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6274        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6275        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6276        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6277        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6278        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6279        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6280        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6281        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6282        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6283        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6284        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6285        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6286        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6287        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6288        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6289        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6290        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6291        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6292        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6293        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6294        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6295        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
6296        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6297        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6298        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6299        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6300        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6301        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6302        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6303        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6304        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6305        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6306        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6307        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6308    ]);
6309}
6310
6311#[cfg(all(
6312    feature = "AppleUSBDefinitions",
6313    feature = "USB",
6314    feature = "libc",
6315    feature = "objc2"
6316))]
6317unsafe impl RefEncode for IOUSBInterfaceStruct398 {
6318    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6319}
6320
6321/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 3.9.8 and above.
6322///
6323/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6324/// Super: IOUSBInterfaceInterface300
6325///
6326/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface398?language=objc)
6327#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6328pub type IOUSBInterfaceInterface398 = IOUSBInterfaceStruct398;
6329
6330/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 4.0.0 and above.
6331///
6332/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6333/// Super: IOUSBInterfaceInterface398
6334///
6335/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct400?language=objc)
6336#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6337#[repr(C)]
6338#[derive(Clone, Copy, Debug, PartialEq)]
6339pub struct IOUSBInterfaceStruct400 {
6340    pub(crate) _reserved: *mut c_void,
6341    pub QueryInterface:
6342        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6343    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6344    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6345    pub CreateInterfaceAsyncEventSource:
6346        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6347    pub GetInterfaceAsyncEventSource:
6348        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6349    pub CreateInterfaceAsyncPort:
6350        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6351    pub GetInterfaceAsyncPort:
6352        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6353    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6354    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6355    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6356    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6357    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6358    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6359    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6360    pub GetDeviceReleaseNumber:
6361        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6362    pub GetConfigurationValue:
6363        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6364    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6365    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6366    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6367    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6368    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6369    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6370    pub GetBusFrameNumber:
6371        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6372    pub ControlRequest:
6373        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6374    pub ControlRequestAsync: Option<
6375        unsafe extern "C-unwind" fn(
6376            *mut c_void,
6377            u8,
6378            *mut IOUSBDevRequest,
6379            IOAsyncCallback1,
6380            *mut c_void,
6381        ) -> IOReturn,
6382    >,
6383    pub GetPipeProperties: Option<
6384        unsafe extern "C-unwind" fn(
6385            *mut c_void,
6386            u8,
6387            *mut u8,
6388            *mut u8,
6389            *mut u8,
6390            *mut u16,
6391            *mut u8,
6392        ) -> IOReturn,
6393    >,
6394    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6395    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6396    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6397    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6398    pub ReadPipe:
6399        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6400    pub WritePipe:
6401        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6402    pub ReadPipeAsync: Option<
6403        unsafe extern "C-unwind" fn(
6404            *mut c_void,
6405            u8,
6406            *mut c_void,
6407            u32,
6408            IOAsyncCallback1,
6409            *mut c_void,
6410        ) -> IOReturn,
6411    >,
6412    pub WritePipeAsync: Option<
6413        unsafe extern "C-unwind" fn(
6414            *mut c_void,
6415            u8,
6416            *mut c_void,
6417            u32,
6418            IOAsyncCallback1,
6419            *mut c_void,
6420        ) -> IOReturn,
6421    >,
6422    pub ReadIsochPipeAsync: Option<
6423        unsafe extern "C-unwind" fn(
6424            *mut c_void,
6425            u8,
6426            *mut c_void,
6427            u64,
6428            u32,
6429            *mut IOUSBIsocFrame,
6430            IOAsyncCallback1,
6431            *mut c_void,
6432        ) -> IOReturn,
6433    >,
6434    pub WriteIsochPipeAsync: Option<
6435        unsafe extern "C-unwind" fn(
6436            *mut c_void,
6437            u8,
6438            *mut c_void,
6439            u64,
6440            u32,
6441            *mut IOUSBIsocFrame,
6442            IOAsyncCallback1,
6443            *mut c_void,
6444        ) -> IOReturn,
6445    >,
6446    pub ControlRequestTO:
6447        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6448    pub ControlRequestAsyncTO: Option<
6449        unsafe extern "C-unwind" fn(
6450            *mut c_void,
6451            u8,
6452            *mut IOUSBDevRequestTO,
6453            IOAsyncCallback1,
6454            *mut c_void,
6455        ) -> IOReturn,
6456    >,
6457    pub ReadPipeTO: Option<
6458        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6459    >,
6460    pub WritePipeTO: Option<
6461        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6462    >,
6463    pub ReadPipeAsyncTO: Option<
6464        unsafe extern "C-unwind" fn(
6465            *mut c_void,
6466            u8,
6467            *mut c_void,
6468            u32,
6469            u32,
6470            u32,
6471            IOAsyncCallback1,
6472            *mut c_void,
6473        ) -> IOReturn,
6474    >,
6475    pub WritePipeAsyncTO: Option<
6476        unsafe extern "C-unwind" fn(
6477            *mut c_void,
6478            u8,
6479            *mut c_void,
6480            u32,
6481            u32,
6482            u32,
6483            IOAsyncCallback1,
6484            *mut c_void,
6485        ) -> IOReturn,
6486    >,
6487    pub USBInterfaceGetStringIndex:
6488        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6489    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6490    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6491    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6492    pub GetBandwidthAvailable:
6493        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6494    pub GetEndpointProperties: Option<
6495        unsafe extern "C-unwind" fn(
6496            *mut c_void,
6497            u8,
6498            u8,
6499            u8,
6500            *mut u8,
6501            *mut u16,
6502            *mut u8,
6503        ) -> IOReturn,
6504    >,
6505    pub LowLatencyReadIsochPipeAsync: Option<
6506        unsafe extern "C-unwind" fn(
6507            *mut c_void,
6508            u8,
6509            *mut c_void,
6510            u64,
6511            u32,
6512            u32,
6513            *mut IOUSBLowLatencyIsocFrame,
6514            IOAsyncCallback1,
6515            *mut c_void,
6516        ) -> IOReturn,
6517    >,
6518    pub LowLatencyWriteIsochPipeAsync: Option<
6519        unsafe extern "C-unwind" fn(
6520            *mut c_void,
6521            u8,
6522            *mut c_void,
6523            u64,
6524            u32,
6525            u32,
6526            *mut IOUSBLowLatencyIsocFrame,
6527            IOAsyncCallback1,
6528            *mut c_void,
6529        ) -> IOReturn,
6530    >,
6531    pub LowLatencyCreateBuffer: Option<
6532        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6533    >,
6534    pub LowLatencyDestroyBuffer:
6535        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6536    pub GetBusMicroFrameNumber:
6537        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6538    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6539    pub GetIOUSBLibVersion: Option<
6540        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6541    >,
6542    pub FindNextAssociatedDescriptor: Option<
6543        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6544    >,
6545    pub FindNextAltInterface: Option<
6546        unsafe extern "C-unwind" fn(
6547            *mut c_void,
6548            *const c_void,
6549            *mut IOUSBFindInterfaceRequest,
6550        ) -> *mut IOUSBDescriptorHeader,
6551    >,
6552    pub GetBusFrameNumberWithTime:
6553        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6554}
6555
6556#[cfg(all(
6557    feature = "AppleUSBDefinitions",
6558    feature = "USB",
6559    feature = "libc",
6560    feature = "objc2"
6561))]
6562unsafe impl Encode for IOUSBInterfaceStruct400 {
6563    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct400", &[
6564        <*mut c_void>::ENCODING,
6565        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6566        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6567        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6568        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6569        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6570        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6571        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6572        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6573        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6574        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6575        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6576        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6577        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6578        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6579        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6580        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6581        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6582        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6583        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6584        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6585        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6586        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6587        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6588        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6589        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6590        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6591        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6592        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6593        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6594        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6595        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6596        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6597        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6598        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6599        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6600        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6601        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6602        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6603        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6604        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6605        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6606        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6607        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6608        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6609        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6610        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
6611        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6612        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6613        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6614        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6615        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6616        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6617        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6618        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6619        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6620        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6621        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6622        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6623    ]);
6624}
6625
6626#[cfg(all(
6627    feature = "AppleUSBDefinitions",
6628    feature = "USB",
6629    feature = "libc",
6630    feature = "objc2"
6631))]
6632unsafe impl RefEncode for IOUSBInterfaceStruct400 {
6633    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6634}
6635
6636/// The object you use to access a USB interface from user space, returned by the IOUSBFamily version 4.0.0 and above.
6637///
6638/// This object is functionally identical to IOUSBInterfaceInterface300 on macOS, and includes some new functions that are only available on iOS.
6639/// Super: IOUSBInterfaceInterface398
6640///
6641/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface400?language=objc)
6642#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6643pub type IOUSBInterfaceInterface400 = IOUSBInterfaceStruct400;
6644
6645/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6646/// version 5.0.0 and above.
6647///
6648/// 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.
6649/// Super: IOUSBInterfaceInterface400
6650///
6651/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct500?language=objc)
6652#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6653#[repr(C)]
6654#[derive(Clone, Copy, Debug, PartialEq)]
6655pub struct IOUSBInterfaceStruct500 {
6656    pub(crate) _reserved: *mut c_void,
6657    pub QueryInterface:
6658        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6659    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6660    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6661    pub CreateInterfaceAsyncEventSource:
6662        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6663    pub GetInterfaceAsyncEventSource:
6664        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6665    pub CreateInterfaceAsyncPort:
6666        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
6667    pub GetInterfaceAsyncPort:
6668        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
6669    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6670    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6671    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6672    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6673    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6674    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6675    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6676    pub GetDeviceReleaseNumber:
6677        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
6678    pub GetConfigurationValue:
6679        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6680    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6681    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6682    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6683    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6684    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
6685    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6686    pub GetBusFrameNumber:
6687        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6688    pub ControlRequest:
6689        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
6690    pub ControlRequestAsync: Option<
6691        unsafe extern "C-unwind" fn(
6692            *mut c_void,
6693            u8,
6694            *mut IOUSBDevRequest,
6695            IOAsyncCallback1,
6696            *mut c_void,
6697        ) -> IOReturn,
6698    >,
6699    pub GetPipeProperties: Option<
6700        unsafe extern "C-unwind" fn(
6701            *mut c_void,
6702            u8,
6703            *mut u8,
6704            *mut u8,
6705            *mut u8,
6706            *mut u16,
6707            *mut u8,
6708        ) -> IOReturn,
6709    >,
6710    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6711    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6712    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6713    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6714    pub ReadPipe:
6715        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
6716    pub WritePipe:
6717        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
6718    pub ReadPipeAsync: Option<
6719        unsafe extern "C-unwind" fn(
6720            *mut c_void,
6721            u8,
6722            *mut c_void,
6723            u32,
6724            IOAsyncCallback1,
6725            *mut c_void,
6726        ) -> IOReturn,
6727    >,
6728    pub WritePipeAsync: Option<
6729        unsafe extern "C-unwind" fn(
6730            *mut c_void,
6731            u8,
6732            *mut c_void,
6733            u32,
6734            IOAsyncCallback1,
6735            *mut c_void,
6736        ) -> IOReturn,
6737    >,
6738    pub ReadIsochPipeAsync: Option<
6739        unsafe extern "C-unwind" fn(
6740            *mut c_void,
6741            u8,
6742            *mut c_void,
6743            u64,
6744            u32,
6745            *mut IOUSBIsocFrame,
6746            IOAsyncCallback1,
6747            *mut c_void,
6748        ) -> IOReturn,
6749    >,
6750    pub WriteIsochPipeAsync: Option<
6751        unsafe extern "C-unwind" fn(
6752            *mut c_void,
6753            u8,
6754            *mut c_void,
6755            u64,
6756            u32,
6757            *mut IOUSBIsocFrame,
6758            IOAsyncCallback1,
6759            *mut c_void,
6760        ) -> IOReturn,
6761    >,
6762    pub ControlRequestTO:
6763        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
6764    pub ControlRequestAsyncTO: Option<
6765        unsafe extern "C-unwind" fn(
6766            *mut c_void,
6767            u8,
6768            *mut IOUSBDevRequestTO,
6769            IOAsyncCallback1,
6770            *mut c_void,
6771        ) -> IOReturn,
6772    >,
6773    pub ReadPipeTO: Option<
6774        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
6775    >,
6776    pub WritePipeTO: Option<
6777        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
6778    >,
6779    pub ReadPipeAsyncTO: Option<
6780        unsafe extern "C-unwind" fn(
6781            *mut c_void,
6782            u8,
6783            *mut c_void,
6784            u32,
6785            u32,
6786            u32,
6787            IOAsyncCallback1,
6788            *mut c_void,
6789        ) -> IOReturn,
6790    >,
6791    pub WritePipeAsyncTO: Option<
6792        unsafe extern "C-unwind" fn(
6793            *mut c_void,
6794            u8,
6795            *mut c_void,
6796            u32,
6797            u32,
6798            u32,
6799            IOAsyncCallback1,
6800            *mut c_void,
6801        ) -> IOReturn,
6802    >,
6803    pub USBInterfaceGetStringIndex:
6804        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
6805    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
6806    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
6807    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
6808    pub GetBandwidthAvailable:
6809        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6810    pub GetEndpointProperties: Option<
6811        unsafe extern "C-unwind" fn(
6812            *mut c_void,
6813            u8,
6814            u8,
6815            u8,
6816            *mut u8,
6817            *mut u16,
6818            *mut u8,
6819        ) -> IOReturn,
6820    >,
6821    pub LowLatencyReadIsochPipeAsync: Option<
6822        unsafe extern "C-unwind" fn(
6823            *mut c_void,
6824            u8,
6825            *mut c_void,
6826            u64,
6827            u32,
6828            u32,
6829            *mut IOUSBLowLatencyIsocFrame,
6830            IOAsyncCallback1,
6831            *mut c_void,
6832        ) -> IOReturn,
6833    >,
6834    pub LowLatencyWriteIsochPipeAsync: Option<
6835        unsafe extern "C-unwind" fn(
6836            *mut c_void,
6837            u8,
6838            *mut c_void,
6839            u64,
6840            u32,
6841            u32,
6842            *mut IOUSBLowLatencyIsocFrame,
6843            IOAsyncCallback1,
6844            *mut c_void,
6845        ) -> IOReturn,
6846    >,
6847    pub LowLatencyCreateBuffer: Option<
6848        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
6849    >,
6850    pub LowLatencyDestroyBuffer:
6851        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
6852    pub GetBusMicroFrameNumber:
6853        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6854    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
6855    pub GetIOUSBLibVersion: Option<
6856        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
6857    >,
6858    pub FindNextAssociatedDescriptor: Option<
6859        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
6860    >,
6861    pub FindNextAltInterface: Option<
6862        unsafe extern "C-unwind" fn(
6863            *mut c_void,
6864            *const c_void,
6865            *mut IOUSBFindInterfaceRequest,
6866        ) -> *mut IOUSBDescriptorHeader,
6867    >,
6868    pub GetBusFrameNumberWithTime:
6869        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
6870    /// This function is deprecated. See GetPipePropertiesV3
6871    pub GetPipePropertiesV2: Option<
6872        unsafe extern "C-unwind" fn(
6873            *mut c_void,
6874            u8,
6875            *mut u8,
6876            *mut u8,
6877            *mut u8,
6878            *mut u16,
6879            *mut u8,
6880            *mut u8,
6881            *mut u8,
6882            *mut u16,
6883        ) -> IOReturn,
6884    >,
6885}
6886
6887#[cfg(all(
6888    feature = "AppleUSBDefinitions",
6889    feature = "USB",
6890    feature = "libc",
6891    feature = "objc2"
6892))]
6893unsafe impl Encode for IOUSBInterfaceStruct500 {
6894    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct500", &[
6895        <*mut c_void>::ENCODING,
6896        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
6897        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6898        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
6899        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
6900        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
6901        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
6902        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
6903        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6904        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
6905        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6906        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6907        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6908        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6909        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6910        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
6911        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6912        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6913        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6914        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6915        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6916        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
6917        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6918        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6919        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
6920        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6921        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6922        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6923        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6924        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6925        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
6926        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6927        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
6928        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6929        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6930        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6931        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6932        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
6933        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6934        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
6935        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
6936        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6937        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6938        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
6939        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> 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,u8,u16,u8,) -> IOReturn>>::ENCODING,
6942        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6943        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
6944        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6945        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
6946        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
6947        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
6948        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6949        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
6950        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
6951        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6952        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
6953        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
6954        <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,
6955    ]);
6956}
6957
6958#[cfg(all(
6959    feature = "AppleUSBDefinitions",
6960    feature = "USB",
6961    feature = "libc",
6962    feature = "objc2"
6963))]
6964unsafe impl RefEncode for IOUSBInterfaceStruct500 {
6965    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
6966}
6967
6968/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6969/// version 5.0.0 and above.
6970///
6971/// 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.
6972/// Super: IOUSBInterfaceInterface400
6973///
6974/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface500?language=objc)
6975#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6976pub type IOUSBInterfaceInterface500 = IOUSBInterfaceStruct500;
6977
6978/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
6979/// version 5.5.0 and above.
6980///
6981/// 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.
6982/// Super: IOUSBInterfaceInterface500
6983///
6984/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct550?language=objc)
6985#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
6986#[repr(C)]
6987#[derive(Clone, Copy, Debug, PartialEq)]
6988pub struct IOUSBInterfaceStruct550 {
6989    pub(crate) _reserved: *mut c_void,
6990    pub QueryInterface:
6991        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
6992    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6993    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
6994    pub CreateInterfaceAsyncEventSource:
6995        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
6996    pub GetInterfaceAsyncEventSource:
6997        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
6998    pub CreateInterfaceAsyncPort:
6999        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
7000    pub GetInterfaceAsyncPort:
7001        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
7002    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7003    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7004    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7005    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7006    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7007    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7008    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7009    pub GetDeviceReleaseNumber:
7010        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7011    pub GetConfigurationValue:
7012        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7013    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7014    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7015    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7016    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7017    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
7018    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7019    pub GetBusFrameNumber:
7020        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7021    pub ControlRequest:
7022        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
7023    pub ControlRequestAsync: Option<
7024        unsafe extern "C-unwind" fn(
7025            *mut c_void,
7026            u8,
7027            *mut IOUSBDevRequest,
7028            IOAsyncCallback1,
7029            *mut c_void,
7030        ) -> IOReturn,
7031    >,
7032    pub GetPipeProperties: Option<
7033        unsafe extern "C-unwind" fn(
7034            *mut c_void,
7035            u8,
7036            *mut u8,
7037            *mut u8,
7038            *mut u8,
7039            *mut u16,
7040            *mut u8,
7041        ) -> IOReturn,
7042    >,
7043    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7044    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7045    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7046    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7047    pub ReadPipe:
7048        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
7049    pub WritePipe:
7050        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
7051    pub ReadPipeAsync: Option<
7052        unsafe extern "C-unwind" fn(
7053            *mut c_void,
7054            u8,
7055            *mut c_void,
7056            u32,
7057            IOAsyncCallback1,
7058            *mut c_void,
7059        ) -> IOReturn,
7060    >,
7061    pub WritePipeAsync: Option<
7062        unsafe extern "C-unwind" fn(
7063            *mut c_void,
7064            u8,
7065            *mut c_void,
7066            u32,
7067            IOAsyncCallback1,
7068            *mut c_void,
7069        ) -> IOReturn,
7070    >,
7071    pub ReadIsochPipeAsync: Option<
7072        unsafe extern "C-unwind" fn(
7073            *mut c_void,
7074            u8,
7075            *mut c_void,
7076            u64,
7077            u32,
7078            *mut IOUSBIsocFrame,
7079            IOAsyncCallback1,
7080            *mut c_void,
7081        ) -> IOReturn,
7082    >,
7083    pub WriteIsochPipeAsync: Option<
7084        unsafe extern "C-unwind" fn(
7085            *mut c_void,
7086            u8,
7087            *mut c_void,
7088            u64,
7089            u32,
7090            *mut IOUSBIsocFrame,
7091            IOAsyncCallback1,
7092            *mut c_void,
7093        ) -> IOReturn,
7094    >,
7095    pub ControlRequestTO:
7096        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
7097    pub ControlRequestAsyncTO: Option<
7098        unsafe extern "C-unwind" fn(
7099            *mut c_void,
7100            u8,
7101            *mut IOUSBDevRequestTO,
7102            IOAsyncCallback1,
7103            *mut c_void,
7104        ) -> IOReturn,
7105    >,
7106    pub ReadPipeTO: Option<
7107        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
7108    >,
7109    pub WritePipeTO: Option<
7110        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
7111    >,
7112    pub ReadPipeAsyncTO: Option<
7113        unsafe extern "C-unwind" fn(
7114            *mut c_void,
7115            u8,
7116            *mut c_void,
7117            u32,
7118            u32,
7119            u32,
7120            IOAsyncCallback1,
7121            *mut c_void,
7122        ) -> IOReturn,
7123    >,
7124    pub WritePipeAsyncTO: Option<
7125        unsafe extern "C-unwind" fn(
7126            *mut c_void,
7127            u8,
7128            *mut c_void,
7129            u32,
7130            u32,
7131            u32,
7132            IOAsyncCallback1,
7133            *mut c_void,
7134        ) -> IOReturn,
7135    >,
7136    pub USBInterfaceGetStringIndex:
7137        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7138    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7139    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7140    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
7141    pub GetBandwidthAvailable:
7142        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7143    pub GetEndpointProperties: Option<
7144        unsafe extern "C-unwind" fn(
7145            *mut c_void,
7146            u8,
7147            u8,
7148            u8,
7149            *mut u8,
7150            *mut u16,
7151            *mut u8,
7152        ) -> IOReturn,
7153    >,
7154    pub LowLatencyReadIsochPipeAsync: Option<
7155        unsafe extern "C-unwind" fn(
7156            *mut c_void,
7157            u8,
7158            *mut c_void,
7159            u64,
7160            u32,
7161            u32,
7162            *mut IOUSBLowLatencyIsocFrame,
7163            IOAsyncCallback1,
7164            *mut c_void,
7165        ) -> IOReturn,
7166    >,
7167    pub LowLatencyWriteIsochPipeAsync: Option<
7168        unsafe extern "C-unwind" fn(
7169            *mut c_void,
7170            u8,
7171            *mut c_void,
7172            u64,
7173            u32,
7174            u32,
7175            *mut IOUSBLowLatencyIsocFrame,
7176            IOAsyncCallback1,
7177            *mut c_void,
7178        ) -> IOReturn,
7179    >,
7180    pub LowLatencyCreateBuffer: Option<
7181        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
7182    >,
7183    pub LowLatencyDestroyBuffer:
7184        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
7185    pub GetBusMicroFrameNumber:
7186        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7187    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7188    pub GetIOUSBLibVersion: Option<
7189        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
7190    >,
7191    pub FindNextAssociatedDescriptor: Option<
7192        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
7193    >,
7194    pub FindNextAltInterface: Option<
7195        unsafe extern "C-unwind" fn(
7196            *mut c_void,
7197            *const c_void,
7198            *mut IOUSBFindInterfaceRequest,
7199        ) -> *mut IOUSBDescriptorHeader,
7200    >,
7201    pub GetBusFrameNumberWithTime:
7202        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7203    pub GetPipePropertiesV2: Option<
7204        unsafe extern "C-unwind" fn(
7205            *mut c_void,
7206            u8,
7207            *mut u8,
7208            *mut u8,
7209            *mut u8,
7210            *mut u16,
7211            *mut u8,
7212            *mut u8,
7213            *mut u8,
7214            *mut u16,
7215        ) -> IOReturn,
7216    >,
7217    /// Gets the different properties for a pipe.  This API uses a pointer to IOUSBEndpointProperties to return all the different properties.
7218    ///
7219    /// Once an interface is opened, all of the pipes in that interface get created by the kernel. The number
7220    /// of pipes can be retrieved by GetNumEndpoints. The client can then get the properties of any pipe
7221    /// using an index of 1 to GetNumEndpoints. Pipe 0 is the default control pipe in the device.
7222    ///
7223    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7224    ///
7225    /// 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
7226    /// 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
7227    /// 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.
7228    ///
7229    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7230    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7231    pub GetPipePropertiesV3: Option<
7232        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
7233    >,
7234    /// Returns the properties of an endpoint, possibly in an alternate interface, including any information from the SuperSpeed Companion Descriptor
7235    ///
7236    /// 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
7237    /// the bAlternateSetting, bEndpointNumber, and bDirection fields of the structure with the desired values for the endpoint.
7238    ///
7239    /// 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
7240    /// 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
7241    /// 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.
7242    ///
7243    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7244    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7245    pub GetEndpointPropertiesV3:
7246        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
7247    /// Returns non zero if the pipe supports streams, nonZero for the maximum supported streams
7248    ///
7249    /// The interface does not have to be open to use this function.
7250    ///
7251    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7252    ///
7253    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7254    ///
7255    /// Parameter `supportsStreams`: 0 if streams not supported, non-zero value indicates maximum stream number
7256    ///
7257    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7258    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7259    /// Creates the streams for the pipe
7260    ///
7261    /// The interface does not have to be open to use this function.
7262    ///
7263    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7264    ///
7265    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7266    ///
7267    /// Parameter `streamID`: pass 0 if you want to destroy all streams, non-zero value indicates streamID of the highest stream to create
7268    ///
7269    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7270    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7271    /// Get the number of streams which have been configured for the endpoint with CreateStreams
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 `configuredStreams`: Number of streams that have been configured with CreateStreams
7280    ///
7281    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7282    pub GetConfiguredStreams:
7283        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7284    /// Performs a read on a stream in a
7285    /// <b>
7286    /// BULK IN
7287    /// </b>
7288    /// pipe, specifying timeout values.
7289    ///
7290    /// The interface must be open for the pipe to exist.
7291    ///
7292    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7293    /// toggle. See
7294    ///
7295    /// ```text
7296    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7297    /// ```
7298    ///
7299    /// or
7300    ///
7301    /// ```text
7302    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7303    /// ```
7304    ///
7305    /// .
7306    ///
7307    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipe API to perform a read from
7308    /// an interrupt pipe.
7309    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7310    ///
7311    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7312    ///
7313    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7314    ///
7315    /// Parameter `streamID`: ID of the stream to read from
7316    ///
7317    /// Parameter `buf`: Buffer to hold the data.
7318    ///
7319    /// Parameter `size`: Pointer to the size of the buffer pointed to by buf.
7320    ///
7321    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7322    /// data is transferred in this amount of time, the request will be aborted and returned.
7323    ///
7324    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7325    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7326    ///
7327    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7328    /// kIOReturnAborted if the thread is interrupted before the call completes, or
7329    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
7330    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
7331    /// NOT contain any valid data.
7332    pub ReadStreamsPipeTO: Option<
7333        unsafe extern "C-unwind" fn(
7334            *mut c_void,
7335            u8,
7336            u32,
7337            *mut c_void,
7338            *mut u32,
7339            u32,
7340            u32,
7341        ) -> IOReturn,
7342    >,
7343    /// Performs an write on a stream on a
7344    /// <b>
7345    /// BULK OUT
7346    /// </b>
7347    /// pipe, with specified timeout values.
7348    ///
7349    /// The interface must be open for the pipe to exist.
7350    ///
7351    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7352    /// toggle. See
7353    ///
7354    /// ```text
7355    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7356    /// ```
7357    ///
7358    /// or
7359    ///
7360    /// ```text
7361    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7362    /// ```
7363    ///
7364    /// .
7365    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7366    ///
7367    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7368    ///
7369    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7370    ///
7371    /// Parameter `streamID`: ID of the stream to write to
7372    ///
7373    /// Parameter `buf`: Buffer to hold the data.
7374    ///
7375    /// Parameter `size`: The size of the buffer pointed to by buf.
7376    ///
7377    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7378    /// data is transferred in this amount of time, the request will be aborted and returned.
7379    ///
7380    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7381    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7382    ///
7383    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7384    /// kIOReturnAborted if the thread is interrupted before the call completes, or
7385    /// kIOReturnNotOpen if the interface is not open for exclusive access.
7386    pub WriteStreamsPipeTO: Option<
7387        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
7388    >,
7389    /// Performs an asynchronous read on a stream on a
7390    /// <b>
7391    /// BULK IN
7392    /// </b>
7393    /// pipe, with specified timeout values.
7394    ///
7395    /// The interface must be open for the pipe to exist.
7396    ///
7397    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7398    /// toggle. See
7399    ///
7400    /// ```text
7401    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7402    /// ```
7403    ///
7404    /// or
7405    ///
7406    /// ```text
7407    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7408    /// ```
7409    ///
7410    /// .
7411    ///
7412    /// Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync API to perform an
7413    /// asynchronous read from an interrupt pipe.
7414    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7415    ///
7416    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7417    ///
7418    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7419    ///
7420    /// Parameter `streamID`: ID of the stream to read from
7421    ///
7422    /// Parameter `buf`: Buffer to hold the data.
7423    ///
7424    /// Parameter `size`: The size of the buffer pointed to by buf.
7425    ///
7426    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7427    /// data is transferred in this amount of time, the request will be aborted and returned.
7428    ///
7429    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7430    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7431    ///
7432    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually read.
7433    /// A message addressed to this callback is posted to the Async port
7434    /// upon completion.
7435    ///
7436    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7437    ///
7438    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
7439    /// kIOReturnNotOpen if the interface is not open for exclusive access.  Returns kIOReturnBadArgument if timeout
7440    /// values are specified for an interrupt pipe.  If an error is returned, the size parameter is not updated and the buffer will
7441    /// NOT contain any valid data.
7442    pub ReadStreamsPipeAsyncTO: Option<
7443        unsafe extern "C-unwind" fn(
7444            *mut c_void,
7445            u8,
7446            u32,
7447            *mut c_void,
7448            u32,
7449            u32,
7450            u32,
7451            IOAsyncCallback1,
7452            *mut c_void,
7453        ) -> IOReturn,
7454    >,
7455    /// Performs an asynchronous write on a stream on a
7456    /// <b>
7457    /// BULK OUT
7458    /// </b>
7459    /// pipe, with specified timeout values.
7460    ///
7461    /// The interface must be open for the pipe to exist.
7462    ///
7463    /// If a timeout is specified and the request times out, the driver may need to resynchronize the data
7464    /// toggle. See
7465    ///
7466    /// ```text
7467    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7468    /// ```
7469    ///
7470    /// or
7471    ///
7472    /// ```text
7473    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7474    /// ```
7475    ///
7476    /// .
7477    /// Availability: This function is only available with IOUSBInterfaceInterface182 and above.
7478    ///
7479    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7480    ///
7481    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7482    ///
7483    /// Parameter `streamID`: ID of the stream to write to
7484    ///
7485    /// Parameter `buf`: Buffer to hold the data.
7486    ///
7487    /// Parameter `size`: The size of the buffer pointed to by buf.
7488    ///
7489    /// Parameter `noDataTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if no
7490    /// data is transferred in this amount of time, the request will be aborted and returned.
7491    ///
7492    /// Parameter `completionTimeout`: Specifies a time value in milliseconds. Once the request is queued on the bus, if
7493    /// the entire request is not completed in this amount of time, the request will be aborted and returned.
7494    ///
7495    /// Parameter `callback`: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually written.
7496    /// A message addressed to this callback is posted to the Async port
7497    /// upon completion.
7498    ///
7499    /// Parameter `refcon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7500    ///
7501    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or
7502    /// kIOReturnNotOpen if the interface is not open for exclusive access.
7503    pub WriteStreamsPipeAsyncTO: Option<
7504        unsafe extern "C-unwind" fn(
7505            *mut c_void,
7506            u8,
7507            u32,
7508            *mut c_void,
7509            u32,
7510            u32,
7511            u32,
7512            IOAsyncCallback1,
7513            *mut c_void,
7514        ) -> IOReturn,
7515    >,
7516    /// This method causes all outstanding I/O on a stream of a pipe to complete with return code kIOReturnAborted.
7517    ///
7518    /// If there are outstanding asynchronous transactions on the pipe, the callbacks will happen.
7519    /// Note that this command will also clear the halted bit on the endpoint
7520    /// in the controller, but will NOT clear the data toggle bit.  If you want to clear the data toggle bit as well, see
7521    ///
7522    /// ```text
7523    ///  //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall
7524    /// ```
7525    ///
7526    /// or
7527    ///
7528    /// ```text
7529    ///  //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds
7530    /// ```
7531    ///
7532    /// for more information.  The interface must be open for the pipe to exist.
7533    ///
7534    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7535    ///
7536    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
7537    ///
7538    /// Parameter `streamID`: ID of the stream to abort
7539    ///
7540    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService,
7541    /// or kIOReturnNotOpen if the interface is not open for exclusive access.
7542    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7543}
7544
7545#[cfg(all(
7546    feature = "AppleUSBDefinitions",
7547    feature = "USB",
7548    feature = "libc",
7549    feature = "objc2"
7550))]
7551unsafe impl Encode for IOUSBInterfaceStruct550 {
7552    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct550", &[
7553        <*mut c_void>::ENCODING,
7554        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
7555        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
7556        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
7557        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
7558        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
7559        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
7560        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
7561        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
7562        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
7563        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7564        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7565        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7566        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7567        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7568        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
7569        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7570        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7571        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7572        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
7573        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7574        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
7575        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7576        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7577        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
7578        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7579        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
7580        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7581        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7582        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7583        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7584        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7585        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
7586        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7587        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7588        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7589        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7590        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
7591        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7592        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
7593        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
7594        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7595        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> 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,) -> IOReturn>>::ENCODING,
7598        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
7599        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
7600        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7601        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
7602        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7603        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7604        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
7605        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
7606        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7607        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
7608        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
7609        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
7610        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
7611        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
7612        <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,
7613        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
7614        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
7615        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
7616        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
7617        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
7618        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
7619        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
7620        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7621        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
7622        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
7623    ]);
7624}
7625
7626#[cfg(all(
7627    feature = "AppleUSBDefinitions",
7628    feature = "USB",
7629    feature = "libc",
7630    feature = "objc2"
7631))]
7632unsafe impl RefEncode for IOUSBInterfaceStruct550 {
7633    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
7634}
7635
7636/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
7637/// version 5.5.0 and above.
7638///
7639/// 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.
7640/// Super: IOUSBInterfaceInterface500
7641///
7642/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface550?language=objc)
7643#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
7644pub type IOUSBInterfaceInterface550 = IOUSBInterfaceStruct550;
7645
7646/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
7647/// version 6.5.0 and above.
7648///
7649/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface550, as well as some new functions that are available on
7650/// Mac OS X version 10.9 and later.
7651/// Super: IOUSBInterfaceInterface550
7652///
7653/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct650?language=objc)
7654#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
7655#[repr(C)]
7656#[derive(Clone, Copy, Debug, PartialEq)]
7657pub struct IOUSBInterfaceStruct650 {
7658    pub(crate) _reserved: *mut c_void,
7659    pub QueryInterface:
7660        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
7661    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7662    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
7663    pub CreateInterfaceAsyncEventSource:
7664        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
7665    pub GetInterfaceAsyncEventSource:
7666        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
7667    pub CreateInterfaceAsyncPort:
7668        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
7669    pub GetInterfaceAsyncPort:
7670        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
7671    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7672    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7673    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7674    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7675    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7676    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7677    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7678    pub GetDeviceReleaseNumber:
7679        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
7680    pub GetConfigurationValue:
7681        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7682    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7683    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7684    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7685    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7686    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
7687    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7688    pub GetBusFrameNumber:
7689        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7690    pub ControlRequest:
7691        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
7692    pub ControlRequestAsync: Option<
7693        unsafe extern "C-unwind" fn(
7694            *mut c_void,
7695            u8,
7696            *mut IOUSBDevRequest,
7697            IOAsyncCallback1,
7698            *mut c_void,
7699        ) -> IOReturn,
7700    >,
7701    pub GetPipeProperties: Option<
7702        unsafe extern "C-unwind" fn(
7703            *mut c_void,
7704            u8,
7705            *mut u8,
7706            *mut u8,
7707            *mut u8,
7708            *mut u16,
7709            *mut u8,
7710        ) -> IOReturn,
7711    >,
7712    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7713    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7714    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7715    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7716    pub ReadPipe:
7717        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
7718    pub WritePipe:
7719        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
7720    pub ReadPipeAsync: Option<
7721        unsafe extern "C-unwind" fn(
7722            *mut c_void,
7723            u8,
7724            *mut c_void,
7725            u32,
7726            IOAsyncCallback1,
7727            *mut c_void,
7728        ) -> IOReturn,
7729    >,
7730    pub WritePipeAsync: Option<
7731        unsafe extern "C-unwind" fn(
7732            *mut c_void,
7733            u8,
7734            *mut c_void,
7735            u32,
7736            IOAsyncCallback1,
7737            *mut c_void,
7738        ) -> IOReturn,
7739    >,
7740    pub ReadIsochPipeAsync: Option<
7741        unsafe extern "C-unwind" fn(
7742            *mut c_void,
7743            u8,
7744            *mut c_void,
7745            u64,
7746            u32,
7747            *mut IOUSBIsocFrame,
7748            IOAsyncCallback1,
7749            *mut c_void,
7750        ) -> IOReturn,
7751    >,
7752    pub WriteIsochPipeAsync: Option<
7753        unsafe extern "C-unwind" fn(
7754            *mut c_void,
7755            u8,
7756            *mut c_void,
7757            u64,
7758            u32,
7759            *mut IOUSBIsocFrame,
7760            IOAsyncCallback1,
7761            *mut c_void,
7762        ) -> IOReturn,
7763    >,
7764    pub ControlRequestTO:
7765        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
7766    pub ControlRequestAsyncTO: Option<
7767        unsafe extern "C-unwind" fn(
7768            *mut c_void,
7769            u8,
7770            *mut IOUSBDevRequestTO,
7771            IOAsyncCallback1,
7772            *mut c_void,
7773        ) -> IOReturn,
7774    >,
7775    pub ReadPipeTO: Option<
7776        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
7777    >,
7778    pub WritePipeTO: Option<
7779        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
7780    >,
7781    pub ReadPipeAsyncTO: Option<
7782        unsafe extern "C-unwind" fn(
7783            *mut c_void,
7784            u8,
7785            *mut c_void,
7786            u32,
7787            u32,
7788            u32,
7789            IOAsyncCallback1,
7790            *mut c_void,
7791        ) -> IOReturn,
7792    >,
7793    pub WritePipeAsyncTO: Option<
7794        unsafe extern "C-unwind" fn(
7795            *mut c_void,
7796            u8,
7797            *mut c_void,
7798            u32,
7799            u32,
7800            u32,
7801            IOAsyncCallback1,
7802            *mut c_void,
7803        ) -> IOReturn,
7804    >,
7805    pub USBInterfaceGetStringIndex:
7806        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
7807    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
7808    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
7809    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
7810    pub GetBandwidthAvailable:
7811        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7812    pub GetEndpointProperties: Option<
7813        unsafe extern "C-unwind" fn(
7814            *mut c_void,
7815            u8,
7816            u8,
7817            u8,
7818            *mut u8,
7819            *mut u16,
7820            *mut u8,
7821        ) -> IOReturn,
7822    >,
7823    pub LowLatencyReadIsochPipeAsync: Option<
7824        unsafe extern "C-unwind" fn(
7825            *mut c_void,
7826            u8,
7827            *mut c_void,
7828            u64,
7829            u32,
7830            u32,
7831            *mut IOUSBLowLatencyIsocFrame,
7832            IOAsyncCallback1,
7833            *mut c_void,
7834        ) -> IOReturn,
7835    >,
7836    pub LowLatencyWriteIsochPipeAsync: Option<
7837        unsafe extern "C-unwind" fn(
7838            *mut c_void,
7839            u8,
7840            *mut c_void,
7841            u64,
7842            u32,
7843            u32,
7844            *mut IOUSBLowLatencyIsocFrame,
7845            IOAsyncCallback1,
7846            *mut c_void,
7847        ) -> IOReturn,
7848    >,
7849    pub LowLatencyCreateBuffer: Option<
7850        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
7851    >,
7852    pub LowLatencyDestroyBuffer:
7853        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
7854    pub GetBusMicroFrameNumber:
7855        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7856    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
7857    pub GetIOUSBLibVersion: Option<
7858        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
7859    >,
7860    pub FindNextAssociatedDescriptor: Option<
7861        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
7862    >,
7863    pub FindNextAltInterface: Option<
7864        unsafe extern "C-unwind" fn(
7865            *mut c_void,
7866            *const c_void,
7867            *mut IOUSBFindInterfaceRequest,
7868        ) -> *mut IOUSBDescriptorHeader,
7869    >,
7870    pub GetBusFrameNumberWithTime:
7871        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
7872    pub GetPipePropertiesV2: Option<
7873        unsafe extern "C-unwind" fn(
7874            *mut c_void,
7875            u8,
7876            *mut u8,
7877            *mut u8,
7878            *mut u8,
7879            *mut u16,
7880            *mut u8,
7881            *mut u8,
7882            *mut u8,
7883            *mut u16,
7884        ) -> IOReturn,
7885    >,
7886    pub GetPipePropertiesV3: Option<
7887        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
7888    >,
7889    pub GetEndpointPropertiesV3:
7890        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
7891    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7892    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7893    pub GetConfiguredStreams:
7894        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
7895    pub ReadStreamsPipeTO: Option<
7896        unsafe extern "C-unwind" fn(
7897            *mut c_void,
7898            u8,
7899            u32,
7900            *mut c_void,
7901            *mut u32,
7902            u32,
7903            u32,
7904        ) -> IOReturn,
7905    >,
7906    pub WriteStreamsPipeTO: Option<
7907        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
7908    >,
7909    pub ReadStreamsPipeAsyncTO: Option<
7910        unsafe extern "C-unwind" fn(
7911            *mut c_void,
7912            u8,
7913            u32,
7914            *mut c_void,
7915            u32,
7916            u32,
7917            u32,
7918            IOAsyncCallback1,
7919            *mut c_void,
7920        ) -> IOReturn,
7921    >,
7922    pub WriteStreamsPipeAsyncTO: Option<
7923        unsafe extern "C-unwind" fn(
7924            *mut c_void,
7925            u8,
7926            u32,
7927            *mut c_void,
7928            u32,
7929            u32,
7930            u32,
7931            IOAsyncCallback1,
7932            *mut c_void,
7933        ) -> IOReturn,
7934    >,
7935    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
7936    /// Registers a callback routine to be invoked when certain events occur in the kernel.
7937    ///
7938    /// The callback function will be called, for example when the underlying IOUSBInterface is
7939    /// going to be suspended due to some kind of kernel activity. It will also be called when
7940    /// the underlying IOUSBInterface is resumed.
7941    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
7942    ///
7943    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7944    ///
7945    /// Parameter `notificationMask`: Specifies the desired type of notification (e.g. suspend/resume)
7946    ///
7947    /// Parameter `callback`: An IOAsyncCallback2 method. Upon completion, the arg0 argument of the AsyncCallback2 will contain the
7948    /// notification type, and arg1 will contain a notificationToken which should be used when calling AcknowledgeNotification
7949    ///
7950    /// Parameter `refCon`: Arbitrary pointer which is passed as a parameter to the callback routine.
7951    ///
7952    /// Parameter `pRegistrationToken`: A pointer to a UInt64 which will contain a registration token if the function is
7953    /// successful. This registration token can then later be used to call UnregisterNotification.
7954    ///
7955    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7956    pub RegisterForNotification: Option<
7957        unsafe extern "C-unwind" fn(
7958            *mut c_void,
7959            u64,
7960            IOAsyncCallback2,
7961            *mut c_void,
7962            *mut u64,
7963        ) -> IOReturn,
7964    >,
7965    /// Unregisters a previously registered callback routine
7966    ///
7967    /// The callback routine will no longer be invoked when events occur
7968    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
7969    ///
7970    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7971    ///
7972    /// Parameter `registrationToken`: The registration token which was obtained in the call to RegisterForNotification
7973    ///
7974    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7975    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
7976    /// Acknowledges a notification event
7977    ///
7978    /// Some events in the kernel will wait for an acknowledgement from all interested parties before proceeding.
7979    /// For example, if an IOUSBInterface is about to be suspended, any User Code which has registered to receive
7980    /// that event will be notified and should acknowledge the notification when it is ready for the IOUSBInterface
7981    /// to be suspended.
7982    /// Availability: This function is only available with IOUSBInterfaceInterface650 and above.
7983    ///
7984    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
7985    ///
7986    /// Parameter `notificationToken`: The notification token which was passed in to the callback routine
7987    ///
7988    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
7989    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
7990}
7991
7992#[cfg(all(
7993    feature = "AppleUSBDefinitions",
7994    feature = "USB",
7995    feature = "libc",
7996    feature = "objc2"
7997))]
7998unsafe impl Encode for IOUSBInterfaceStruct650 {
7999    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct650", &[
8000        <*mut c_void>::ENCODING,
8001        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8002        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8003        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8004        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8005        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8006        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8007        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8008        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8009        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8010        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8011        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8012        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8013        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8014        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8015        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8016        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8017        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8018        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8019        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8020        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8021        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8022        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8023        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8024        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8025        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8026        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8027        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8028        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8029        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8030        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8031        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8032        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8033        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8034        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8035        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8036        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8037        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8038        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8039        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8040        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8041        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8042        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> 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,) -> IOReturn>>::ENCODING,
8045        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8046        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
8047        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8048        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8049        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8050        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8051        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8052        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8053        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8054        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8055        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8056        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8057        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8058        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8059        <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,
8060        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8061        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8062        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8063        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8064        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8065        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8066        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8067        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8068        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8069        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8070        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8071        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8072        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8073    ]);
8074}
8075
8076#[cfg(all(
8077    feature = "AppleUSBDefinitions",
8078    feature = "USB",
8079    feature = "libc",
8080    feature = "objc2"
8081))]
8082unsafe impl RefEncode for IOUSBInterfaceStruct650 {
8083    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8084}
8085
8086/// The object you use to access a USB device interface from user space, returned by the IOUSBFamily
8087/// version 6.5.0 and above.
8088///
8089/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface550, as well as some new functions that are available on
8090/// Mac OS X version 10.9 and later.
8091/// Super: IOUSBInterfaceInterface550
8092///
8093/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface650?language=objc)
8094#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8095pub type IOUSBInterfaceInterface650 = IOUSBInterfaceStruct650;
8096
8097/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8098/// version 7.0.0 and above.
8099///
8100/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface650, as well as some new functions that are available on
8101/// Mac OS X version 10.9 and later.
8102/// Super: IOUSBInterfaceInterface650
8103///
8104/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct700?language=objc)
8105#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8106#[repr(C)]
8107#[derive(Clone, Copy, Debug, PartialEq)]
8108pub struct IOUSBInterfaceStruct700 {
8109    pub(crate) _reserved: *mut c_void,
8110    pub QueryInterface:
8111        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8112    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8113    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8114    pub CreateInterfaceAsyncEventSource:
8115        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8116    pub GetInterfaceAsyncEventSource:
8117        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
8118    pub CreateInterfaceAsyncPort:
8119        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
8120    pub GetInterfaceAsyncPort:
8121        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
8122    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8123    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8124    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8125    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8126    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8127    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8128    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8129    pub GetDeviceReleaseNumber:
8130        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8131    pub GetConfigurationValue:
8132        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8133    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8134    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8135    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8136    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8137    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
8138    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8139    pub GetBusFrameNumber:
8140        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8141    pub ControlRequest:
8142        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
8143    pub ControlRequestAsync: Option<
8144        unsafe extern "C-unwind" fn(
8145            *mut c_void,
8146            u8,
8147            *mut IOUSBDevRequest,
8148            IOAsyncCallback1,
8149            *mut c_void,
8150        ) -> IOReturn,
8151    >,
8152    pub GetPipeProperties: Option<
8153        unsafe extern "C-unwind" fn(
8154            *mut c_void,
8155            u8,
8156            *mut u8,
8157            *mut u8,
8158            *mut u8,
8159            *mut u16,
8160            *mut u8,
8161        ) -> IOReturn,
8162    >,
8163    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8164    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8165    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8166    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8167    pub ReadPipe:
8168        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
8169    pub WritePipe:
8170        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
8171    pub ReadPipeAsync: Option<
8172        unsafe extern "C-unwind" fn(
8173            *mut c_void,
8174            u8,
8175            *mut c_void,
8176            u32,
8177            IOAsyncCallback1,
8178            *mut c_void,
8179        ) -> IOReturn,
8180    >,
8181    pub WritePipeAsync: Option<
8182        unsafe extern "C-unwind" fn(
8183            *mut c_void,
8184            u8,
8185            *mut c_void,
8186            u32,
8187            IOAsyncCallback1,
8188            *mut c_void,
8189        ) -> IOReturn,
8190    >,
8191    pub ReadIsochPipeAsync: Option<
8192        unsafe extern "C-unwind" fn(
8193            *mut c_void,
8194            u8,
8195            *mut c_void,
8196            u64,
8197            u32,
8198            *mut IOUSBIsocFrame,
8199            IOAsyncCallback1,
8200            *mut c_void,
8201        ) -> IOReturn,
8202    >,
8203    pub WriteIsochPipeAsync: Option<
8204        unsafe extern "C-unwind" fn(
8205            *mut c_void,
8206            u8,
8207            *mut c_void,
8208            u64,
8209            u32,
8210            *mut IOUSBIsocFrame,
8211            IOAsyncCallback1,
8212            *mut c_void,
8213        ) -> IOReturn,
8214    >,
8215    pub ControlRequestTO:
8216        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
8217    pub ControlRequestAsyncTO: Option<
8218        unsafe extern "C-unwind" fn(
8219            *mut c_void,
8220            u8,
8221            *mut IOUSBDevRequestTO,
8222            IOAsyncCallback1,
8223            *mut c_void,
8224        ) -> IOReturn,
8225    >,
8226    pub ReadPipeTO: Option<
8227        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
8228    >,
8229    pub WritePipeTO: Option<
8230        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
8231    >,
8232    pub ReadPipeAsyncTO: Option<
8233        unsafe extern "C-unwind" fn(
8234            *mut c_void,
8235            u8,
8236            *mut c_void,
8237            u32,
8238            u32,
8239            u32,
8240            IOAsyncCallback1,
8241            *mut c_void,
8242        ) -> IOReturn,
8243    >,
8244    pub WritePipeAsyncTO: Option<
8245        unsafe extern "C-unwind" fn(
8246            *mut c_void,
8247            u8,
8248            *mut c_void,
8249            u32,
8250            u32,
8251            u32,
8252            IOAsyncCallback1,
8253            *mut c_void,
8254        ) -> IOReturn,
8255    >,
8256    pub USBInterfaceGetStringIndex:
8257        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8258    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8259    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8260    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
8261    pub GetBandwidthAvailable:
8262        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8263    pub GetEndpointProperties: Option<
8264        unsafe extern "C-unwind" fn(
8265            *mut c_void,
8266            u8,
8267            u8,
8268            u8,
8269            *mut u8,
8270            *mut u16,
8271            *mut u8,
8272        ) -> IOReturn,
8273    >,
8274    pub LowLatencyReadIsochPipeAsync: Option<
8275        unsafe extern "C-unwind" fn(
8276            *mut c_void,
8277            u8,
8278            *mut c_void,
8279            u64,
8280            u32,
8281            u32,
8282            *mut IOUSBLowLatencyIsocFrame,
8283            IOAsyncCallback1,
8284            *mut c_void,
8285        ) -> IOReturn,
8286    >,
8287    pub LowLatencyWriteIsochPipeAsync: Option<
8288        unsafe extern "C-unwind" fn(
8289            *mut c_void,
8290            u8,
8291            *mut c_void,
8292            u64,
8293            u32,
8294            u32,
8295            *mut IOUSBLowLatencyIsocFrame,
8296            IOAsyncCallback1,
8297            *mut c_void,
8298        ) -> IOReturn,
8299    >,
8300    pub LowLatencyCreateBuffer: Option<
8301        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
8302    >,
8303    pub LowLatencyDestroyBuffer:
8304        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
8305    pub GetBusMicroFrameNumber:
8306        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8307    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8308    pub GetIOUSBLibVersion: Option<
8309        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
8310    >,
8311    pub FindNextAssociatedDescriptor: Option<
8312        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
8313    >,
8314    pub FindNextAltInterface: Option<
8315        unsafe extern "C-unwind" fn(
8316            *mut c_void,
8317            *const c_void,
8318            *mut IOUSBFindInterfaceRequest,
8319        ) -> *mut IOUSBDescriptorHeader,
8320    >,
8321    pub GetBusFrameNumberWithTime:
8322        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8323    pub GetPipePropertiesV2: Option<
8324        unsafe extern "C-unwind" fn(
8325            *mut c_void,
8326            u8,
8327            *mut u8,
8328            *mut u8,
8329            *mut u8,
8330            *mut u16,
8331            *mut u8,
8332            *mut u8,
8333            *mut u8,
8334            *mut u16,
8335        ) -> IOReturn,
8336    >,
8337    pub GetPipePropertiesV3: Option<
8338        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
8339    >,
8340    pub GetEndpointPropertiesV3:
8341        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
8342    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8343    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8344    pub GetConfiguredStreams:
8345        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8346    pub ReadStreamsPipeTO: Option<
8347        unsafe extern "C-unwind" fn(
8348            *mut c_void,
8349            u8,
8350            u32,
8351            *mut c_void,
8352            *mut u32,
8353            u32,
8354            u32,
8355        ) -> IOReturn,
8356    >,
8357    pub WriteStreamsPipeTO: Option<
8358        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
8359    >,
8360    pub ReadStreamsPipeAsyncTO: Option<
8361        unsafe extern "C-unwind" fn(
8362            *mut c_void,
8363            u8,
8364            u32,
8365            *mut c_void,
8366            u32,
8367            u32,
8368            u32,
8369            IOAsyncCallback1,
8370            *mut c_void,
8371        ) -> IOReturn,
8372    >,
8373    pub WriteStreamsPipeAsyncTO: Option<
8374        unsafe extern "C-unwind" fn(
8375            *mut c_void,
8376            u8,
8377            u32,
8378            *mut c_void,
8379            u32,
8380            u32,
8381            u32,
8382            IOAsyncCallback1,
8383            *mut c_void,
8384        ) -> IOReturn,
8385    >,
8386    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8387    pub RegisterForNotification: Option<
8388        unsafe extern "C-unwind" fn(
8389            *mut c_void,
8390            u64,
8391            IOAsyncCallback2,
8392            *mut c_void,
8393            *mut u64,
8394        ) -> IOReturn,
8395    >,
8396    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8397    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8398    /// Triggers IOKit driver matching for this interface
8399    ///
8400    /// 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
8401    /// 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.
8402    /// Availability: This function is only available with IOUSBInterfaceInterface700 and above.
8403    ///
8404    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8405    ///
8406    /// 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.
8407    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8408}
8409
8410#[cfg(all(
8411    feature = "AppleUSBDefinitions",
8412    feature = "USB",
8413    feature = "libc",
8414    feature = "objc2"
8415))]
8416unsafe impl Encode for IOUSBInterfaceStruct700 {
8417    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct700", &[
8418        <*mut c_void>::ENCODING,
8419        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8420        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8421        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8422        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8423        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8424        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8425        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8426        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8427        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8428        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8429        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8430        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8431        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8432        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8433        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8434        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8435        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8436        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8437        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8438        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8439        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8440        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8441        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8442        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8443        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8444        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8445        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8446        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8447        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8448        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8449        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8450        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8451        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8452        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8453        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8454        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8455        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8456        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8457        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8458        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8459        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8460        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> 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,) -> IOReturn>>::ENCODING,
8463        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8464        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
8465        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8466        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8467        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8468        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8469        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8470        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8471        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8472        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8473        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8474        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8475        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8476        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8477        <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,
8478        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8479        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8480        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8481        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8482        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8483        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8484        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8485        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8486        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8487        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8488        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8489        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8490        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8491        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8492    ]);
8493}
8494
8495#[cfg(all(
8496    feature = "AppleUSBDefinitions",
8497    feature = "USB",
8498    feature = "libc",
8499    feature = "objc2"
8500))]
8501unsafe impl RefEncode for IOUSBInterfaceStruct700 {
8502    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8503}
8504
8505/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8506/// version 7.0.0 and above.
8507///
8508/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface650, as well as some new functions that are available on
8509/// Mac OS X version 10.9 and later.
8510/// Super: IOUSBInterfaceInterface650
8511///
8512/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface700?language=objc)
8513#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8514pub type IOUSBInterfaceInterface700 = IOUSBInterfaceStruct700;
8515
8516/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8517/// version 8.0.0 and above.
8518///
8519/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface700, as well as some new functions that are available on
8520/// Mac OS X version 10.11 and later.
8521/// Super: IOUSBInterfaceInterface700
8522///
8523/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct800?language=objc)
8524#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8525#[repr(C)]
8526#[derive(Clone, Copy, Debug, PartialEq)]
8527pub struct IOUSBInterfaceStruct800 {
8528    pub(crate) _reserved: *mut c_void,
8529    pub QueryInterface:
8530        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8531    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8532    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8533    pub CreateInterfaceAsyncEventSource:
8534        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8535    pub GetInterfaceAsyncEventSource:
8536        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
8537    pub CreateInterfaceAsyncPort:
8538        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
8539    pub GetInterfaceAsyncPort:
8540        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
8541    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8542    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8543    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8544    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8545    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8546    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8547    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8548    pub GetDeviceReleaseNumber:
8549        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8550    pub GetConfigurationValue:
8551        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8552    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8553    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8554    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8555    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8556    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
8557    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8558    pub GetBusFrameNumber:
8559        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8560    pub ControlRequest:
8561        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
8562    pub ControlRequestAsync: Option<
8563        unsafe extern "C-unwind" fn(
8564            *mut c_void,
8565            u8,
8566            *mut IOUSBDevRequest,
8567            IOAsyncCallback1,
8568            *mut c_void,
8569        ) -> IOReturn,
8570    >,
8571    pub GetPipeProperties: Option<
8572        unsafe extern "C-unwind" fn(
8573            *mut c_void,
8574            u8,
8575            *mut u8,
8576            *mut u8,
8577            *mut u8,
8578            *mut u16,
8579            *mut u8,
8580        ) -> IOReturn,
8581    >,
8582    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8583    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8584    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8585    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8586    pub ReadPipe:
8587        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
8588    pub WritePipe:
8589        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
8590    pub ReadPipeAsync: Option<
8591        unsafe extern "C-unwind" fn(
8592            *mut c_void,
8593            u8,
8594            *mut c_void,
8595            u32,
8596            IOAsyncCallback1,
8597            *mut c_void,
8598        ) -> IOReturn,
8599    >,
8600    pub WritePipeAsync: Option<
8601        unsafe extern "C-unwind" fn(
8602            *mut c_void,
8603            u8,
8604            *mut c_void,
8605            u32,
8606            IOAsyncCallback1,
8607            *mut c_void,
8608        ) -> IOReturn,
8609    >,
8610    pub ReadIsochPipeAsync: Option<
8611        unsafe extern "C-unwind" fn(
8612            *mut c_void,
8613            u8,
8614            *mut c_void,
8615            u64,
8616            u32,
8617            *mut IOUSBIsocFrame,
8618            IOAsyncCallback1,
8619            *mut c_void,
8620        ) -> IOReturn,
8621    >,
8622    pub WriteIsochPipeAsync: Option<
8623        unsafe extern "C-unwind" fn(
8624            *mut c_void,
8625            u8,
8626            *mut c_void,
8627            u64,
8628            u32,
8629            *mut IOUSBIsocFrame,
8630            IOAsyncCallback1,
8631            *mut c_void,
8632        ) -> IOReturn,
8633    >,
8634    pub ControlRequestTO:
8635        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
8636    pub ControlRequestAsyncTO: Option<
8637        unsafe extern "C-unwind" fn(
8638            *mut c_void,
8639            u8,
8640            *mut IOUSBDevRequestTO,
8641            IOAsyncCallback1,
8642            *mut c_void,
8643        ) -> IOReturn,
8644    >,
8645    pub ReadPipeTO: Option<
8646        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
8647    >,
8648    pub WritePipeTO: Option<
8649        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
8650    >,
8651    pub ReadPipeAsyncTO: Option<
8652        unsafe extern "C-unwind" fn(
8653            *mut c_void,
8654            u8,
8655            *mut c_void,
8656            u32,
8657            u32,
8658            u32,
8659            IOAsyncCallback1,
8660            *mut c_void,
8661        ) -> IOReturn,
8662    >,
8663    pub WritePipeAsyncTO: Option<
8664        unsafe extern "C-unwind" fn(
8665            *mut c_void,
8666            u8,
8667            *mut c_void,
8668            u32,
8669            u32,
8670            u32,
8671            IOAsyncCallback1,
8672            *mut c_void,
8673        ) -> IOReturn,
8674    >,
8675    pub USBInterfaceGetStringIndex:
8676        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8677    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8678    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8679    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
8680    pub GetBandwidthAvailable:
8681        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8682    pub GetEndpointProperties: Option<
8683        unsafe extern "C-unwind" fn(
8684            *mut c_void,
8685            u8,
8686            u8,
8687            u8,
8688            *mut u8,
8689            *mut u16,
8690            *mut u8,
8691        ) -> IOReturn,
8692    >,
8693    pub LowLatencyReadIsochPipeAsync: Option<
8694        unsafe extern "C-unwind" fn(
8695            *mut c_void,
8696            u8,
8697            *mut c_void,
8698            u64,
8699            u32,
8700            u32,
8701            *mut IOUSBLowLatencyIsocFrame,
8702            IOAsyncCallback1,
8703            *mut c_void,
8704        ) -> IOReturn,
8705    >,
8706    pub LowLatencyWriteIsochPipeAsync: Option<
8707        unsafe extern "C-unwind" fn(
8708            *mut c_void,
8709            u8,
8710            *mut c_void,
8711            u64,
8712            u32,
8713            u32,
8714            *mut IOUSBLowLatencyIsocFrame,
8715            IOAsyncCallback1,
8716            *mut c_void,
8717        ) -> IOReturn,
8718    >,
8719    pub LowLatencyCreateBuffer: Option<
8720        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
8721    >,
8722    pub LowLatencyDestroyBuffer:
8723        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
8724    pub GetBusMicroFrameNumber:
8725        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8726    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8727    pub GetIOUSBLibVersion: Option<
8728        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
8729    >,
8730    pub FindNextAssociatedDescriptor: Option<
8731        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
8732    >,
8733    pub FindNextAltInterface: Option<
8734        unsafe extern "C-unwind" fn(
8735            *mut c_void,
8736            *const c_void,
8737            *mut IOUSBFindInterfaceRequest,
8738        ) -> *mut IOUSBDescriptorHeader,
8739    >,
8740    pub GetBusFrameNumberWithTime:
8741        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8742    pub GetPipePropertiesV2: Option<
8743        unsafe extern "C-unwind" fn(
8744            *mut c_void,
8745            u8,
8746            *mut u8,
8747            *mut u8,
8748            *mut u8,
8749            *mut u16,
8750            *mut u8,
8751            *mut u8,
8752            *mut u8,
8753            *mut u16,
8754        ) -> IOReturn,
8755    >,
8756    pub GetPipePropertiesV3: Option<
8757        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
8758    >,
8759    pub GetEndpointPropertiesV3:
8760        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
8761    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8762    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8763    pub GetConfiguredStreams:
8764        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
8765    pub ReadStreamsPipeTO: Option<
8766        unsafe extern "C-unwind" fn(
8767            *mut c_void,
8768            u8,
8769            u32,
8770            *mut c_void,
8771            *mut u32,
8772            u32,
8773            u32,
8774        ) -> IOReturn,
8775    >,
8776    pub WriteStreamsPipeTO: Option<
8777        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
8778    >,
8779    pub ReadStreamsPipeAsyncTO: Option<
8780        unsafe extern "C-unwind" fn(
8781            *mut c_void,
8782            u8,
8783            u32,
8784            *mut c_void,
8785            u32,
8786            u32,
8787            u32,
8788            IOAsyncCallback1,
8789            *mut c_void,
8790        ) -> IOReturn,
8791    >,
8792    pub WriteStreamsPipeAsyncTO: Option<
8793        unsafe extern "C-unwind" fn(
8794            *mut c_void,
8795            u8,
8796            u32,
8797            *mut c_void,
8798            u32,
8799            u32,
8800            u32,
8801            IOAsyncCallback1,
8802            *mut c_void,
8803        ) -> IOReturn,
8804    >,
8805    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8806    pub RegisterForNotification: Option<
8807        unsafe extern "C-unwind" fn(
8808            *mut c_void,
8809            u64,
8810            IOAsyncCallback2,
8811            *mut c_void,
8812            *mut u64,
8813        ) -> IOReturn,
8814    >,
8815    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8816    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
8817    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8818    /// Define an idling policy for the interface.
8819    ///
8820    /// 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.
8821    /// Availability: This function is only available with IOUSBInterfaceInterface800 and above.
8822    ///
8823    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8824    ///
8825    /// 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.
8826    ///
8827    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnUnsupported is the bus doesn't support this function.
8828    pub SetDeviceIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
8829    /// Define an idling policy for the interface.
8830    ///
8831    /// 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.
8832    /// Availability: This function is only available with IOUSBInterfaceInterface800 and above.
8833    ///
8834    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
8835    ///
8836    /// Parameter `pipeRef`: Index for the desired pipe (1 - GetNumEndpoints).
8837    ///
8838    /// 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.
8839    ///
8840    /// Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnUnsupported is the bus doesn't support this function.
8841    pub SetPipeIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
8842}
8843
8844#[cfg(all(
8845    feature = "AppleUSBDefinitions",
8846    feature = "USB",
8847    feature = "libc",
8848    feature = "objc2"
8849))]
8850unsafe impl Encode for IOUSBInterfaceStruct800 {
8851    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct800", &[
8852        <*mut c_void>::ENCODING,
8853        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
8854        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8855        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
8856        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
8857        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
8858        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
8859        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
8860        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8861        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8862        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8863        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8864        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8865        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8866        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8867        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
8868        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8869        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8870        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8871        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
8872        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8873        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
8874        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8875        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8876        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
8877        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8878        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8879        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8880        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8881        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8882        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8883        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8884        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
8885        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8886        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8887        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8888        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8889        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
8890        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8891        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8892        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8893        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8894        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> 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,) -> IOReturn>>::ENCODING,
8897        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
8898        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,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,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
8901        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8902        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8903        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
8904        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
8905        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8906        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
8907        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
8908        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8909        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
8910        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
8911        <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,
8912        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8913        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
8914        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8915        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8916        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
8917        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
8918        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
8919        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8920        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
8921        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8922        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
8923        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8924        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
8925        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
8926        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
8927        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
8928    ]);
8929}
8930
8931#[cfg(all(
8932    feature = "AppleUSBDefinitions",
8933    feature = "USB",
8934    feature = "libc",
8935    feature = "objc2"
8936))]
8937unsafe impl RefEncode for IOUSBInterfaceStruct800 {
8938    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
8939}
8940
8941/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8942/// version 8.0.0 and above.
8943///
8944/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface700, as well as some new functions that are available on
8945/// Mac OS X version 10.11 and later.
8946/// Super: IOUSBInterfaceInterface700
8947///
8948/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface800?language=objc)
8949#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8950pub type IOUSBInterfaceInterface800 = IOUSBInterfaceStruct800;
8951
8952/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
8953/// version 900.4.2 and above.
8954///
8955/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface800, as well as some new functions that are available on
8956/// macOS 10.14 and later.
8957/// Super: IOUSBInterfaceInterface800
8958///
8959/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacestruct942?language=objc)
8960#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
8961#[repr(C)]
8962#[derive(Clone, Copy, Debug, PartialEq)]
8963pub struct IOUSBInterfaceStruct942 {
8964    pub(crate) _reserved: *mut c_void,
8965    pub QueryInterface:
8966        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
8967    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8968    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
8969    pub CreateInterfaceAsyncEventSource:
8970        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
8971    pub GetInterfaceAsyncEventSource:
8972        Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>,
8973    pub CreateInterfaceAsyncPort:
8974        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut libc::mach_port_t) -> IOReturn>,
8975    pub GetInterfaceAsyncPort:
8976        Option<unsafe extern "C-unwind" fn(*mut c_void) -> libc::mach_port_t>,
8977    pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8978    pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
8979    pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8980    pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8981    pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8982    pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8983    pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8984    pub GetDeviceReleaseNumber:
8985        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
8986    pub GetConfigurationValue:
8987        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8988    pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8989    pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8990    pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
8991    pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
8992    pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
8993    pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
8994    pub GetBusFrameNumber:
8995        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
8996    pub ControlRequest:
8997        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
8998    pub ControlRequestAsync: Option<
8999        unsafe extern "C-unwind" fn(
9000            *mut c_void,
9001            u8,
9002            *mut IOUSBDevRequest,
9003            IOAsyncCallback1,
9004            *mut c_void,
9005        ) -> IOReturn,
9006    >,
9007    pub GetPipeProperties: Option<
9008        unsafe extern "C-unwind" fn(
9009            *mut c_void,
9010            u8,
9011            *mut u8,
9012            *mut u8,
9013            *mut u8,
9014            *mut u16,
9015            *mut u8,
9016        ) -> IOReturn,
9017    >,
9018    pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9019    pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9020    pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9021    pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9022    pub ReadPipe:
9023        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
9024    pub WritePipe:
9025        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
9026    pub ReadPipeAsync: Option<
9027        unsafe extern "C-unwind" fn(
9028            *mut c_void,
9029            u8,
9030            *mut c_void,
9031            u32,
9032            IOAsyncCallback1,
9033            *mut c_void,
9034        ) -> IOReturn,
9035    >,
9036    pub WritePipeAsync: Option<
9037        unsafe extern "C-unwind" fn(
9038            *mut c_void,
9039            u8,
9040            *mut c_void,
9041            u32,
9042            IOAsyncCallback1,
9043            *mut c_void,
9044        ) -> IOReturn,
9045    >,
9046    pub ReadIsochPipeAsync: Option<
9047        unsafe extern "C-unwind" fn(
9048            *mut c_void,
9049            u8,
9050            *mut c_void,
9051            u64,
9052            u32,
9053            *mut IOUSBIsocFrame,
9054            IOAsyncCallback1,
9055            *mut c_void,
9056        ) -> IOReturn,
9057    >,
9058    pub WriteIsochPipeAsync: Option<
9059        unsafe extern "C-unwind" fn(
9060            *mut c_void,
9061            u8,
9062            *mut c_void,
9063            u64,
9064            u32,
9065            *mut IOUSBIsocFrame,
9066            IOAsyncCallback1,
9067            *mut c_void,
9068        ) -> IOReturn,
9069    >,
9070    pub ControlRequestTO:
9071        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
9072    pub ControlRequestAsyncTO: Option<
9073        unsafe extern "C-unwind" fn(
9074            *mut c_void,
9075            u8,
9076            *mut IOUSBDevRequestTO,
9077            IOAsyncCallback1,
9078            *mut c_void,
9079        ) -> IOReturn,
9080    >,
9081    pub ReadPipeTO: Option<
9082        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn,
9083    >,
9084    pub WritePipeTO: Option<
9085        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn,
9086    >,
9087    pub ReadPipeAsyncTO: Option<
9088        unsafe extern "C-unwind" fn(
9089            *mut c_void,
9090            u8,
9091            *mut c_void,
9092            u32,
9093            u32,
9094            u32,
9095            IOAsyncCallback1,
9096            *mut c_void,
9097        ) -> IOReturn,
9098    >,
9099    pub WritePipeAsyncTO: Option<
9100        unsafe extern "C-unwind" fn(
9101            *mut c_void,
9102            u8,
9103            *mut c_void,
9104            u32,
9105            u32,
9106            u32,
9107            IOAsyncCallback1,
9108            *mut c_void,
9109        ) -> IOReturn,
9110    >,
9111    pub USBInterfaceGetStringIndex:
9112        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
9113    pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9114    pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
9115    pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
9116    pub GetBandwidthAvailable:
9117        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
9118    pub GetEndpointProperties: Option<
9119        unsafe extern "C-unwind" fn(
9120            *mut c_void,
9121            u8,
9122            u8,
9123            u8,
9124            *mut u8,
9125            *mut u16,
9126            *mut u8,
9127        ) -> IOReturn,
9128    >,
9129    pub LowLatencyReadIsochPipeAsync: Option<
9130        unsafe extern "C-unwind" fn(
9131            *mut c_void,
9132            u8,
9133            *mut c_void,
9134            u64,
9135            u32,
9136            u32,
9137            *mut IOUSBLowLatencyIsocFrame,
9138            IOAsyncCallback1,
9139            *mut c_void,
9140        ) -> IOReturn,
9141    >,
9142    pub LowLatencyWriteIsochPipeAsync: Option<
9143        unsafe extern "C-unwind" fn(
9144            *mut c_void,
9145            u8,
9146            *mut c_void,
9147            u64,
9148            u32,
9149            u32,
9150            *mut IOUSBLowLatencyIsocFrame,
9151            IOAsyncCallback1,
9152            *mut c_void,
9153        ) -> IOReturn,
9154    >,
9155    pub LowLatencyCreateBuffer: Option<
9156        unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn,
9157    >,
9158    pub LowLatencyDestroyBuffer:
9159        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
9160    pub GetBusMicroFrameNumber:
9161        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
9162    pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
9163    pub GetIOUSBLibVersion: Option<
9164        unsafe extern "C-unwind" fn(*mut c_void, *mut NumVersion, *mut NumVersion) -> IOReturn,
9165    >,
9166    pub FindNextAssociatedDescriptor: Option<
9167        unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader,
9168    >,
9169    pub FindNextAltInterface: Option<
9170        unsafe extern "C-unwind" fn(
9171            *mut c_void,
9172            *const c_void,
9173            *mut IOUSBFindInterfaceRequest,
9174        ) -> *mut IOUSBDescriptorHeader,
9175    >,
9176    pub GetBusFrameNumberWithTime:
9177        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut AbsoluteTime) -> IOReturn>,
9178    pub GetPipePropertiesV2: Option<
9179        unsafe extern "C-unwind" fn(
9180            *mut c_void,
9181            u8,
9182            *mut u8,
9183            *mut u8,
9184            *mut u8,
9185            *mut u16,
9186            *mut u8,
9187            *mut u8,
9188            *mut u8,
9189            *mut u16,
9190        ) -> IOReturn,
9191    >,
9192    pub GetPipePropertiesV3: Option<
9193        unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> IOReturn,
9194    >,
9195    pub GetEndpointPropertiesV3:
9196        Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> IOReturn>,
9197    pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
9198    pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9199    pub GetConfiguredStreams:
9200        Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> IOReturn>,
9201    pub ReadStreamsPipeTO: Option<
9202        unsafe extern "C-unwind" fn(
9203            *mut c_void,
9204            u8,
9205            u32,
9206            *mut c_void,
9207            *mut u32,
9208            u32,
9209            u32,
9210        ) -> IOReturn,
9211    >,
9212    pub WriteStreamsPipeTO: Option<
9213        unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> IOReturn,
9214    >,
9215    pub ReadStreamsPipeAsyncTO: Option<
9216        unsafe extern "C-unwind" fn(
9217            *mut c_void,
9218            u8,
9219            u32,
9220            *mut c_void,
9221            u32,
9222            u32,
9223            u32,
9224            IOAsyncCallback1,
9225            *mut c_void,
9226        ) -> IOReturn,
9227    >,
9228    pub WriteStreamsPipeAsyncTO: Option<
9229        unsafe extern "C-unwind" fn(
9230            *mut c_void,
9231            u8,
9232            u32,
9233            *mut c_void,
9234            u32,
9235            u32,
9236            u32,
9237            IOAsyncCallback1,
9238            *mut c_void,
9239        ) -> IOReturn,
9240    >,
9241    pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9242    pub RegisterForNotification: Option<
9243        unsafe extern "C-unwind" fn(
9244            *mut c_void,
9245            u64,
9246            IOAsyncCallback2,
9247            *mut c_void,
9248            *mut u64,
9249        ) -> IOReturn,
9250    >,
9251    pub UnregisterNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
9252    pub AcknowledgeNotification: Option<unsafe extern "C-unwind" fn(*mut c_void, u64) -> IOReturn>,
9253    pub RegisterDriver: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
9254    pub SetDeviceIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u32) -> IOReturn>,
9255    pub SetPipeIdlePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> IOReturn>,
9256    /// Returns the IONotificationPort for this IOService instance.
9257    /// Availability: This function is only available with IOUSBInterfaceInterface942 and above.
9258    ///
9259    /// Parameter `self`: Pointer to the IOUSBInterfaceInterface.
9260    ///
9261    /// Returns: Returns the IONotificationPortRef if one exists, MACH_PORT_NULL otherwise.
9262    pub GetInterfaceAsyncNotificationPort:
9263        Option<unsafe extern "C-unwind" fn(*mut c_void) -> IONotificationPortRef>,
9264}
9265
9266#[cfg(all(
9267    feature = "AppleUSBDefinitions",
9268    feature = "USB",
9269    feature = "libc",
9270    feature = "objc2"
9271))]
9272unsafe impl Encode for IOUSBInterfaceStruct942 {
9273    const ENCODING: Encoding = Encoding::Struct("IOUSBInterfaceStruct942", &[
9274        <*mut c_void>::ENCODING,
9275        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
9276        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
9277        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
9278        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut CFRunLoopSource,) -> IOReturn>>::ENCODING,
9279        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> *mut CFRunLoopSource>>::ENCODING,
9280        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut libc::mach_port_t,) -> IOReturn>>::ENCODING,
9281        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> libc::mach_port_t>>::ENCODING,
9282        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9283        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9284        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9285        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9286        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9287        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9288        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9289        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u16,) -> IOReturn>>::ENCODING,
9290        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9291        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9292        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9293        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9294        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9295        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut io_service_t,) -> IOReturn>>::ENCODING,
9296        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9297        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9298        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,) -> IOReturn>>::ENCODING,
9299        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequest,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9300        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u8,*mut u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
9301        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9302        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9303        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9304        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9305        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9306        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,) -> IOReturn>>::ENCODING,
9307        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9308        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9309        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9310        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,*mut IOUSBIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9311        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,) -> IOReturn>>::ENCODING,
9312        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBDevRequestTO,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9313        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
9314        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
9315        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9316        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9317        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u8,) -> IOReturn>>::ENCODING,
9318        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9319        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,) -> IOReturn>>::ENCODING,
9320        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u16,u8,) -> IOReturn>>::ENCODING,
9321        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9322        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u8,u8,*mut u8,*mut u16,*mut u8,) -> IOReturn>>::ENCODING,
9323        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9324        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut c_void,u64,u32,u32,*mut IOUSBLowLatencyIsocFrame,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9325        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut *mut c_void,IOByteCount,u32,) -> IOReturn>>::ENCODING,
9326        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut c_void,) -> IOReturn>>::ENCODING,
9327        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9328        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u32,) -> IOReturn>>::ENCODING,
9329        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut NumVersion,*mut NumVersion,) -> IOReturn>>::ENCODING,
9330        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,u8,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
9331        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const c_void,*mut IOUSBFindInterfaceRequest,) -> *mut IOUSBDescriptorHeader>>::ENCODING,
9332        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut u64,*mut AbsoluteTime,) -> IOReturn>>::ENCODING,
9333        <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,
9334        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
9335        <Option<unsafe extern "C-unwind" fn(*mut c_void,*mut IOUSBEndpointProperties,) -> IOReturn>>::ENCODING,
9336        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
9337        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9338        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,*mut u32,) -> IOReturn>>::ENCODING,
9339        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,*mut u32,u32,u32,) -> IOReturn>>::ENCODING,
9340        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,) -> IOReturn>>::ENCODING,
9341        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9342        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,*mut c_void,u32,u32,u32,IOAsyncCallback1,*mut c_void,) -> IOReturn>>::ENCODING,
9343        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9344        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,IOAsyncCallback2,*mut c_void,*mut u64,) -> IOReturn>>::ENCODING,
9345        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
9346        <Option<unsafe extern "C-unwind" fn(*mut c_void,u64,) -> IOReturn>>::ENCODING,
9347        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
9348        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,) -> IOReturn>>::ENCODING,
9349        <Option<unsafe extern "C-unwind" fn(*mut c_void,u8,u32,) -> IOReturn>>::ENCODING,
9350        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IONotificationPortRef>>::ENCODING,
9351    ]);
9352}
9353
9354#[cfg(all(
9355    feature = "AppleUSBDefinitions",
9356    feature = "USB",
9357    feature = "libc",
9358    feature = "objc2"
9359))]
9360unsafe impl RefEncode for IOUSBInterfaceStruct942 {
9361    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
9362}
9363
9364/// The object you use to access a USB interface interface from user space, returned by the IOUSBFamily
9365/// version 900.4.2 and above.
9366///
9367/// The functions listed here include all of the functions defined for IOUSBInterfaceInterface800, as well as some new functions that are available on
9368/// macOS 10.14 and later.
9369/// Super: IOUSBInterfaceInterface800
9370///
9371/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface942?language=objc)
9372#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
9373pub type IOUSBInterfaceInterface942 = IOUSBInterfaceStruct942;
9374
9375/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceinterface?language=objc)
9376#[cfg(all(feature = "AppleUSBDefinitions", feature = "USB", feature = "libc"))]
9377pub type IOUSBInterfaceInterface = IOUSBInterfaceInterface942;