objc2-virtualization 0.3.2

Bindings to the Virtualization framework
Documentation
//! 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 booting guest operating systems expecting an EFI ROM.
    ///
    /// You must use a VZGenericPlatformConfiguration in conjunction with the EFI 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/vzefibootloader?language=objc)
    #[unsafe(super(VZBootLoader, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "VZBootLoader")]
    pub struct VZEFIBootLoader;
);

#[cfg(feature = "VZBootLoader")]
extern_conformance!(
    unsafe impl NSCopying for VZEFIBootLoader {}
);

#[cfg(feature = "VZBootLoader")]
unsafe impl CopyingHelper for VZEFIBootLoader {
    type Result = Self;
}

#[cfg(feature = "VZBootLoader")]
extern_conformance!(
    unsafe impl NSObjectProtocol for VZEFIBootLoader {}
);

#[cfg(feature = "VZBootLoader")]
impl VZEFIBootLoader {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "VZEFIVariableStore")]
        /// The EFI variable store.
        #[unsafe(method(variableStore))]
        #[unsafe(method_family = none)]
        pub unsafe fn variableStore(&self) -> Option<Retained<VZEFIVariableStore>>;

        #[cfg(feature = "VZEFIVariableStore")]
        /// Setter for [`variableStore`][Self::variableStore].
        #[unsafe(method(setVariableStore:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVariableStore(&self, variable_store: Option<&VZEFIVariableStore>);
    );
}

/// Methods declared on superclass `VZBootLoader`.
#[cfg(feature = "VZBootLoader")]
impl VZEFIBootLoader {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}