objc2_avf_audio/generated/
AVAudioSessionDeprecated.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// AVAudioSessionDeprecated.
10#[cfg(feature = "AVAudioSession")]
11impl AVAudioSession {
12    extern_methods!(
13        #[deprecated = "No longer supported"]
14        #[unsafe(method(delegate))]
15        #[unsafe(method_family = none)]
16        pub unsafe fn delegate(
17            &self,
18        ) -> Option<Retained<ProtocolObject<dyn AVAudioSessionDelegate>>>;
19
20        /// Setter for [`delegate`][Self::delegate].
21        #[deprecated = "No longer supported"]
22        #[unsafe(method(setDelegate:))]
23        #[unsafe(method_family = none)]
24        pub unsafe fn setDelegate(
25            &self,
26            delegate: Option<&ProtocolObject<dyn AVAudioSessionDelegate>>,
27        );
28
29        #[deprecated]
30        #[unsafe(method(setActive:withFlags:error:_))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn setActive_withFlags_error(
33            &self,
34            active: bool,
35            flags: NSInteger,
36        ) -> Result<(), Retained<NSError>>;
37
38        #[deprecated]
39        #[unsafe(method(inputIsAvailable))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn inputIsAvailable(&self) -> bool;
42
43        #[deprecated]
44        #[unsafe(method(currentHardwareSampleRate))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn currentHardwareSampleRate(&self) -> c_double;
47
48        #[deprecated]
49        #[unsafe(method(currentHardwareInputNumberOfChannels))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn currentHardwareInputNumberOfChannels(&self) -> NSInteger;
52
53        #[deprecated]
54        #[unsafe(method(currentHardwareOutputNumberOfChannels))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn currentHardwareOutputNumberOfChannels(&self) -> NSInteger;
57
58        #[deprecated]
59        #[unsafe(method(setPreferredHardwareSampleRate:error:_))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn setPreferredHardwareSampleRate_error(
62            &self,
63            sample_rate: c_double,
64        ) -> Result<(), Retained<NSError>>;
65
66        #[deprecated]
67        #[unsafe(method(preferredHardwareSampleRate))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn preferredHardwareSampleRate(&self) -> c_double;
70    );
71}
72
73extern_protocol!(
74    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessiondelegate?language=objc)
75    #[deprecated = "No longer supported"]
76    pub unsafe trait AVAudioSessionDelegate: NSObjectProtocol {
77        #[deprecated = "No longer supported"]
78        #[optional]
79        #[unsafe(method(beginInterruption))]
80        #[unsafe(method_family = none)]
81        unsafe fn beginInterruption(&self);
82
83        #[optional]
84        #[unsafe(method(endInterruptionWithFlags:))]
85        #[unsafe(method_family = none)]
86        unsafe fn endInterruptionWithFlags(&self, flags: NSUInteger);
87
88        #[deprecated = "No longer supported"]
89        #[optional]
90        #[unsafe(method(endInterruption))]
91        #[unsafe(method_family = none)]
92        unsafe fn endInterruption(&self);
93
94        #[deprecated = "No longer supported"]
95        #[optional]
96        #[unsafe(method(inputIsAvailableChanged:))]
97        #[unsafe(method_family = none)]
98        unsafe fn inputIsAvailableChanged(&self, is_input_available: bool);
99    }
100);
101
102/// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessioninterruptionflags_shouldresume?language=objc)
103#[deprecated]
104pub const AVAudioSessionInterruptionFlags_ShouldResume: c_uint = 1;
105
106/// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionsetactiveflags_notifyothersondeactivation?language=objc)
107#[deprecated]
108pub const AVAudioSessionSetActiveFlags_NotifyOthersOnDeactivation: c_uint = 1;