objc2_home_kit/generated/
HMPresenceEventDefines.rs1use objc2::__framework_prelude::*;
4
5use crate::*;
6
7#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct HMPresenceEventType(pub NSUInteger);
14impl HMPresenceEventType {
15 #[doc(alias = "HMPresenceEventTypeEveryEntry")]
18 pub const EveryEntry: Self = Self(1);
19 #[doc(alias = "HMPresenceEventTypeEveryExit")]
22 pub const EveryExit: Self = Self(2);
23 #[doc(alias = "HMPresenceEventTypeFirstEntry")]
25 pub const FirstEntry: Self = Self(3);
26 #[doc(alias = "HMPresenceEventTypeLastExit")]
28 pub const LastExit: Self = Self(4);
29 #[doc(alias = "HMPresenceEventTypeAtHome")]
31 pub const AtHome: Self = Self(HMPresenceEventType::FirstEntry.0);
32 #[doc(alias = "HMPresenceEventTypeNotAtHome")]
34 pub const NotAtHome: Self = Self(HMPresenceEventType::LastExit.0);
35}
36
37unsafe impl Encode for HMPresenceEventType {
38 const ENCODING: Encoding = NSUInteger::ENCODING;
39}
40
41unsafe impl RefEncode for HMPresenceEventType {
42 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
43}
44
45#[repr(transparent)]
50#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
51pub struct HMPresenceEventUserType(pub NSUInteger);
52impl HMPresenceEventUserType {
53 #[doc(alias = "HMPresenceEventUserTypeCurrentUser")]
55 pub const CurrentUser: Self = Self(1);
56 #[doc(alias = "HMPresenceEventUserTypeHomeUsers")]
58 pub const HomeUsers: Self = Self(2);
59 #[doc(alias = "HMPresenceEventUserTypeCustomUsers")]
61 pub const CustomUsers: Self = Self(3);
62}
63
64unsafe impl Encode for HMPresenceEventUserType {
65 const ENCODING: Encoding = NSUInteger::ENCODING;
66}
67
68unsafe impl RefEncode for HMPresenceEventUserType {
69 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
70}