1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Define a network interface that bridges a physical interface with a virtual machine.
///
/// A bridged interface is shared between the virtual machine and the host system. Both host and virtual machine send and receive packets on the same physical interface
/// but have distinct network layers.
///
/// VZBridgedNetworkInterface cannot be instantiated directly. A list of supported network interfaces can be obtained using +[VZBridgedNetworkInterface networkInterfaces].
///
/// The VZBridgedNetworkInterface can be used with a VZBridgedNetworkDeviceAttachment to set up a network device VZNetworkDeviceConfiguration.
///
///
/// See also: VZBridgedNetworkDeviceAttachment
///
/// See also: VZNATNetworkDeviceAttachment
///
/// See also: VZNetworkDeviceConfiguration
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzbridgednetworkinterface?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct VZBridgedNetworkInterface;
);
extern_conformance!(
unsafe impl NSObjectProtocol for VZBridgedNetworkInterface {}
);
impl VZBridgedNetworkInterface {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Return the list of network interfaces available for bridging.
#[unsafe(method(networkInterfaces))]
#[unsafe(method_family = none)]
pub unsafe fn networkInterfaces() -> Retained<NSArray<VZBridgedNetworkInterface>>;
/// Return the unique identifier for this interface. The identifier is the BSD name associated with the interface (e.g. "en0").
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
/// Return a display name if available (e.g. "Ethernet").
#[unsafe(method(localizedDisplayName))]
#[unsafe(method_family = none)]
pub unsafe fn localizedDisplayName(&self) -> Option<Retained<NSString>>;
);
}