objc2_home_kit/generated/
HMHomeAccessControl.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::*;
5
6use crate::*;
7
8extern_class!(
9    /// Represents the access control of a user associated with a home.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmhomeaccesscontrol?language=objc)
12    #[unsafe(super(HMAccessControl, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "HMAccessControl")]
15    pub struct HMHomeAccessControl;
16);
17
18#[cfg(feature = "HMAccessControl")]
19unsafe impl Send for HMHomeAccessControl {}
20
21#[cfg(feature = "HMAccessControl")]
22unsafe impl Sync for HMHomeAccessControl {}
23
24#[cfg(feature = "HMAccessControl")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for HMHomeAccessControl {}
27);
28
29#[cfg(feature = "HMAccessControl")]
30impl HMHomeAccessControl {
31    extern_methods!(
32        /// Specifies if the user has administrative privileges for the home.
33        ///
34        /// This property is not atomic.
35        ///
36        /// # Safety
37        ///
38        /// This might not be thread-safe.
39        #[unsafe(method(isAdministrator))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn isAdministrator(&self) -> bool;
42
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46    );
47}
48
49/// Methods declared on superclass `NSObject`.
50#[cfg(feature = "HMAccessControl")]
51impl HMHomeAccessControl {
52    extern_methods!(
53        #[unsafe(method(new))]
54        #[unsafe(method_family = new)]
55        pub unsafe fn new() -> Retained<Self>;
56    );
57}