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
25unsafe impl NSCopying for VZNetworkDeviceConfiguration {}
26
27unsafe impl CopyingHelper for VZNetworkDeviceConfiguration {
28    type Result = Self;
29}
30
31unsafe impl NSObjectProtocol for VZNetworkDeviceConfiguration {}
32
33impl VZNetworkDeviceConfiguration {
34    extern_methods!(
35        #[unsafe(method(new))]
36        #[unsafe(method_family = new)]
37        pub unsafe fn new() -> Retained<Self>;
38
39        #[unsafe(method(init))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42
43        #[cfg(feature = "VZMACAddress")]
44        /// The media access control address of the device. The default is a random, locally administered, unicast address.
45        #[unsafe(method(MACAddress))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn MACAddress(&self) -> Retained<VZMACAddress>;
48
49        #[cfg(feature = "VZMACAddress")]
50        /// Setter for [`MACAddress`][Self::MACAddress].
51        #[unsafe(method(setMACAddress:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setMACAddress(&self, mac_address: &VZMACAddress);
54
55        #[cfg(feature = "VZNetworkDeviceAttachment")]
56        /// Network device attachment. Defines how the virtual device interfaces with the host system. The default is nil.
57        ///
58        /// See: VZBridgedNetworkDeviceAttachment
59        ///
60        /// See: VZFileHandleNetworkDeviceAttachment
61        ///
62        /// See: VZNATNetworkDeviceAttachment
63        #[unsafe(method(attachment))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn attachment(&self) -> Option<Retained<VZNetworkDeviceAttachment>>;
66
67        #[cfg(feature = "VZNetworkDeviceAttachment")]
68        /// Setter for [`attachment`][Self::attachment].
69        #[unsafe(method(setAttachment:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn setAttachment(&self, attachment: Option<&VZNetworkDeviceAttachment>);
72    );
73}