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 objc2::__framework_prelude::*;

use crate::*;

/// This enumeration describes the current activation state of the event trigger.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmeventtriggeractivationstate?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HMEventTriggerActivationState(pub NSUInteger);
impl HMEventTriggerActivationState {
    /// Trigger is not active because it is disabled
    #[doc(alias = "HMEventTriggerActivationStateDisabled")]
    pub const Disabled: Self = Self(0);
    /// Trigger is not active because there is no HomeHub
    #[doc(alias = "HMEventTriggerActivationStateDisabledNoHomeHub")]
    pub const DisabledNoHomeHub: Self = Self(1);
    /// Trigger is not active because there is no compatible HomeHub
    #[doc(alias = "HMEventTriggerActivationStateDisabledNoCompatibleHomeHub")]
    pub const DisabledNoCompatibleHomeHub: Self = Self(2);
    /// Trigger is not active because Location Authorization has been turned off by user
    #[doc(alias = "HMEventTriggerActivationStateDisabledNoLocationServicesAuthorization")]
    pub const DisabledNoLocationServicesAuthorization: Self = Self(3);
    /// Trigger is currently active
    #[doc(alias = "HMEventTriggerActivationStateEnabled")]
    pub const Enabled: Self = Self(4);
}

unsafe impl Encode for HMEventTriggerActivationState {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for HMEventTriggerActivationState {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}