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
106
107
108
109
110
//! 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!(
/// Boot loader configuration for a Linux kernel.
///
/// You must use a VZGenericPlatformConfiguration in conjunction with the Linux boot loader.
/// It is invalid to use it with any other platform configuration.
///
/// See: VZGenericPlatformConfiguration
///
/// See: VZVirtualMachineConfiguration.platform.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzlinuxbootloader?language=objc)
#[unsafe(super(VZBootLoader, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZBootLoader")]
pub struct VZLinuxBootLoader;
);
#[cfg(feature = "VZBootLoader")]
extern_conformance!(
unsafe impl NSCopying for VZLinuxBootLoader {}
);
#[cfg(feature = "VZBootLoader")]
unsafe impl CopyingHelper for VZLinuxBootLoader {
type Result = Self;
}
#[cfg(feature = "VZBootLoader")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZLinuxBootLoader {}
);
#[cfg(feature = "VZBootLoader")]
impl VZLinuxBootLoader {
extern_methods!(
/// Create a VZLinuxBootLoader with the Linux kernel passed as URL.
///
/// Parameter `kernelURL`: The URL of Linux kernel on the local file system.
#[unsafe(method(initWithKernelURL:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithKernelURL(
this: Allocated<Self>,
kernel_url: &NSURL,
) -> Retained<Self>;
/// URL of the Linux kernel.
#[unsafe(method(kernelURL))]
#[unsafe(method_family = none)]
pub unsafe fn kernelURL(&self) -> Retained<NSURL>;
/// Setter for [`kernelURL`][Self::kernelURL].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setKernelURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setKernelURL(&self, kernel_url: &NSURL);
/// Define the command-line parameters passed to the kernel on boot.
///
/// ```text
/// https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
///
/// ```
#[unsafe(method(commandLine))]
#[unsafe(method_family = none)]
pub unsafe fn commandLine(&self) -> Retained<NSString>;
/// Setter for [`commandLine`][Self::commandLine].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setCommandLine:))]
#[unsafe(method_family = none)]
pub unsafe fn setCommandLine(&self, command_line: &NSString);
/// Set the optional initial RAM disk. The RAM disk is mapped into memory before booting the kernel.
#[unsafe(method(initialRamdiskURL))]
#[unsafe(method_family = none)]
pub unsafe fn initialRamdiskURL(&self) -> Option<Retained<NSURL>>;
/// Setter for [`initialRamdiskURL`][Self::initialRamdiskURL].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setInitialRamdiskURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setInitialRamdiskURL(&self, initial_ramdisk_url: Option<&NSURL>);
);
}
/// Methods declared on superclass `VZBootLoader`.
#[cfg(feature = "VZBootLoader")]
impl VZLinuxBootLoader {
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>;
);
}