objc2_virtualization/generated/
VZNetworkDeviceConfiguration.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 network adapter configuration.
12    ///
13    /// VZNetworkDeviceConfiguration should not be instantiated directly.
14    /// One of its subclasses like VZVirtioNetworkDeviceConfiguration should be used instead.
15    ///
16    ///
17    /// See: VZVirtioNetworkDeviceConfiguration
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vznetworkdeviceconfiguration?language=objc)
20    #[unsafe(super(NSObject))]
21    #[derive(Debug, PartialEq, Eq, Hash)]
22    pub struct VZNetworkDeviceConfiguration;
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for VZNetworkDeviceConfiguration {}
27);
28
29unsafe impl CopyingHelper for VZNetworkDeviceConfiguration {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for VZNetworkDeviceConfiguration {}
35);
36
37impl VZNetworkDeviceConfiguration {
38    extern_methods!(
39        #[unsafe(method(new))]
40        #[unsafe(method_family = new)]
41        pub unsafe fn new() -> Retained<Self>;
42
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47        #[cfg(feature = "VZMACAddress")]
48        /// The media access control address of the device. The default is a random, locally administered, unicast address.
49        #[unsafe(method(MACAddress))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn MACAddress(&self) -> Retained<VZMACAddress>;
52
53        #[cfg(feature = "VZMACAddress")]
54        /// Setter for [`MACAddress`][Self::MACAddress].
55        #[unsafe(method(setMACAddress:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn setMACAddress(&self, mac_address: &VZMACAddress);
58
59        #[cfg(feature = "VZNetworkDeviceAttachment")]
60        /// Network device attachment. Defines how the virtual device interfaces with the host system. The default is nil.
61        ///
62        /// See: VZBridgedNetworkDeviceAttachment
63        ///
64        /// See: VZFileHandleNetworkDeviceAttachment
65        ///
66        /// See: VZNATNetworkDeviceAttachment
67        #[unsafe(method(attachment))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn attachment(&self) -> Option<Retained<VZNetworkDeviceAttachment>>;
70
71        #[cfg(feature = "VZNetworkDeviceAttachment")]
72        /// Setter for [`attachment`][Self::attachment].
73        #[unsafe(method(setAttachment:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setAttachment(&self, attachment: Option<&VZNetworkDeviceAttachment>);
76    );
77}