#[cfg(doc)]
use crate::enums::HWVirtExPropertyType;
#[cfg(doc)]
use crate::Machine;
use crate::{PlatformProperties, VboxError};
use crate::utility::macros::macros::{get_function_result_bool, get_function_result_number, get_function_result_unit};
impl PlatformProperties {
pub fn get_raw_mode_supported(&self) -> Result<bool, VboxError> {
get_function_result_bool!(self.object, GetRawModeSupported)
}
pub fn get_exclusive_hw_virt(&self) -> Result<bool, VboxError> {
get_function_result_bool!(self.object, GetExclusiveHwVirt)
}
pub fn set_exclusive_hw_virt(&self, exclusive_hw_virt: bool) -> Result<(), VboxError> {
let exclusive_hw_virt = if exclusive_hw_virt { 1 } else { 0 };
get_function_result_unit!(self.object, SetExclusiveHwVirt, exclusive_hw_virt)
}
pub fn get_serial_port_count(&self) -> Result<u32, VboxError> {
get_function_result_number!(self.object, GetSerialPortCount, u32)
}
pub fn get_parallel_port_count(&self) -> Result<u32, VboxError> {
get_function_result_number!(self.object, GetParallelPortCount, u32)
}
pub fn get_max_boot_position(&self) -> Result<u32, VboxError> {
get_function_result_number!(self.object, GetMaxBootPosition, u32)
}
}