objc2-home-kit 0.3.2

Bindings to the HomeKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// Represents a camera snapshot.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcamerasnapshot?language=objc)
    #[unsafe(super(HMCameraSource, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "HMCameraSource")]
    pub struct HMCameraSnapshot;
);

#[cfg(feature = "HMCameraSource")]
unsafe impl Send for HMCameraSnapshot {}

#[cfg(feature = "HMCameraSource")]
unsafe impl Sync for HMCameraSnapshot {}

#[cfg(feature = "HMCameraSource")]
extern_conformance!(
    unsafe impl NSObjectProtocol for HMCameraSnapshot {}
);

#[cfg(feature = "HMCameraSource")]
impl HMCameraSnapshot {
    extern_methods!(
        /// Time corresponding to the snapshot request.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(captureDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn captureDate(&self) -> Retained<NSDate>;

        #[deprecated = "HMCameraSnapshot objects are created by their parent container objects. Directly creating them is not supported."]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "HMCameraSource")]
impl HMCameraSnapshot {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}