objc2_virtualization/generated/
VZSpiceAgentPortAttachment.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzspiceagentportattachment?language=objc)
12    #[unsafe(super(VZSerialPortAttachment, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "VZSerialPortAttachment")]
15    pub struct VZSpiceAgentPortAttachment;
16);
17
18#[cfg(feature = "VZSerialPortAttachment")]
19extern_conformance!(
20    unsafe impl NSObjectProtocol for VZSpiceAgentPortAttachment {}
21);
22
23#[cfg(feature = "VZSerialPortAttachment")]
24impl VZSpiceAgentPortAttachment {
25    extern_methods!(
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        /// Enable the Spice agent clipboard sharing capability.
31        ///
32        /// If enabled, the clipboard capability will be advertised to the Spice guest agent. Copy and paste events
33        /// will be shared between the host and the virtual machine.
34        ///
35        /// This property is enabled by default.
36        #[unsafe(method(sharesClipboard))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn sharesClipboard(&self) -> bool;
39
40        /// Setter for [`sharesClipboard`][Self::sharesClipboard].
41        #[unsafe(method(setSharesClipboard:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setSharesClipboard(&self, shares_clipboard: bool);
44
45        /// The Spice agent port name.
46        ///
47        /// A console port configured with this name will spawn a Spice guest agent if supported by the guest.
48        ///
49        /// VZConsolePortConfiguration.attachment must be set to VZSpiceAgentPortAttachment.
50        /// VZVirtioConsolePortConfiguration.isConsole must remain false on a Spice agent port.
51        #[unsafe(method(spiceAgentPortName))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn spiceAgentPortName() -> Retained<NSString>;
54    );
55}
56
57/// Methods declared on superclass `VZSerialPortAttachment`.
58#[cfg(feature = "VZSerialPortAttachment")]
59impl VZSpiceAgentPortAttachment {
60    extern_methods!(
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}