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")]
23unsafe impl NSCopying for VZVirtioSoundDeviceOutputStreamConfiguration {}
24
25#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
26unsafe impl CopyingHelper for VZVirtioSoundDeviceOutputStreamConfiguration {
27    type Result = Self;
28}
29
30#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
31unsafe impl NSObjectProtocol for VZVirtioSoundDeviceOutputStreamConfiguration {}
32
33#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
34impl VZVirtioSoundDeviceOutputStreamConfiguration {
35    extern_methods!(
36        /// Initialize the output stream configuration.
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41        #[cfg(feature = "VZAudioOutputStreamSink")]
42        /// Audio Stream Sink. Defines how the audio data produced by the guest is handled on the host. The default is nil.
43        ///
44        /// Not specifying a Sink will have a default handler that swallows the audio.
45        ///
46        /// See: VZAudioOutputStreamSink
47        #[unsafe(method(sink))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn sink(&self) -> Option<Retained<VZAudioOutputStreamSink>>;
50
51        #[cfg(feature = "VZAudioOutputStreamSink")]
52        /// Setter for [`sink`][Self::sink].
53        #[unsafe(method(setSink:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setSink(&self, sink: Option<&VZAudioOutputStreamSink>);
56    );
57}
58
59/// Methods declared on superclass `VZVirtioSoundDeviceStreamConfiguration`.
60#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
61impl VZVirtioSoundDeviceOutputStreamConfiguration {
62    extern_methods!(
63        #[unsafe(method(new))]
64        #[unsafe(method_family = new)]
65        pub unsafe fn new() -> Retained<Self>;
66    );
67}