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