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
111
112
113
114
115
116
117
118
//! 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!(
/// Configuration of a Virtio file system device.
///
/// This configuration creates a Virtio file system device which allows for exposing
/// directories on the host to a guest via a tag label.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtiofilesystemdeviceconfiguration?language=objc)
#[unsafe(super(VZDirectorySharingDeviceConfiguration, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
pub struct VZVirtioFileSystemDeviceConfiguration;
);
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
extern_conformance!(
unsafe impl NSCopying for VZVirtioFileSystemDeviceConfiguration {}
);
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
unsafe impl CopyingHelper for VZVirtioFileSystemDeviceConfiguration {
type Result = Self;
}
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZVirtioFileSystemDeviceConfiguration {}
);
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
impl VZVirtioFileSystemDeviceConfiguration {
extern_methods!(
/// Configuration of the Virtio file system device.
///
/// Parameter `tag`: The label identifying this device in the guest.
///
/// The tag is presented as a label in the guest identifying this device for mounting. The tag must be valid, which can be checked with +[VZVirtioFileSystemDeviceConfiguration validateTag:error:].
///
/// See: +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]
#[unsafe(method(initWithTag:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTag(this: Allocated<Self>, tag: &NSString) -> Retained<Self>;
/// Check if tag is a valid Virtio file system tag.
///
/// Parameter `tag`: The tag to validate.
///
/// Parameter `error`: If not nil, assigned with an error describing why the tag is not valid.
///
/// The tag must be non-empty and less than 36 bytes when encoded in UTF-8.
#[unsafe(method(validateTag:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn validateTag_error(tag: &NSString) -> Result<(), Retained<NSError>>;
/// The tag is a string identifying the device.
///
/// The tag is presented as a label in the guest identifying this device for mounting. The tag must be valid, which can be checked with +[VZVirtioFileSystemDeviceConfiguration validateTag:error:].
///
/// See: +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]
#[unsafe(method(tag))]
#[unsafe(method_family = none)]
pub unsafe fn tag(&self) -> Retained<NSString>;
/// Setter for [`tag`][Self::tag].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setTag:))]
#[unsafe(method_family = none)]
pub unsafe fn setTag(&self, tag: &NSString);
#[cfg(feature = "VZDirectoryShare")]
/// Directory share. Defines how host resources are exposed to the guest virtual machine.
///
/// See: VZSingleDirectoryShare
///
/// See: VZMultipleDirectoryShare
///
/// See: VZLinuxRosettaDirectoryShare
#[unsafe(method(share))]
#[unsafe(method_family = none)]
pub unsafe fn share(&self) -> Option<Retained<VZDirectoryShare>>;
#[cfg(feature = "VZDirectoryShare")]
/// Setter for [`share`][Self::share].
#[unsafe(method(setShare:))]
#[unsafe(method_family = none)]
pub unsafe fn setShare(&self, share: Option<&VZDirectoryShare>);
/// The macOS automount tag.
///
/// A device configured with this tag will be automatically mounted in a macOS guest.
#[unsafe(method(macOSGuestAutomountTag))]
#[unsafe(method_family = none)]
pub unsafe fn macOSGuestAutomountTag() -> Retained<NSString>;
);
}
/// Methods declared on superclass `VZDirectorySharingDeviceConfiguration`.
#[cfg(feature = "VZDirectorySharingDeviceConfiguration")]
impl VZVirtioFileSystemDeviceConfiguration {
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>;
);
}