use core::ffi::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "AVAudioSession")]
impl AVAudioSession {
extern_methods!(
#[deprecated = "No longer supported"]
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn AVAudioSessionDelegate>>>;
#[deprecated = "No longer supported"]
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn AVAudioSessionDelegate>>,
);
#[deprecated]
#[unsafe(method(setActive:withFlags:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn setActive_withFlags_error(
&self,
active: bool,
flags: NSInteger,
) -> Result<(), Retained<NSError>>;
#[deprecated]
#[unsafe(method(inputIsAvailable))]
#[unsafe(method_family = none)]
pub unsafe fn inputIsAvailable(&self) -> bool;
#[deprecated]
#[unsafe(method(currentHardwareSampleRate))]
#[unsafe(method_family = none)]
pub unsafe fn currentHardwareSampleRate(&self) -> c_double;
#[deprecated]
#[unsafe(method(currentHardwareInputNumberOfChannels))]
#[unsafe(method_family = none)]
pub unsafe fn currentHardwareInputNumberOfChannels(&self) -> NSInteger;
#[deprecated]
#[unsafe(method(currentHardwareOutputNumberOfChannels))]
#[unsafe(method_family = none)]
pub unsafe fn currentHardwareOutputNumberOfChannels(&self) -> NSInteger;
#[deprecated]
#[unsafe(method(setPreferredHardwareSampleRate:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn setPreferredHardwareSampleRate_error(
&self,
sample_rate: c_double,
) -> Result<(), Retained<NSError>>;
#[deprecated]
#[unsafe(method(preferredHardwareSampleRate))]
#[unsafe(method_family = none)]
pub unsafe fn preferredHardwareSampleRate(&self) -> c_double;
);
}
extern_protocol!(
#[deprecated = "No longer supported"]
pub unsafe trait AVAudioSessionDelegate: NSObjectProtocol {
#[deprecated = "No longer supported"]
#[optional]
#[unsafe(method(beginInterruption))]
#[unsafe(method_family = none)]
unsafe fn beginInterruption(&self);
#[optional]
#[unsafe(method(endInterruptionWithFlags:))]
#[unsafe(method_family = none)]
unsafe fn endInterruptionWithFlags(&self, flags: NSUInteger);
#[deprecated = "No longer supported"]
#[optional]
#[unsafe(method(endInterruption))]
#[unsafe(method_family = none)]
unsafe fn endInterruption(&self);
#[deprecated = "No longer supported"]
#[optional]
#[unsafe(method(inputIsAvailableChanged:))]
#[unsafe(method_family = none)]
unsafe fn inputIsAvailableChanged(&self, is_input_available: bool);
}
);
#[deprecated]
pub const AVAudioSessionInterruptionFlags_ShouldResume: c_uint = 1;
#[deprecated]
pub const AVAudioSessionSetActiveFlags_NotifyOthersOnDeactivation: c_uint = 1;