objc2_virtualization/generated/VZUSBControllerConfiguration.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 /// Base class for a USB Controller configuration.
12 ///
13 /// VZUSBControllerConfiguration should not be instantiated directly.
14 /// One of its subclasses like VZXHCIControllerConfiguration should be used instead.
15 ///
16 /// See: VZXHCIControllerConfiguration
17 ///
18 /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzusbcontrollerconfiguration?language=objc)
19 #[unsafe(super(NSObject))]
20 #[derive(Debug, PartialEq, Eq, Hash)]
21 pub struct VZUSBControllerConfiguration;
22);
23
24extern_conformance!(
25 unsafe impl NSCopying for VZUSBControllerConfiguration {}
26);
27
28unsafe impl CopyingHelper for VZUSBControllerConfiguration {
29 type Result = Self;
30}
31
32extern_conformance!(
33 unsafe impl NSObjectProtocol for VZUSBControllerConfiguration {}
34);
35
36impl VZUSBControllerConfiguration {
37 extern_methods!(
38 #[unsafe(method(new))]
39 #[unsafe(method_family = new)]
40 pub unsafe fn new() -> Retained<Self>;
41
42 #[unsafe(method(init))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46 #[cfg(feature = "VZUSBDeviceConfiguration")]
47 /// List of USB devices. Empty by default.
48 ///
49 /// This list represents a set of USB devices that virtual machine will start with.
50 /// For each entry in this list, there will be a corresponding runtime object created in VZUSBController.usbDevices property.
51 ///
52 /// See: VZUSBController
53 ///
54 /// See: VZUSBDeviceConfiguration
55 ///
56 /// See: VZUSBMassStorageDeviceConfiguration
57 #[unsafe(method(usbDevices))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn usbDevices(
60 &self,
61 ) -> Retained<NSArray<ProtocolObject<dyn VZUSBDeviceConfiguration>>>;
62
63 #[cfg(feature = "VZUSBDeviceConfiguration")]
64 /// Setter for [`usbDevices`][Self::usbDevices].
65 ///
66 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
67 #[unsafe(method(setUsbDevices:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setUsbDevices(
70 &self,
71 usb_devices: &NSArray<ProtocolObject<dyn VZUSBDeviceConfiguration>>,
72 );
73 );
74}