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
18extern_conformance!(
19    unsafe impl NSObjectProtocol for VZSharedDirectory {}
20);
21
22impl VZSharedDirectory {
23    extern_methods!(
24        #[unsafe(method(new))]
25        #[unsafe(method_family = new)]
26        pub unsafe fn new() -> Retained<Self>;
27
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        /// Initialize with a host directory.
33        ///
34        /// Parameter `url`: Local file URL to expose to the guest.
35        ///
36        /// Parameter `readOnly`: Whether or not the directory will be exposed as read-only to the guest.
37        #[unsafe(method(initWithURL:readOnly:))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn initWithURL_readOnly(
40            this: Allocated<Self>,
41            url: &NSURL,
42            read_only: bool,
43        ) -> Retained<Self>;
44
45        /// File URL to a directory on the host to expose to the guest.
46        ///
47        /// The URL must point to an existing directory path in the host file system.
48        #[unsafe(method(URL))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn URL(&self) -> Retained<NSURL>;
51
52        /// Whether or not the directory will be exposed as read-only to the guest.
53        #[unsafe(method(isReadOnly))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn isReadOnly(&self) -> bool;
56    );
57}