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
22extern_conformance!(
23    unsafe impl NSObjectProtocol for AVAudioConnectionPoint {}
24);
25
26impl AVAudioConnectionPoint {
27    extern_methods!(
28        #[cfg(all(feature = "AVAudioNode", feature = "AVAudioTypes"))]
29        /// Create a connection point object.
30        ///
31        /// Parameter `node`: the source or destination node
32        ///
33        /// Parameter `bus`: the output or input bus on the node
34        ///
35        /// If the node is nil, this method fails (returns nil).
36        #[unsafe(method(initWithNode:bus:))]
37        #[unsafe(method_family = init)]
38        pub unsafe fn initWithNode_bus(
39            this: Allocated<Self>,
40            node: &AVAudioNode,
41            bus: AVAudioNodeBus,
42        ) -> Retained<Self>;
43
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[cfg(feature = "AVAudioNode")]
49        /// Returns the node in the connection point.
50        #[unsafe(method(node))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn node(&self) -> Option<Retained<AVAudioNode>>;
53
54        #[cfg(feature = "AVAudioTypes")]
55        /// Returns the bus on the node in the connection point.
56        #[unsafe(method(bus))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn bus(&self) -> AVAudioNodeBus;
59    );
60}
61
62/// Methods declared on superclass `NSObject`.
63impl AVAudioConnectionPoint {
64    extern_methods!(
65        #[unsafe(method(new))]
66        #[unsafe(method_family = new)]
67        pub unsafe fn new() -> Retained<Self>;
68    );
69}