objc2_virtualization/generated/VZUSBDevice.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10 /// Protocol representing a USB Device in a virtual machine.
11 ///
12 /// Classes that conform to this protocol represent hot-pluggable USB devices.
13 /// VZUSBDevice protocol should not be used with objects outside of Virtualization framework.
14 /// This protocol only describes capabilities of Virtualization framework objects.
15 ///
16 /// See: VZUSBMassStorageDevice
17 ///
18 /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzusbdevice?language=objc)
19 pub unsafe trait VZUSBDevice: NSObjectProtocol {
20 #[cfg(feature = "VZUSBController")]
21 /// USB controller that the device is attached to.
22 ///
23 /// If a USB device object that conforms to this protocol is currently attached to a USB controller, this
24 /// property includes a pointer to the USB controller object that the device is attached to.
25 /// Otherwise, it contains nil.
26 #[unsafe(method(usbController))]
27 #[unsafe(method_family = none)]
28 unsafe fn usbController(&self) -> Option<Retained<VZUSBController>>;
29
30 /// Device UUID.
31 ///
32 /// Device UUID from device configuration objects that conform to `VZUSBDeviceConfiguration`.
33 ///
34 /// See: VZUSBDeviceConfiguration
35 #[unsafe(method(uuid))]
36 #[unsafe(method_family = none)]
37 unsafe fn uuid(&self) -> Retained<NSUUID>;
38 }
39);