objc2_avf_audio/generated/
AVAudioSessionDeprecated.rs1use core::ffi::*;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[cfg(feature = "AVAudioSession")]
11impl AVAudioSession {
12 extern_methods!(
13 #[deprecated = "No longer supported"]
17 #[unsafe(method(delegate))]
18 #[unsafe(method_family = none)]
19 pub unsafe fn delegate(
20 &self,
21 ) -> Option<Retained<ProtocolObject<dyn AVAudioSessionDelegate>>>;
22
23 #[deprecated = "No longer supported"]
29 #[unsafe(method(setDelegate:))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn setDelegate(
32 &self,
33 delegate: Option<&ProtocolObject<dyn AVAudioSessionDelegate>>,
34 );
35
36 #[deprecated]
37 #[unsafe(method(setActive:withFlags:error:_))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn setActive_withFlags_error(
40 &self,
41 active: bool,
42 flags: NSInteger,
43 ) -> Result<(), Retained<NSError>>;
44
45 #[deprecated]
46 #[unsafe(method(inputIsAvailable))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn inputIsAvailable(&self) -> bool;
49
50 #[deprecated]
51 #[unsafe(method(currentHardwareSampleRate))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn currentHardwareSampleRate(&self) -> c_double;
54
55 #[deprecated]
56 #[unsafe(method(currentHardwareInputNumberOfChannels))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn currentHardwareInputNumberOfChannels(&self) -> NSInteger;
59
60 #[deprecated]
61 #[unsafe(method(currentHardwareOutputNumberOfChannels))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn currentHardwareOutputNumberOfChannels(&self) -> NSInteger;
64
65 #[deprecated]
66 #[unsafe(method(setPreferredHardwareSampleRate:error:_))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setPreferredHardwareSampleRate_error(
69 &self,
70 sample_rate: c_double,
71 ) -> Result<(), Retained<NSError>>;
72
73 #[deprecated]
74 #[unsafe(method(preferredHardwareSampleRate))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn preferredHardwareSampleRate(&self) -> c_double;
77 );
78}
79
80extern_protocol!(
81 #[deprecated = "No longer supported"]
83 pub unsafe trait AVAudioSessionDelegate: NSObjectProtocol {
84 #[deprecated = "No longer supported"]
85 #[optional]
86 #[unsafe(method(beginInterruption))]
87 #[unsafe(method_family = none)]
88 unsafe fn beginInterruption(&self);
89
90 #[optional]
91 #[unsafe(method(endInterruptionWithFlags:))]
92 #[unsafe(method_family = none)]
93 unsafe fn endInterruptionWithFlags(&self, flags: NSUInteger);
94
95 #[deprecated = "No longer supported"]
96 #[optional]
97 #[unsafe(method(endInterruption))]
98 #[unsafe(method_family = none)]
99 unsafe fn endInterruption(&self);
100
101 #[deprecated = "No longer supported"]
102 #[optional]
103 #[unsafe(method(inputIsAvailableChanged:))]
104 #[unsafe(method_family = none)]
105 unsafe fn inputIsAvailableChanged(&self, is_input_available: bool);
106 }
107);
108
109#[deprecated]
111pub const AVAudioSessionInterruptionFlags_ShouldResume: c_uint = 1;
112
113#[deprecated]
115pub const AVAudioSessionSetActiveFlags_NotifyOthersOnDeactivation: c_uint = 1;