objc2_virtualization/generated/
VZSharedDirectory.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A directory on the host that can be exposed to a guest.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzshareddirectory?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct VZSharedDirectory;
16);
17
18unsafe impl NSObjectProtocol for VZSharedDirectory {}
19
20impl VZSharedDirectory {
21    extern_methods!(
22        #[unsafe(method(new))]
23        #[unsafe(method_family = new)]
24        pub unsafe fn new() -> Retained<Self>;
25
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        /// Initialize with a host directory.
31        ///
32        /// Parameter `url`: Local file URL to expose to the guest.
33        ///
34        /// Parameter `readOnly`: Whether or not the directory will be exposed as read-only to the guest.
35        #[unsafe(method(initWithURL:readOnly:))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn initWithURL_readOnly(
38            this: Allocated<Self>,
39            url: &NSURL,
40            read_only: bool,
41        ) -> Retained<Self>;
42
43        /// File URL to a directory on the host to expose to the guest.
44        ///
45        /// The URL must point to an existing directory path in the host file system.
46        #[unsafe(method(URL))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn URL(&self) -> Retained<NSURL>;
49
50        /// Whether or not the directory will be exposed as read-only to the guest.
51        #[unsafe(method(isReadOnly))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn isReadOnly(&self) -> bool;
54    );
55}