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!(
    /// This class is used to represent a generic HomeKit event.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmevent?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HMEvent;
);

unsafe impl Send for HMEvent {}

unsafe impl Sync for HMEvent {}

extern_conformance!(
    unsafe impl NSObjectProtocol for HMEvent {}
);

impl HMEvent {
    extern_methods!(
        #[deprecated = "HMEvent is abstract"]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "HMEvent is abstract"]
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// A unique identifier for the event.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(uniqueIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn uniqueIdentifier(&self) -> Retained<NSUUID>;

        #[cfg(feature = "HMHome")]
        /// Specifies whether the HMEvent can be added to HMEventTrigger on the given home.
        #[unsafe(method(isSupportedForHome:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isSupportedForHome(home: &HMHome) -> bool;
    );
}