objc2_avf_audio/generated/
AVAudioConnectionPoint.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// A representation of either a source or destination connection point in AVAudioEngine.
10    ///
11    /// AVAudioConnectionPoint describes either a source or destination connection point (node, bus)
12    /// in AVAudioEngine's graph.
13    ///
14    /// Instances of this class are immutable.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudioconnectionpoint?language=objc)
17    #[unsafe(super(NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    pub struct AVAudioConnectionPoint;
20);
21
22unsafe impl NSObjectProtocol for AVAudioConnectionPoint {}
23
24impl AVAudioConnectionPoint {
25    extern_methods!(
26        #[cfg(all(feature = "AVAudioNode", feature = "AVAudioTypes"))]
27        /// Create a connection point object.
28        ///
29        /// Parameter `node`: the source or destination node
30        ///
31        /// Parameter `bus`: the output or input bus on the node
32        ///
33        /// If the node is nil, this method fails (returns nil).
34        #[unsafe(method(initWithNode:bus:))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn initWithNode_bus(
37            this: Allocated<Self>,
38            node: &AVAudioNode,
39            bus: AVAudioNodeBus,
40        ) -> Retained<Self>;
41
42        #[unsafe(method(init))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46        #[cfg(feature = "AVAudioNode")]
47        /// Returns the node in the connection point.
48        #[unsafe(method(node))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn node(&self) -> Option<Retained<AVAudioNode>>;
51
52        #[cfg(feature = "AVAudioTypes")]
53        /// Returns the bus on the node in the connection point.
54        #[unsafe(method(bus))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn bus(&self) -> AVAudioNodeBus;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61impl AVAudioConnectionPoint {
62    extern_methods!(
63        #[unsafe(method(new))]
64        #[unsafe(method_family = new)]
65        pub unsafe fn new() -> Retained<Self>;
66    );
67}