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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// The platform configuration for a generic Intel or ARM virtual machine.
///
/// When a virtual machine is saved to disk then loaded again, the `machineIdentifier`
/// must be restored to the original value.
///
/// If multiple virtual machines are created from the same configuration, each should have a unique `machineIdentifier`.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzgenericplatformconfiguration?language=objc)
#[unsafe(super(VZPlatformConfiguration, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZPlatformConfiguration")]
pub struct VZGenericPlatformConfiguration;
);
#[cfg(feature = "VZPlatformConfiguration")]
extern_conformance!(
unsafe impl NSCopying for VZGenericPlatformConfiguration {}
);
#[cfg(feature = "VZPlatformConfiguration")]
unsafe impl CopyingHelper for VZGenericPlatformConfiguration {
type Result = Self;
}
#[cfg(feature = "VZPlatformConfiguration")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZGenericPlatformConfiguration {}
);
#[cfg(feature = "VZPlatformConfiguration")]
impl VZGenericPlatformConfiguration {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "VZGenericMachineIdentifier")]
/// The unique machine identifier.
///
/// Running two virtual machines concurrently with the same identifier results in undefined behavior
/// in the guest operating system. When restoring a virtual machine from saved state, this
/// `machineIdentifier` must match the `machineIdentifier` of the saved virtual machine.
#[unsafe(method(machineIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn machineIdentifier(&self) -> Retained<VZGenericMachineIdentifier>;
#[cfg(feature = "VZGenericMachineIdentifier")]
/// Setter for [`machineIdentifier`][Self::machineIdentifier].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setMachineIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setMachineIdentifier(&self, machine_identifier: &VZGenericMachineIdentifier);
/// Indicate whether or not nested virtualization is available.
///
/// Nested virtualization is only available on some hardware and software configurations. It may also be disabled by policy.
///
/// Use this property to check if support is available for the platform. If nested virtualization is supported,
/// use `nestedVirtualizationEnabled` to enable the feature.
///
/// See: nestedVirtualizationEnabled.
#[unsafe(method(isNestedVirtualizationSupported))]
#[unsafe(method_family = none)]
pub unsafe fn isNestedVirtualizationSupported() -> bool;
/// Enable nested virtualization for the platform.
///
/// If nested virtualization is available, enable it for the current platform configuration.
///
/// You can use `nestedVirtualizationSupported` to discover the nested virtualization availability before enabling it.
///
/// The default value is NO, nested virtualization is disabled.
///
/// See: nestedVirtualizationSupported.
#[unsafe(method(isNestedVirtualizationEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isNestedVirtualizationEnabled(&self) -> bool;
/// Setter for [`isNestedVirtualizationEnabled`][Self::isNestedVirtualizationEnabled].
#[unsafe(method(setNestedVirtualizationEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setNestedVirtualizationEnabled(&self, nested_virtualization_enabled: bool);
);
}
/// Methods declared on superclass `VZPlatformConfiguration`.
#[cfg(feature = "VZPlatformConfiguration")]
impl VZGenericPlatformConfiguration {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}