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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Caching options for a Unix Domain Socket.
///
/// This object configures Rosetta to communicate with the Rosetta daemon using a Unix Domain Socket.
///
/// See: VZLinuxRosettaCachingOptions
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzlinuxrosettaunixsocketcachingoptions?language=objc)
#[unsafe(super(VZLinuxRosettaCachingOptions, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
pub struct VZLinuxRosettaUnixSocketCachingOptions;
);
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZLinuxRosettaUnixSocketCachingOptions {}
);
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
impl VZLinuxRosettaUnixSocketCachingOptions {
extern_methods!(
/// Initialize options to be set on a VZLinuxRosettaDirectoryShare.
///
/// Parameter `path`: The path of the Unix Domain Socket to be used to communicate with the Rosetta translation daemon. This cannot exceed maximumPathLength UTF-8 bytes long.
///
/// Parameter `error`: If not nil, assigned with the error if the initialization failed.
///
/// Rosetta can be optionally configured to use cached translations from the Rosetta translation daemon communicating through a Unix Domain Socket.
/// If path exceeds maximumPathLength UTF-8 bytes, nil is returned and the error is set.
/// The guest operating system must have a directory at path created in order for translation caching to operate correctly.
#[unsafe(method(initWithPath:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPath_error(
this: Allocated<Self>,
path: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
/// Initialize default options to be set on a VZLinuxRosettaDirectoryShare.
///
/// The default translation caching configuration uses a Unix Domain Socket at /run/rosettad/rosetta.sock.
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Path set by initWithPath.
///
/// This is the path of the Unix Domain Socket to be used by Rosetta.
#[unsafe(method(path))]
#[unsafe(method_family = none)]
pub unsafe fn path(&self) -> Retained<NSString>;
/// The maximum allowed length of path, as defined by the sockaddr_un structure in Linux.
#[unsafe(method(maximumPathLength))]
#[unsafe(method_family = none)]
pub unsafe fn maximumPathLength() -> NSUInteger;
);
}
/// Methods declared on superclass `VZLinuxRosettaCachingOptions`.
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
impl VZLinuxRosettaUnixSocketCachingOptions {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}