objc2_home_kit/generated/
HMCameraProfile.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    /// Represents a camera profile the accessory implements.
10    ///
11    ///
12    /// Provides an interface to interact with a Camera in an Accessory.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcameraprofile?language=objc)
15    #[unsafe(super(HMAccessoryProfile, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "HMAccessoryProfile")]
18    pub struct HMCameraProfile;
19);
20
21#[cfg(feature = "HMAccessoryProfile")]
22unsafe impl Send for HMCameraProfile {}
23
24#[cfg(feature = "HMAccessoryProfile")]
25unsafe impl Sync for HMCameraProfile {}
26
27#[cfg(feature = "HMAccessoryProfile")]
28extern_conformance!(
29    unsafe impl NSObjectProtocol for HMCameraProfile {}
30);
31
32#[cfg(feature = "HMAccessoryProfile")]
33impl HMCameraProfile {
34    extern_methods!(
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[cfg(all(feature = "HMCameraControl", feature = "HMCameraStreamControl"))]
40        /// Object that can be used to control the camera stream.
41        ///
42        /// This property is not atomic.
43        ///
44        /// # Safety
45        ///
46        /// This might not be thread-safe.
47        #[unsafe(method(streamControl))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn streamControl(&self) -> Option<Retained<HMCameraStreamControl>>;
50
51        #[cfg(all(feature = "HMCameraControl", feature = "HMCameraSnapshotControl"))]
52        /// Object that can be used to take image snapshots from the camera.
53        ///
54        /// This property is not atomic.
55        ///
56        /// # Safety
57        ///
58        /// This might not be thread-safe.
59        #[unsafe(method(snapshotControl))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn snapshotControl(&self) -> Option<Retained<HMCameraSnapshotControl>>;
62
63        #[cfg(all(feature = "HMCameraControl", feature = "HMCameraSettingsControl"))]
64        /// Object that can be used to control the settings on the camera.
65        ///
66        /// This property is not atomic.
67        ///
68        /// # Safety
69        ///
70        /// This might not be thread-safe.
71        #[unsafe(method(settingsControl))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn settingsControl(&self) -> Option<Retained<HMCameraSettingsControl>>;
74
75        #[cfg(all(feature = "HMCameraAudioControl", feature = "HMCameraControl"))]
76        /// Object that can be used to control the speaker settings on the camera.
77        ///
78        /// This property is not atomic.
79        ///
80        /// # Safety
81        ///
82        /// This might not be thread-safe.
83        #[unsafe(method(speakerControl))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn speakerControl(&self) -> Option<Retained<HMCameraAudioControl>>;
86
87        #[cfg(all(feature = "HMCameraAudioControl", feature = "HMCameraControl"))]
88        /// Object that can be used to control the microphone settings on the camera.
89        ///
90        /// This property is not atomic.
91        ///
92        /// # Safety
93        ///
94        /// This might not be thread-safe.
95        #[unsafe(method(microphoneControl))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn microphoneControl(&self) -> Option<Retained<HMCameraAudioControl>>;
98    );
99}
100
101/// Methods declared on superclass `NSObject`.
102#[cfg(feature = "HMAccessoryProfile")]
103impl HMCameraProfile {
104    extern_methods!(
105        #[unsafe(method(new))]
106        #[unsafe(method_family = new)]
107        pub unsafe fn new() -> Retained<Self>;
108    );
109}