objc2_home_kit/generated/
HMCameraSnapshot.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Represents a camera snapshot.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcamerasnapshot?language=objc)
13    #[unsafe(super(HMCameraSource, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "HMCameraSource")]
16    pub struct HMCameraSnapshot;
17);
18
19#[cfg(feature = "HMCameraSource")]
20unsafe impl Send for HMCameraSnapshot {}
21
22#[cfg(feature = "HMCameraSource")]
23unsafe impl Sync for HMCameraSnapshot {}
24
25#[cfg(feature = "HMCameraSource")]
26extern_conformance!(
27    unsafe impl NSObjectProtocol for HMCameraSnapshot {}
28);
29
30#[cfg(feature = "HMCameraSource")]
31impl HMCameraSnapshot {
32    extern_methods!(
33        /// Time corresponding to the snapshot request.
34        ///
35        /// This property is not atomic.
36        ///
37        /// # Safety
38        ///
39        /// This might not be thread-safe.
40        #[unsafe(method(captureDate))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn captureDate(&self) -> Retained<NSDate>;
43
44        #[deprecated = "HMCameraSnapshot objects are created by their parent container objects. Directly creating them is not supported."]
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52#[cfg(feature = "HMCameraSource")]
53impl HMCameraSnapshot {
54    extern_methods!(
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58    );
59}