objc2_virtualization/generated/VZVirtioFileSystemDevice.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 /// Virtio File System Device
12 ///
13 /// This is a device that exposes host resources to the guest as a file system mount.
14 /// The directory share defines which host resources are exposed to the guest.
15 ///
16 /// This device is created through instantiating a VZVirtioFileSystemDeviceConfiguration in a VZVirtualMachineConfiguration and is available in the
17 /// VZVirtualMachine.directorySharingDevices property.
18 ///
19 /// See: VZVirtioFileSystemDeviceConfiguration
20 ///
21 /// See: VZSingleDirectoryShare
22 ///
23 /// See: VZMultipleDirectoryShare
24 ///
25 /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtiofilesystemdevice?language=objc)
26 #[unsafe(super(VZDirectorySharingDevice, NSObject))]
27 #[derive(Debug, PartialEq, Eq, Hash)]
28 #[cfg(feature = "VZDirectorySharingDevice")]
29 pub struct VZVirtioFileSystemDevice;
30);
31
32#[cfg(feature = "VZDirectorySharingDevice")]
33extern_conformance!(
34 unsafe impl NSObjectProtocol for VZVirtioFileSystemDevice {}
35);
36
37#[cfg(feature = "VZDirectorySharingDevice")]
38impl VZVirtioFileSystemDevice {
39 extern_methods!(
40 /// The tag is a string identifying the device.
41 ///
42 /// The tag is presented as a label in the guest identifying this device for mounting.
43 #[unsafe(method(tag))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn tag(&self) -> Retained<NSString>;
46
47 #[cfg(feature = "VZDirectoryShare")]
48 /// Directory share. Defines how host resources are exposed to the guest virtual machine.
49 ///
50 /// Setting this property to VZLinuxRosettaDirectoryShare is not supported and will cause an exception to be raised.
51 ///
52 /// See: VZSingleDirectoryShare
53 ///
54 /// See: VZMultipleDirectoryShare
55 #[unsafe(method(share))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn share(&self) -> Option<Retained<VZDirectoryShare>>;
58
59 #[cfg(feature = "VZDirectoryShare")]
60 /// Setter for [`share`][Self::share].
61 #[unsafe(method(setShare:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setShare(&self, share: Option<&VZDirectoryShare>);
64 );
65}
66
67/// Methods declared on superclass `VZDirectorySharingDevice`.
68#[cfg(feature = "VZDirectorySharingDevice")]
69impl VZVirtioFileSystemDevice {
70 extern_methods!(
71 #[unsafe(method(new))]
72 #[unsafe(method_family = new)]
73 pub unsafe fn new() -> Retained<Self>;
74
75 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78 );
79}