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
//! 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 an Abstract Socket.
///
/// This object configures Rosetta to communicate with the Rosetta daemon using an Abstract Socket.
///
/// See: VZLinuxRosettaCachingOptions
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzlinuxrosettaabstractsocketcachingoptions?language=objc)
#[unsafe(super(VZLinuxRosettaCachingOptions, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
pub struct VZLinuxRosettaAbstractSocketCachingOptions;
);
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZLinuxRosettaAbstractSocketCachingOptions {}
);
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
impl VZLinuxRosettaAbstractSocketCachingOptions {
extern_methods!(
/// Initialize options to be set on a VZLinuxRosettaDirectoryShare.
///
/// Parameter `name`: The name of the Abstract Socket to be used to communicate with the Rosetta translation daemon. This cannot exceed maximumNameLength 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 an Abstract Socket.
/// If name exceeds maximumNameLength UTF-8 bytes, nil is returned and the error is set.
#[unsafe(method(initWithName:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_error(
this: Allocated<Self>,
name: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
/// Name set by initWithName.
///
/// This is the name of the Abstract Socket to be used by Rosetta.
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
/// The maximum allowed length of name, as defined by the sockaddr_un structure in Linux.
#[unsafe(method(maximumNameLength))]
#[unsafe(method_family = none)]
pub unsafe fn maximumNameLength() -> NSUInteger;
);
}
/// Methods declared on superclass `VZLinuxRosettaCachingOptions`.
#[cfg(feature = "VZLinuxRosettaCachingOptions")]
impl VZLinuxRosettaAbstractSocketCachingOptions {
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>;
);
}