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        #[unsafe(method(captureDate))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn captureDate(&self) -> Retained<NSDate>;
37
38        #[deprecated = "HMCameraSnapshot objects are created by their parent container objects. Directly creating them is not supported."]
39        #[unsafe(method(init))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42    );
43}
44
45/// Methods declared on superclass `NSObject`.
46#[cfg(feature = "HMCameraSource")]
47impl HMCameraSnapshot {
48    extern_methods!(
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52    );
53}