objc2-virtualization 0.3.2

Bindings to the Virtualization framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// Virtio Sound Device Input Stream Configuration.
    ///
    /// A PCM stream of input audio data, such as from a microphone.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceinputstreamconfiguration?language=objc)
    #[unsafe(super(VZVirtioSoundDeviceStreamConfiguration, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
    pub struct VZVirtioSoundDeviceInputStreamConfiguration;
);

#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
extern_conformance!(
    unsafe impl NSCopying for VZVirtioSoundDeviceInputStreamConfiguration {}
);

#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
unsafe impl CopyingHelper for VZVirtioSoundDeviceInputStreamConfiguration {
    type Result = Self;
}

#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
extern_conformance!(
    unsafe impl NSObjectProtocol for VZVirtioSoundDeviceInputStreamConfiguration {}
);

#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
impl VZVirtioSoundDeviceInputStreamConfiguration {
    extern_methods!(
        /// Initialize the input stream configuration.
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "VZAudioInputStreamSource")]
        /// Audio Stream Source. Defines how the audio data is supplied on the host for the guest. The default is nil.
        ///
        /// Not specifying a Source will have a default handler that produces audio silence.
        ///
        /// See: VZAudioInputStreamSource
        #[unsafe(method(source))]
        #[unsafe(method_family = none)]
        pub unsafe fn source(&self) -> Option<Retained<VZAudioInputStreamSource>>;

        #[cfg(feature = "VZAudioInputStreamSource")]
        /// Setter for [`source`][Self::source].
        #[unsafe(method(setSource:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSource(&self, source: Option<&VZAudioInputStreamSource>);
    );
}

/// Methods declared on superclass `VZVirtioSoundDeviceStreamConfiguration`.
#[cfg(feature = "VZVirtioSoundDeviceStreamConfiguration")]
impl VZVirtioSoundDeviceInputStreamConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}