objc2_virtualization/generated/
VZVirtioSoundDeviceOutputStreamConfiguration.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    /// Virtio Sound Device Output Stream Configuration.
12    ///
13    /// A PCM stream of output audio data, such as to a speaker.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceoutputstreamconfiguration?language=objc)
16    #[unsafe(super(VZVirtioSoundDeviceStreamConfiguration, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
19    pub struct VZVirtioSoundDeviceOutputStreamConfiguration;
20);
21
22#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
23extern_conformance!(
24    unsafe impl NSCopying for VZVirtioSoundDeviceOutputStreamConfiguration {}
25);
26
27#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
28unsafe impl CopyingHelper for VZVirtioSoundDeviceOutputStreamConfiguration {
29    type Result = Self;
30}
31
32#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
33extern_conformance!(
34    unsafe impl NSObjectProtocol for VZVirtioSoundDeviceOutputStreamConfiguration {}
35);
36
37#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
38impl VZVirtioSoundDeviceOutputStreamConfiguration {
39    extern_methods!(
40        /// Initialize the output stream configuration.
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[cfg(feature = "VZAudioOutputStreamSink")]
46        /// Audio Stream Sink. Defines how the audio data produced by the guest is handled on the host. The default is nil.
47        ///
48        /// Not specifying a Sink will have a default handler that swallows the audio.
49        ///
50        /// See: VZAudioOutputStreamSink
51        #[unsafe(method(sink))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn sink(&self) -> Option<Retained<VZAudioOutputStreamSink>>;
54
55        #[cfg(feature = "VZAudioOutputStreamSink")]
56        /// Setter for [`sink`][Self::sink].
57        #[unsafe(method(setSink:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setSink(&self, sink: Option<&VZAudioOutputStreamSink>);
60    );
61}
62
63/// Methods declared on superclass `VZVirtioSoundDeviceStreamConfiguration`.
64#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
65impl VZVirtioSoundDeviceOutputStreamConfiguration {
66    extern_methods!(
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}