objc2_home_kit/generated/
HMCameraStream.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Represents a camera stream.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcamerastream?language=objc)
14    #[unsafe(super(HMCameraSource, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "HMCameraSource")]
17    pub struct HMCameraStream;
18);
19
20#[cfg(feature = "HMCameraSource")]
21unsafe impl Send for HMCameraStream {}
22
23#[cfg(feature = "HMCameraSource")]
24unsafe impl Sync for HMCameraStream {}
25
26#[cfg(feature = "HMCameraSource")]
27unsafe impl NSObjectProtocol for HMCameraStream {}
28
29#[cfg(feature = "HMCameraSource")]
30impl HMCameraStream {
31    extern_methods!(
32        #[cfg(feature = "HMCameraDefines")]
33        /// Represents the audio setting for the current stream.
34        #[unsafe(method(audioStreamSetting))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn audioStreamSetting(&self) -> HMCameraAudioStreamSetting;
37
38        #[cfg(feature = "HMCameraDefines")]
39        /// Sets the audio stream setting.
40        ///
41        ///
42        /// Parameter `audioStreamSetting`: New audio stream setting.
43        #[deprecated]
44        #[unsafe(method(setAudioStreamSetting:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setAudioStreamSetting(
47            &self,
48            audio_stream_setting: HMCameraAudioStreamSetting,
49        );
50
51        #[cfg(all(feature = "HMCameraDefines", feature = "block2"))]
52        /// Updates the settings of the audio stream.
53        ///
54        ///
55        /// Parameter `audioStreamSetting`: New audio stream setting. Bidirectional audio is not allowed on TVOS.
56        ///
57        ///
58        /// Parameter `completion`: Block that is invoked once the request is processed.
59        /// The NSError provides more information on the status of the request, error
60        /// will be nil on success.
61        #[unsafe(method(updateAudioStreamSetting:completionHandler:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn updateAudioStreamSetting_completionHandler(
64            &self,
65            audio_stream_setting: HMCameraAudioStreamSetting,
66            completion: &block2::Block<dyn Fn(*mut NSError)>,
67        );
68
69        #[deprecated = "HMCameraStream objects are created by their parent container objects. Directly creating them is not supported."]
70        #[unsafe(method(init))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73    );
74}
75
76/// Methods declared on superclass `NSObject`.
77#[cfg(feature = "HMCameraSource")]
78impl HMCameraStream {
79    extern_methods!(
80        #[unsafe(method(new))]
81        #[unsafe(method_family = new)]
82        pub unsafe fn new() -> Retained<Self>;
83    );
84}