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
62
63
64
65
66
67
68
69
70
71
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
/// Network device attachment bridging a host physical interface with a virtual network device.
///
/// A bridged network allows the virtual machine to use the same physical interface as the host. Both host and virtual machine
/// send and receive packets on the same physical interface but have distinct network layers.
///
/// The bridge network device attachment is used with a VZNetworkDeviceConfiguration to define a virtual network device.
///
/// Using a VZBridgedNetworkDeviceAttachment requires the app to have the "com.apple.vm.networking" entitlement.
///
///
/// See: VZBridgedNetworkInterface
///
/// See: VZNetworkDeviceConfiguration
///
/// See: VZVirtioNetworkDeviceConfiguration
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzbridgednetworkdeviceattachment?language=objc)
#[unsafe(super(VZNetworkDeviceAttachment, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZNetworkDeviceAttachment")]
pub struct VZBridgedNetworkDeviceAttachment;
);
#[cfg(feature = "VZNetworkDeviceAttachment")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZBridgedNetworkDeviceAttachment {}
);
#[cfg(feature = "VZNetworkDeviceAttachment")]
impl VZBridgedNetworkDeviceAttachment {
extern_methods!(
#[cfg(feature = "VZBridgedNetworkInterface")]
/// Initialize a VZBridgedNetworkDeviceAttachment with a host network interface.
///
/// Parameter `interface`: Host network interface controller.
#[unsafe(method(initWithInterface:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithInterface(
this: Allocated<Self>,
interface: &VZBridgedNetworkInterface,
) -> Retained<Self>;
#[cfg(feature = "VZBridgedNetworkInterface")]
/// Network interface of this device attachment.
#[unsafe(method(interface))]
#[unsafe(method_family = none)]
pub unsafe fn interface(&self) -> Retained<VZBridgedNetworkInterface>;
);
}
/// Methods declared on superclass `VZNetworkDeviceAttachment`.
#[cfg(feature = "VZNetworkDeviceAttachment")]
impl VZBridgedNetworkDeviceAttachment {
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>;
);
}