objc2_home_kit/generated/
HMEventTriggerActivationState.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// This enumeration describes the current activation state of the event trigger.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmeventtriggeractivationstate?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct HMEventTriggerActivationState(pub NSUInteger);
14impl HMEventTriggerActivationState {
15    /// Trigger is not active because it is disabled
16    #[doc(alias = "HMEventTriggerActivationStateDisabled")]
17    pub const Disabled: Self = Self(0);
18    /// Trigger is not active because there is no HomeHub
19    #[doc(alias = "HMEventTriggerActivationStateDisabledNoHomeHub")]
20    pub const DisabledNoHomeHub: Self = Self(1);
21    /// Trigger is not active because there is no compatible HomeHub
22    #[doc(alias = "HMEventTriggerActivationStateDisabledNoCompatibleHomeHub")]
23    pub const DisabledNoCompatibleHomeHub: Self = Self(2);
24    /// Trigger is not active because Location Authorization has been turned off by user
25    #[doc(alias = "HMEventTriggerActivationStateDisabledNoLocationServicesAuthorization")]
26    pub const DisabledNoLocationServicesAuthorization: Self = Self(3);
27    /// Trigger is currently active
28    #[doc(alias = "HMEventTriggerActivationStateEnabled")]
29    pub const Enabled: Self = Self(4);
30}
31
32unsafe impl Encode for HMEventTriggerActivationState {
33    const ENCODING: Encoding = NSUInteger::ENCODING;
34}
35
36unsafe impl RefEncode for HMEventTriggerActivationState {
37    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}