objc2_virtualization/generated/
VZSingleDirectoryShare.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// Directory share for a single directory.
10    ///
11    /// This directory share exposes a single directory from the host file system to the guest.
12    ///
13    /// See: VZDirectorySharingDeviceConfiguration
14    ///
15    /// See: VZSharedDirectory
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzsingledirectoryshare?language=objc)
18    #[unsafe(super(VZDirectoryShare, NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(feature = "VZDirectoryShare")]
21    pub struct VZSingleDirectoryShare;
22);
23
24#[cfg(feature = "VZDirectoryShare")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for VZSingleDirectoryShare {}
27);
28
29#[cfg(feature = "VZDirectoryShare")]
30impl VZSingleDirectoryShare {
31    extern_methods!(
32        #[cfg(feature = "VZSharedDirectory")]
33        /// Initialize the directory share with a directory on the host.
34        ///
35        /// Parameter `directory`: Directory to share.
36        #[unsafe(method(initWithDirectory:))]
37        #[unsafe(method_family = init)]
38        pub unsafe fn initWithDirectory(
39            this: Allocated<Self>,
40            directory: &VZSharedDirectory,
41        ) -> Retained<Self>;
42
43        #[cfg(feature = "VZSharedDirectory")]
44        /// Directory on the host to share.
45        #[unsafe(method(directory))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn directory(&self) -> Retained<VZSharedDirectory>;
48    );
49}
50
51/// Methods declared on superclass `VZDirectoryShare`.
52#[cfg(feature = "VZDirectoryShare")]
53impl VZSingleDirectoryShare {
54    extern_methods!(
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62    );
63}