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")]
27extern_conformance!(
28    unsafe impl NSObjectProtocol for HMCameraStream {}
29);
30
31#[cfg(feature = "HMCameraSource")]
32impl HMCameraStream {
33    extern_methods!(
34        #[cfg(feature = "HMCameraDefines")]
35        /// Represents the audio setting for the current stream.
36        ///
37        /// This property is not atomic.
38        ///
39        /// # Safety
40        ///
41        /// This might not be thread-safe.
42        #[unsafe(method(audioStreamSetting))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn audioStreamSetting(&self) -> HMCameraAudioStreamSetting;
45
46        #[cfg(feature = "HMCameraDefines")]
47        /// Sets the audio stream setting.
48        ///
49        ///
50        /// Parameter `audioStreamSetting`: New audio stream setting.
51        #[deprecated]
52        #[unsafe(method(setAudioStreamSetting:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setAudioStreamSetting(
55            &self,
56            audio_stream_setting: HMCameraAudioStreamSetting,
57        );
58
59        #[cfg(all(feature = "HMCameraDefines", feature = "block2"))]
60        /// Updates the settings of the audio stream.
61        ///
62        ///
63        /// Parameter `audioStreamSetting`: New audio stream setting. Bidirectional audio is not allowed on TVOS.
64        ///
65        ///
66        /// Parameter `completion`: Block that is invoked once the request is processed.
67        /// The NSError provides more information on the status of the request, error
68        /// will be nil on success.
69        #[unsafe(method(updateAudioStreamSetting:completionHandler:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn updateAudioStreamSetting_completionHandler(
72            &self,
73            audio_stream_setting: HMCameraAudioStreamSetting,
74            completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
75        );
76
77        #[deprecated = "HMCameraStream objects are created by their parent container objects. Directly creating them is not supported."]
78        #[unsafe(method(init))]
79        #[unsafe(method_family = init)]
80        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81    );
82}
83
84/// Methods declared on superclass `NSObject`.
85#[cfg(feature = "HMCameraSource")]
86impl HMCameraStream {
87    extern_methods!(
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91    );
92}