objc2_home_kit/generated/
HMEvent.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    /// This class is used to represent a generic HomeKit event.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmevent?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HMEvent;
16);
17
18unsafe impl Send for HMEvent {}
19
20unsafe impl Sync for HMEvent {}
21
22unsafe impl NSObjectProtocol for HMEvent {}
23
24impl HMEvent {
25    extern_methods!(
26        #[deprecated = "HMEvent is abstract"]
27        #[unsafe(method(init))]
28        #[unsafe(method_family = init)]
29        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30
31        #[deprecated = "HMEvent is abstract"]
32        #[unsafe(method(new))]
33        #[unsafe(method_family = new)]
34        pub unsafe fn new() -> Retained<Self>;
35
36        /// A unique identifier for the event.
37        #[unsafe(method(uniqueIdentifier))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn uniqueIdentifier(&self) -> Retained<NSUUID>;
40
41        #[cfg(feature = "HMHome")]
42        /// Specifies whether the HMEvent can be added to HMEventTrigger on the given home.
43        #[unsafe(method(isSupportedForHome:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn isSupportedForHome(home: &HMHome) -> bool;
46    );
47}